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: Paul D. Smith
Subject: [bug #59762] make --touch produce local spurious empty files with out-of-tree Makefile strategy
Date: Mon, 15 Mar 2021 02:38:02 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36

Update of bug #59762 (project make):

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

    _______________________________________________________

Follow-up Comment #3:

There is no way to avoid this.  The --touch option will touch all the targets
that make wants to build.  If you say *make --touch file2.o pgm.o* then
*file2.o* and *pgm.o* are targets and make will touch them.

There is no way to avoid this: it's not possible to mark certain targets as
being "not to be touched" by the --touch option.

All I can say is that I find the --touch option somewhat dangerous and I don't
recommend its use.  It's too easy to accidentally bring some file up to date
that should instead have been rebuilt, and cause your builds to fail or worse,
your build to succeed but your generated output to fail in subtle ways.

If you really want to have this facility available and you really don't want
to have these extra files, you'll have to invent your own "touch" facility
that doesn't use make's --touch flag.

For example you could create a touch-% target that touched $* then instead of
*make --touch file2.o pgm.o* you could run *make touch-file2.o touch-pgm.o*.

    _______________________________________________________

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]