Update of bug #52017 (project make):

                  Status:                    None => Not A Bug              
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

Your example makefile contains:


all: my.res my.draft.res

%.res %.int: %.src
        cp $< $*.int
        cp $< $*.res

%.draft.res: %.d %.int
        cat $^ >$@


You are assuming that %.int will always be considered intermediate.  But,
that's not the case.

If you run "make my.draft.res" then indeed, my.int will be considered
intermediate because it needs to be created as an intermediate file between
the source (my.src) and the target (my.draft.res).  And, make will treat it as
such.

But if you run "make my.res" then "my.int" is NOT an intermediate file; it's
created as a side-effect of creating the target "my.res", not as an
intermediate file (a prerequisite of "my.res").  And make doesn't treat it as
such.

If you want the file to be considered intermediate always you can declare it
to be such:


$ echo '.INTERMEDIATE: my.int' >> Makefile

$ make
cp my.src my.int
cp my.src my.res
cat my.d my.int >my.draft.res
rm my.int

$ ls -al my.int
ls: cannot access 'my.int': No such file or directory

$ make
make: Nothing to be done for 'all'.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52017>

_______________________________________________
  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

Reply via email to