Commit 968c07fc authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

build: use the "force" mechanism to always run the revision rule

Whenever 'make' is run, it should check whether the revision has
changed, and if so, it should update src/revision.h.

This portable FORCE mechanism should have been the replacement for
the phony target that was removed in a33a4f00, five commits ago.

This fixes https://savannah.gnu.org/bugs/?50956 in a better way.
parent 858e75e4
Showing with 5 additions and 2 deletions
+5 -2
......@@ -12,10 +12,13 @@ endif
nano.o: revision.h
winio.o: revision.h
revision.h:
# Always run the commands in this rule. But update the target
# only when the revision actually changed.
revision.h: FORCE
@[ -f $@ ] || touch $@
@echo "#define $(SOMETHING)" | cmp -s $@ - || \
echo "#define $(SOMETHING)" > $@
echo "#define $(SOMETHING)" > $@
FORCE:
bin_PROGRAMS = nano
nano_SOURCES = browser.c \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment