lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [6/7] git commit: Fix Makefile targets for tests
Date Mon, 17 Mar 2014 21:42:31 GMT
Fix Makefile targets for tests

Running 'make test' should work now.


Project: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/commit/627b02cd
Tree: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/tree/627b02cd
Diff: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/diff/627b02cd

Branch: refs/heads/master
Commit: 627b02cd9ca02d04a0c6dfb99f4e2f3184153d6c
Parents: ead5e72
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Mon Mar 17 22:40:14 2014 +0100
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Mon Mar 17 22:40:14 2014 +0100

----------------------------------------------------------------------
 Makefile | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/627b02cd/Makefile
----------------------------------------------------------------------
diff --git a/Makefile b/Makefile
index 4551de7..b2863f4 100644
--- a/Makefile
+++ b/Makefile
@@ -17,8 +17,9 @@
 
 CC= cc
 DEFS=
-CFLAGS= -Isrc $(DEFS) 
+CFLAGS= -I. -Isrc $(DEFS)
 PROGNAME= charmonize
+CHARMONY_H= charmony.h
 PROBES=
 FILES=
 OUT=
@@ -58,13 +59,16 @@ TEST_OBJS= src/Charmonizer/Test.o src/Charmonizer/Test/TestDirManip.o
src/Charmo
 
 HEADERS= src/Charmonizer/Core/Compiler.h src/Charmonizer/Core/ConfWriter.h src/Charmonizer/Core/ConfWriterC.h
src/Charmonizer/Core/ConfWriterPerl.h src/Charmonizer/Core/ConfWriterRuby.h src/Charmonizer/Core/Defines.h
src/Charmonizer/Core/HeaderChecker.h src/Charmonizer/Core/OperatingSystem.h src/Charmonizer/Core/Util.h
src/Charmonizer/Probe.h src/Charmonizer/Probe/AtomicOps.h src/Charmonizer/Probe/DirManip.h
src/Charmonizer/Probe/Floats.h src/Charmonizer/Probe/FuncMacro.h src/Charmonizer/Probe/Headers.h
src/Charmonizer/Probe/Integers.h src/Charmonizer/Probe/LargeFiles.h src/Charmonizer/Probe/Memory.h
src/Charmonizer/Probe/SymbolVisibility.h src/Charmonizer/Probe/UnusedVars.h src/Charmonizer/Probe/VariadicMacros.h
src/Charmonizer/Test.h
 
-CLEANABLE= $(OBJS) $(PROGNAME) $(TEST_OBJS) $(TESTS) 
+CLEANABLE= $(OBJS) $(PROGNAME) $(CHARMONY_H) $(TEST_OBJS) $(TESTS)
 
 .c.o:
 	$(CC) $(CFLAGS) -c $*.c -o $@
 
 all: $(PROGNAME)
 
+$(CHARMONY_H): $(PROGNAME)
+	./$(PROGNAME) --cc=$(CC) --enable-c
+
 meld:
 	$(PERL) buildbin/meld.pl --probes=$(PROBES) --files=$(FILES) --out=$(OUT)
 
@@ -73,6 +77,8 @@ $(PROGNAME): $(OBJS)
 
 $(OBJS) $(TEST_OBJS): $(HEADERS)
 
+$(TEST_OBJS): $(CHARMONY_H)
+
 tests: $(TESTS)
 
 TestDirManip: src/Charmonizer/Test.o src/Charmonizer/Test/TestDirManip.o
@@ -96,6 +102,9 @@ TestUnusedVars: src/Charmonizer/Test.o src/Charmonizer/Test/TestUnusedVars.o
 TestVariadicMacros: src/Charmonizer/Test.o src/Charmonizer/Test/TestVariadicMacros.o
 	$(CC) $(CFLAGS) src/Charmonizer/Test/TestVariadicMacros.o src/Charmonizer/Test.o -o $@
 
+test: tests
+	prove ./Test*
+
 clean:
 	rm -f $(CLEANABLE)
 


Mime
View raw message