[svn] r7822: nemerle/trunk: snippets/aop/makefile snippets/aop/src/ftests/after/throwing_with_parm_positiv...

nazgul svnadmin at nemerle.org
Mon Oct 22 20:56:10 CEST 2007


Log:
Allow building and testing AOP library within compiler (on Linux)

Author: nazgul
Date: Mon Oct 22 20:56:08 2007
New Revision: 7822

Modified:
   nemerle/trunk/snippets/aop/makefile
   nemerle/trunk/snippets/aop/src/ftests/after/throwing_with_parm_positive.n
   nemerle/trunk/tools/nemerle-unit/makefile

Modified: nemerle/trunk/snippets/aop/makefile
==============================================================================
--- nemerle/trunk/snippets/aop/makefile	(original)
+++ nemerle/trunk/snippets/aop/makefile	Mon Oct 22 20:56:08 2007
@@ -1,14 +1,19 @@
+TOP_LEVEL = ../..
+
+include $(TOP_LEVEL)/config.mak
+
+NCC_DIR = $(TOP_LEVEL)/ncc/out.stage3
+NCC = $(NCC_DIR)/ncc.exe -q
 
-include ../../config.mak
 
 build: bin bin/DevMacros.dll bin/Nemerle.Aop.dll
 
 bin/DevMacros.dll: bin src/dev_macros/parser_operators.n 
-	ncc -g -t:library -r Nemerle.Compiler.dll -o:$@\
+	$(NCC) -g -t:library -r Nemerle.Compiler.dll -o:$@\
 		src/dev_macros/parser_operators.n
 
 bin/Nemerle.Aop.dll: bin bin/DevMacros.dll src/macros/*.n src/helper/*.n src/pubapi/*.n
-	ncc --no-color -g -t:library -r Nemerle.Compiler.dll \
+	$(NCC) --no-color -g -t:library -r Nemerle.Compiler.dll \
 		-m bin/DevMacros.dll -o:$@\
 		src/macros/*.n src/helper/*.n src/pubapi/*.n
 
@@ -17,18 +22,20 @@
 
 # unit tests
 utests: bin/UnitTests.dll
+	cp $(NCC_DIR)/Nemerle.dll bin/
+	cp $(NCC_DIR)/Nemerle.Compiler.dll bin/
 	cd bin; $(NUNIT_CONSOLE) UnitTests.dll
 
 bin/UnitTests.dll: bin/Nemerle.Aop.dll bin/NemerleUnit.dll src/utests/*.n
-	ncc src/utests/*.n -g -r bin/NemerleUnit.dll -m bin/DevMacros.dll -nowarn:10005 \
+	$(NCC) src/utests/*.n -g -r bin/NemerleUnit.dll -m bin/DevMacros.dll -nowarn:10005 \
 		-o:$@ -t:library -r Nemerle.Compiler.dll -r bin/Nemerle.Aop.dll \
 		$(NUNIT_LIB_FLAG)
 
-bin/NemerleUnit.dll: ../../tools/nemerle-unit/bin/NemerleUnit.dll
+bin/NemerleUnit.dll: $(TOP_LEVEL)/tools/nemerle-unit/bin/NemerleUnit.dll
 	cp $< bin/NemerleUnit.dll
 
 ../../tools/nemerle-unit/bin/NemerleUnit.dll:
-	cd ../../tools/nemerle-unit; make
+	cd $(TOP_LEVEL)/tools/nemerle-unit; make
 
 # functional tests
 ftests: 
@@ -41,14 +48,16 @@
 
 functional_tests: testbin testbin/test.exe bin/Nemerle.Aop.dll
 	cp bin/Nemerle.Aop.dll testbin/Nemerle.Aop.dll
-	cp ../../ncc/out.stage3/Nemerle.Macros.dll testbin/Nemerle.Macros.dll
+	cp $(NCC_DIR)/Nemerle.Macros.dll testbin/Nemerle.Macros.dll
+	cp $(NCC_DIR)/Nemerle.dll testbin/
+	cp $(NCC_DIR)/Nemerle.Compiler.dll testbin/
 	cd testbin; find ../src/ftests -name  "*$(NAME)*_positive.n" \
-		-exec $(NET_ENGINE) ./test.exe -r "$(NET_ENGINE)" $(ARG) -ref Nemerle.Aop.dll {} +
+		-exec $(NET_ENGINE) ./test.exe $(ARG) -ref Nemerle.Aop.dll {} +
 	cd testbin; find ../src/ftests -name "*$(NAME)*_negative.n" \
-		-exec $(NET_ENGINE) ./test.exe -r "$(NET_ENGINE)" $(ARG) -ref Nemerle.Aop.dll {} +
+		-exec $(NET_ENGINE) ./test.exe $(ARG) -ref Nemerle.Aop.dll {} +
 
 testbin/test.exe: testbin
-	ncc -o:$@ -r Nemerle.Compiler.dll ../../ncc/testsuite/test.n
+	$(NCC) -o:$@ -r Nemerle.Compiler.dll $(TOP_LEVEL)/ncc/testsuite/test.n
 
 bin:
 	mkdir -p bin 

Modified: nemerle/trunk/snippets/aop/src/ftests/after/throwing_with_parm_positive.n
==============================================================================
--- nemerle/trunk/snippets/aop/src/ftests/after/throwing_with_parm_positive.n	(original)
+++ nemerle/trunk/snippets/aop/src/ftests/after/throwing_with_parm_positive.n	Mon Oct 22 20:56:08 2007
@@ -31,7 +31,7 @@
 		if (e != null )
             print("advice\n");
         else
-            print("")
+            print(" ")
 	}
 }
 

Modified: nemerle/trunk/tools/nemerle-unit/makefile
==============================================================================
--- nemerle/trunk/tools/nemerle-unit/makefile	(original)
+++ nemerle/trunk/tools/nemerle-unit/makefile	Mon Oct 22 20:56:08 2007
@@ -1,9 +1,13 @@
-include ../../config.mak
+TOP_LEVEL = ../..
+NCC_DIR = $(TOP_LEVEL)/ncc/out.stage3
+NCC = $(NCC_DIR)/ncc.exe -q
+
+include $(TOP_LEVEL)/config.mak
 
 build: bin/NemerleUnit.dll
 
 bin/NemerleUnit.dll: bin src/macros/*.n
-	ncc -g -i  -t:library -r Nemerle.Compiler.dll \
+	$(NCC) -g -i  -t:library -r Nemerle.Compiler.dll \
 		$(NUNIT_LIB_FLAG)\
 		-o:$@ src/macros/*.n
 
@@ -11,14 +15,14 @@
 	cd bin; $(NUNIT_CONSOLE) UnitTests.dll
 
 bin/UnitTests.dll: src/tests/**.n src/example.n
-	ncc $^ -g -i -r bin/NemerleUnit.dll  -nowarn:10005 \
+	$(NCC) $^ -g -i -r bin/NemerleUnit.dll  -nowarn:10005 \
 		-o:$@ -t:library -r Nemerle.Compiler.dll \
 		-r lib/nunit.core.interfaces.dll \
 		$(NUNIT_LIB_FLAG)\
 		-r lib/nunit.core.dll
 
 bin/fixture.dll: src/fixtures_for_tests/*.n
-	ncc $^ -i -nowarn:10005 -r bin/NemerleUnit.dll $(NUNIT_LIB_FLAG) \
+	$(NCC) $^ -i -nowarn:10005 -r bin/NemerleUnit.dll $(NUNIT_LIB_FLAG) \
 		-t:library -o:$@
 
 



More information about the svn mailing list