Dynamics files managed by Makefile
Patrick Begou <[email protected]>
| Newsgroups | gmane.comp.gnu.make.general |
|---|---|
| Message-ID | <[email protected]> |
Hi all, I'm stuck for several days with writing a Makefile with source files dynamically generated. This problem raises because of a bug in a compiler when a fortran file uses too many modules and I have to split it automatically. The original fortran file is dynamically generated too but with a constant name. So I have a main file automatically created by the Makefile: master.f90 This file will be splitted in master_1.f90, master_2.f90, master_3.f90.... etc (number of file not known), each of them is a fortran module and master will be rewritted to use these module. This is done by a special target and a bash script. It works. But I'm unable with make to get a list of these new master_x.f90 files for the compilation, seams that my variable: SPLIT_SRC=$(wildcard master_*.f90) is always empty and only evaluated at the startup. I would like to obtain a list of targets with: SPLIT_OBJ=$(patsubst %.f90,%.o,$(SPLIT_SRC)) Thanks for your advices. Patrick