|
| From: | Henrik Carlqvist |
| Subject: | [bug #51495] Notice when a rule changed, so target needs rebuilding |
| Date: | Tue, 18 Jul 2017 09:46:08 -0400 (EDT) |
| User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.19) Gecko/2010031218 Firefox/3.0.19 |
Follow-up Comment #1, bug #51495 (project make):
The quick and easy way to accomplish this today is of course to also add the
Makefile to the prerequisites of targets. If you don't want every target to be
rebuilt when only one rule has changed it is also possible to split the
Makefile up into several files with only one rule in each file. Example:
Makefile:
-8<----------------------
all: myprog
include $(wildcard *.mk)
-8<----------------------
link.mk:
-8<----------------------
OBJFILES=file1.o file2.o
LDFLAGS=-lm
myprog: $(OBJFILES) link.mk
gcc -o $@ $(OBJFILES) $(LDFLAGS)
-8<----------------------
compile.mk:
-8<----------------------
CFLAGS=-ansi -pedantic
%.o: %.c compile.mk
gcc -c $(CFLAGS) -o $@ $<
-8<----------------------
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51495>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
| [Prev in Thread] | Current Thread | [Next in Thread] |