Update of bug #62228 (project make): Status: None => Not A Bug Open/Closed: Open => Closed
_______________________________________________________ Follow-up Comment #1: Make always parses all non-recipe lines when the makefile is read, before it runs any recipes. It finishes parsing all the makefiles (which includes expanding all variables that are targets or prerequisites) during the read-on phase. See the GNU make manual for exact details: https://www.gnu.org/software/make/manual/html_node/Reading-Makefiles.html You can't have a makefile where the recipe of one rule creates a file and another rule uses wildcards or shell commands to list all the files to generate prerequisites because when the function or variable is expanded to list the prerequisites, the rule to create them hasn't been run yet. In your makefile: INFILES = $(notdir $(shell ls ${INDIR}/*.input)) ... OUTFILES = $(addprefix ${OUTDIR}/,$(notdir ${INFILESASOUT})) ... processoutputs: ${OUTFILES} When make parses the makefile, before it runs any rules, it will expand *OUTFILES* which will cause *INFILES* to be expanded, which will search for *.input* files. But the *something* rule has not been run yet, so *./inputs/b.input* doesn't exist, so the contents of *INFILES* won't see it, so it won't be in *OUTFILES* either. Basically you can't rely on wildcards to find files that are created during the build, because at the time that these wildcards are expanded the build has not been run so the created files won't be found. If you need help please email either help-m...@gnu.org or bug-make@gnu.org. You'll need to provide a more exact description of precisely what you want to accomplish however. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?62228> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/