summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2009-12-20 10:44:14 +0100
committerBruno Haible <bruno@clisp.org>2009-12-20 10:44:14 +0100
commit995bb8d56e0b6b68ceb91b9bfbf9840aa0500782 (patch)
tree521d0aae842b055de41c8bfab04f841f9e9606b1
parent5868508b8b74fafe2873aa0ace8030c9d406c969 (diff)
downloadgperf-995bb8d56e0b6b68ceb91b9bfbf9840aa0500782.tar.gz
Allow processing the tests with parallel make.
-rw-r--r--ChangeLog11
-rw-r--r--tests/Makefile.in29
2 files changed, 25 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index d77a1e8..d2007c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2009-12-20 Bruno Haible <bruno@clisp.org>
+
+ Allow processing the tests with parallel make.
+ * tests/Makefile.in (check-link-c, check-link-c++): Remove rules.
+ (test.$(OBJEXT), test2.$(OBJEXT)): New rules.
+ (check-c): Add commands for building cout. Depend on test.$(OBJEXT).
+ (check-ada, check-modula3, check-pascal, check-lang-utf8): Depend on
+ test.$(OBJEXT).
+ (check-lang-ucs2): Depend on test2.$(OBJEXT).
+ Reported by Bryan Østergaard <kloeri@exherbo.org>.
+
2009-02-01 Brendan Kehoe <brendan@zen.org>
* gperf-3.0.4 released.
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 25890a6..53b9a92 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -60,26 +60,20 @@ installdirs :
uninstall :
-check : check-link-c check-link-c++ check-c check-ada check-modula3 check-pascal check-lang-utf8 check-lang-ucs2 check-smtp check-test
+check : check-c check-ada check-modula3 check-pascal check-lang-utf8 check-lang-ucs2 check-smtp check-test
@true
extracheck : @CHECK_LANG_SYNTAX@
@true
-check-link-c: force
- @echo "performing some tests of the perfect hash generator"
- $(CC) -c $(CFLAGS) $(srcdir)/test.c
+check-c: test.$(OBJEXT)
+ @echo "testing ANSI C reserved words, all items should be found in the set"
$(GPERF) -c -l -S1 -I -o $(srcdir)/c.gperf > cinset.c
$(CC) $(CFLAGS) $(LDFLAGS) -o cout cinset.c test.$(OBJEXT)
-
-check-link-c++: force
-
-check-c:
- @echo "testing ANSI C reserved words, all items should be found in the set"
./cout -v < $(srcdir)/c.gperf | LC_ALL=C tr -d '\r' > c.out
diff $(srcdir)/c.exp c.out
-check-ada:
+check-ada: test.$(OBJEXT)
$(GPERF) -k1,4,'$$' -I $(srcdir)/ada.gperf > adainset.c
# double '$$' is only there since make gets confused; program wants only 1 '$'
$(CC) $(CFLAGS) $(LDFLAGS) -o aout adainset.c test.$(OBJEXT)
@@ -92,14 +86,14 @@ check-ada:
./preout -v < $(srcdir)/adadefs.gperf | LC_ALL=C tr -d '\r' > ada-pred.out
diff $(srcdir)/ada-pred.exp ada-pred.out
-check-modula3:
+check-modula3: test.$(OBJEXT)
$(GPERF) -k1,2,'$$' -I -o $(srcdir)/modula3.gperf > m3inset.c
$(CC) $(CFLAGS) $(LDFLAGS) -o m3out m3inset.c test.$(OBJEXT)
@echo "testing Modula3 reserved words, all items should be found in the set"
./m3out -v < $(srcdir)/modula3.gperf | LC_ALL=C tr -d '\r' > modula.out
diff $(srcdir)/modula.exp modula.out
-check-pascal:
+check-pascal: test.$(OBJEXT)
$(GPERF) -o -S2 -I < $(srcdir)/pascal.gperf > pinset.c
$(CC) $(CFLAGS) $(LDFLAGS) -o pout pinset.c test.$(OBJEXT)
@echo "testing Pascal reserved words, all items should be found in the set"
@@ -107,22 +101,27 @@ check-pascal:
diff $(srcdir)/pascal.exp pascal.out
# check for 8-bit cleanliness
-check-lang-utf8:
+check-lang-utf8: test.$(OBJEXT)
$(GPERF) -k1 -t -I -K foreign_name < $(srcdir)/lang-utf8.gperf > lu8inset.c
$(CC) $(CFLAGS) $(LDFLAGS) -o lu8out lu8inset.c test.$(OBJEXT)
@echo "testing UTF-8 encoded languages, all items should be found in the set"
sed -e '1,6d' -e 's/,.*//' < $(srcdir)/lang-utf8.gperf | ./lu8out -v | LC_ALL=C tr -d '\r' > lang-utf8.out
diff $(srcdir)/lang-utf8.exp lang-utf8.out
+test.$(OBJEXT) : $(srcdir)/test.c
+ $(CC) -c $(CFLAGS) $(srcdir)/test.c
+
# check for binary keywords with NUL bytes
-check-lang-ucs2:
- $(CC) -c $(CFLAGS) $(srcdir)/test2.c
+check-lang-ucs2: test2.$(OBJEXT)
$(GPERF) -k4 -t -l -I -K foreign_name < $(srcdir)/lang-ucs2.gperf > lu2inset.c
$(CC) $(CFLAGS) $(LDFLAGS) -o lu2out lu2inset.c test2.$(OBJEXT)
@echo "testing UCS-2 encoded languages, all items should be found in the set"
./lu2out -v < $(srcdir)/lang-ucs2.in | LC_ALL=C tr -d '\r' > lang-ucs2.out
diff $(srcdir)/lang-ucs2.exp lang-ucs2.out
+test2.$(OBJEXT) : $(srcdir)/test2.c
+ $(CC) -c $(CFLAGS) $(srcdir)/test2.c
+
# check case-insensitive lookup
check-smtp:
@echo "testing SMTP keywords, case-insensitive"