Follow-up Comment #18, bug #30381 (project make): Ack, my code got mangled, because I'm new at Rich Markup. Here it is again:
I could really use this feature. I'm implementing a sort of branching revision control of databases, in which the history is stored as SQL diffs in files named things like "<new version #>.from.<old version #>.sql". So, for example, there's an explicit rule in the makefile to generate the "root" database "0.db", and then there are a bunch of SQL files in the folder, with names like "5.from.3.sql" and "3.from.0.sql". I have an implicit rule that would, if not for the limitation discussed in this thread, walk up the dependency chain when the user calls e.g. "make 5.db": .SECONDEXPANSION: %.db : %.from.*.sql $(SQL_EXE) $$(subst sql,db,$$(subst $$*.from.,$$(blank),$$(wildcard $$*.from.*.sql))) $(CP) $(subst sql,db,$(subst $*.from,$(blank),$*.from.*.sql)) $*.prev.db $(SQL_EXE) $*.prev.db < $*.from.*.sql $(MV) $*.prev.db $*.db Make looks for 5.db, finds it missing, then tries the above rule, and succeeds in finding 5.from.3.sql and thus expanding the expression in the prereq list of 5.db to include 3.db. But then it refuses to follow the same rule for 3.db. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?30381> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make