summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2009-12-02 23:41:13 -0800
committerKaz Kylheku <kaz@kylheku.com>2009-12-02 23:41:13 -0800
commit8c53d9597b4d1dbe3da719f106ae46bf6ac3b1e8 (patch)
tree33286756ab53045a714eed31a3d532d0b38f9859 /Makefile
parenta14cf42f0b9de88aa5b8a68b8f594fcfc6048350 (diff)
downloadtxr-8c53d9597b4d1dbe3da719f106ae46bf6ac3b1e8.tar.gz
txr-8c53d9597b4d1dbe3da719f106ae46bf6ac3b1e8.tar.bz2
txr-8c53d9597b4d1dbe3da719f106ae46bf6ac3b1e8.zip
* Makefile (tests): Don't depend on the executable. Otherwise,
during make install-tests, if it doesn't exist in the install directory, a gcc compile command gets deposited into the run.sh generated script. (install-tests): Fixes to make this work when using a separate build directory. Split the cpio -p job into a cpio -i piping into cpio -o.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 10 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index b166b12d..383ceb65 100644
--- a/Makefile
+++ b/Makefile
@@ -78,7 +78,7 @@ TESTS := $(patsubst $(top_srcdir)/%.txr,./%.ok,\
$(shell find $(top_srcdir)/tests -name '*.txr' | sort))
.PHONY: tests
-tests: $(PROG) $(TESTS)
+tests: $(TESTS)
@echo "** tests passed!"
tests/001/%: TXR_ARGS := $(top_srcdir)/tests/001/data
@@ -122,12 +122,15 @@ install: $(PROG)
# Install the tests as well as the script to run them
#
install-tests:
- cd $(top_srcdir) ; find tests -name '*.out' -prune -o -print | cpio -pd $(DESTDIR)$(datadir)
- ( echo "#!/bin/sh" ; \
- echo "set -ex" ; \
- echo "cd $(datadir)" ; \
- make -s -n tests top_srcdir=. PROG=$(bindir)/txr ) \
- > run.sh
+ mkdir -p $(DESTDIR)$(datadir)
+ (cd $(top_srcdir) ; \
+ find tests -name '*.out' -prune -o -print | cpio -co) \
+ | (cd $(DESTDIR)$(datadir) ; cpio -idu)
+ (echo "#!/bin/sh" ; \
+ echo "set -ex" ; \
+ echo "cd $(datadir)" ; \
+ make -s -n tests top_srcdir=. PROG=$(bindir)/txr) \
+ > run.sh
$(call INSTALL,0755,run.sh,$(DESTDIR)$(datadir)/tests)
config.make config.h: