Boris Kolpackov <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] (Frank K�ster) writes: > >> all: fileB >> echo "made $@" >> -ls --full-time -l $< >> >> fileB: ../fileA >> test -e $< && test $< -nt $@ && cp $< $@ || true >> >> ../fileA: >> true >> >> This seems to go well, does anybody still see a problem? > > You don't really need the last rule, i.e., > > all: fileB > echo "made $@" > -ls --full-time -l $< > > fileB: > test -e $< && test $< -nt $@ && cp $< $@ || true > > This will work because make checks if a target (real file, not > phony) actually changed after the rule's command has completed. > If the file hasn't changed then make won't update targets that > happen to depend on this file and otherwise up-to-date.
But if fileA does not exist, it gives an error: make: *** No rule to make target `../fileA', needed by `fileB'. Stop. And this should not happen; the purpose of this is that I'd like to update some stuff in my build directories from a directory where I keep some "common files" for related projects; but this directory will not be part of the released version of the project, and therefore the files in it (here ../fileA) are not available when somebody else compiles the stuff. Regards, Frank -- Frank K�ster Inst. f. Biochemie der Univ. Z�rich Debian Developer _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
