[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dynamics files managed by Makefile

From: Patrick Begou
Subject: Dynamics files managed by Makefile
Date: Mon, 17 Oct 2022 18:35:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]