bug-make
[Top][All Lists]
Advanced

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

[bug #59762] make --touch produce local spurious empty files with out-of


From: Dmitry Goncharov
Subject: [bug #59762] make --touch produce local spurious empty files with out-of-tree Makefile strategy
Date: Thu, 24 Dec 2020 21:57:37 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #1, bug #59762 (project make):

You target.mk contains rule

% :: $(DIR_TARGET) ; :

When you run
$ make file1.o

make finds this rule, with % being file1.o and its prerequisite being build.
Make then makes this prerequisite and then proceeds to execute the recipe to
make file1.o from this prerequisite. In this rule this recipe is :.

See that : printed after linking pgm.x?

When you run

$ make -t file1.o
make finds this rule, with % being file1.o and its prerequisite being build.
Make then makes this prerequisite (this is the first touch which creates
file1.o in the build directory) and then proceeds to make file1.o. Because -t
is specified  make touches file1.o in the parent directory.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59762>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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