[Replicant] [website][PATCH 1/2] Makefile: fix phony targets

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Sun Apr 5 18:18:06 UTC 2020


Without that fix, after modifying a php file and typing make,
the corresponding html files are not regenerated.

This can be really problematic for contributors that are not familiar
with Makefiles as the behavior was completely counter intuitive.

This fixes the issue and restores the expected behavior.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
 Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Makefile b/Makefile
index 7fc2e82..1f745e4 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,7 @@ INSTALL_DIRECTORIES = \
 	js \
 	library \
 
+.PHONY: all
 all: $(TARGETS)
 
 $(DESTDIR):
@@ -23,10 +24,12 @@ $(DESTDIR):
 %.html: %.php
 	php -f $< | sed 's#\.php#\.html#g' > $@
 
+.PHONY: clean
 clean:
 	rm -f $(TARGETS)
 	rm -f cache/*.spc
 
+.PHONY: install
 install: $(DESTDIR) all
 	install -m644 $(TARGETS) -t $(DESTDIR)
 	cp -a $(INSTALL_DIRECTORIES) $(DESTDIR)
-- 
2.26.0



More information about the Replicant mailing list