summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2025-01-17 18:43:29 -0800
committerKaz Kylheku <kaz@kylheku.com>2025-01-17 18:48:14 -0800
commit2a24f429dffbc4c928d46e95ffdf3b8fe01a7eab (patch)
tree1edf82bca099479921b4937f7845264d1e2c9723
parent13ded878369cdc4a5973228112cf74ce37cca1db (diff)
downloadtxr-2a24f429dffbc4c928d46e95ffdf3b8fe01a7eab.tar.gz
txr-2a24f429dffbc4c928d46e95ffdf3b8fe01a7eab.tar.bz2
txr-2a24f429dffbc4c928d46e95ffdf3b8fe01a7eab.zip
Makefile: tidy up clean targets.
* Makefile (clean): Do not remove the run.sh file here. That is a temporary file that install-tests should be cleaning away when done, which we can remove in distclean. (clean-doc, clean-tests): New targets, which let us clean up generated documentation files and the test-generated state information in tst. (distclean): Do not remove the documentation stuff here; rely on clean-doc. Also depend on clean-tests. Do remove run.sh here. (install-tests): Add missing .PHONY. Remove run.sh.
-rw-r--r--Makefile15
1 files changed, 12 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 5226fac6..38de7214 100644
--- a/Makefile
+++ b/Makefile
@@ -358,13 +358,20 @@ clean-c:
rm -f y.tab.h.old
rm -f $(PROG)-win$(EXE) $(PROG)-win-dbg$(EXE) .build_id
rm -rf opt dbg tst
- rm -f $(EXTRA_OBJS-y) run.sh
+ rm -f $(EXTRA_OBJS-y)
clean-tlo:
rm -f $(STDLIB_TLOS)
-distclean: clean
- rm -f config.h config.make reconfigure txr-manpage.html txr-manpage.pdf
+clean-doc:
+ rm -f txr-manpage.html txr-manpage.pdf
+
+clean-tests:
+ rm -rf tst
+
+distclean: clean clean-tests clean-doc
+ rm -f config.h config.make reconfigure run.sh
+
endif
TESTS_OK := $(addprefix tst/,\
@@ -546,6 +553,7 @@ zip: install
#
# Install the tests as well as the script to run them
#
+.PHONY: install-tests
install-tests:
$(call ABBREV3,INSTALL,$(DESTDIR)$(datadir),tests)
$(call SH,rm -rf tst)
@@ -559,6 +567,7 @@ install-tests:
make -s -n tests VERBOSE=y TXR=$(bindir)/txr) \
> run.sh)
$(call INSTALL,0755,run.sh,$(DESTDIR)$(datadir)/tests)
+ $(call SH,rm -rf run.sh)
#
# Generate web page from man page