diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2025-01-17 18:43:29 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2025-01-17 18:48:14 -0800 |
commit | 2a24f429dffbc4c928d46e95ffdf3b8fe01a7eab (patch) | |
tree | 1edf82bca099479921b4937f7845264d1e2c9723 | |
parent | 13ded878369cdc4a5973228112cf74ce37cca1db (diff) | |
download | txr-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-- | Makefile | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -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 |