bug-make
[Top][All Lists]
Advanced

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

[bug #30381] Don't avoid implicit rule recursion quite so soon.


From: anonymous
Subject: [bug #30381] Don't avoid implicit rule recursion quite so soon.
Date: Tue, 12 May 2015 20:54:33 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko

Follow-up Comment #17, bug #30381 (project make):

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":

<verbatim>
.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
</verbatim>

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/




reply via email to

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