Makefile - Fix mtest target (and clean up utest targets)
authorJohn Hodge <[email protected]>
Sun, 11 May 2014 07:20:51 +0000 (15:20 +0800)
committerJohn Hodge <[email protected]>
Sun, 11 May 2014 07:20:51 +0000 (15:20 +0800)
.travis.yml
Makefile
Usermode/Libraries/Makefile.tpl
Usermode/Libraries/acess.ld_src/Makefile
Usermode/Libraries/crt0.o_src/Makefile

index a98da7d..52dc032 100644 (file)
@@ -6,4 +6,6 @@ compiler: clang
 #env:
 # - ARCH=host HOST_ARCH=x86 USE_ACPICA=0
 # - ARCH=host HOST_ARCH=x86_64 CC="$CC -m64"
-script: "make -k utest mtest"
+script:
+ - "make utest-build mtest-build"
+ - "make -k utest-run mtest-run"
index c283ec6..d78686b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,8 @@
 
 .PHONY: all clean SyscallList all-user
 
-SUBMAKE = $(MAKE) --no-print-directory
+SUBMAKE = $(MAKE)
+# --no-print-directory
 
 USRLIBS := crt0.o acess.ld ld-acess.so libc.so libc++.so libposix.so
 USRLIBS += libreadline.so libnet.so liburi.so libpsocket.so
@@ -66,20 +67,26 @@ all-install:        install-Filesystem SyscallList ai-user ai-kmode
 clean: clean-kmode clean-user
 install:       install-Filesystem SyscallList install-user install-kmode
 
-utest: $(USRLIBS:%=utest-%)
+utest-build: $(USRLIBS:%=utest-build-%)
+utest-run: $(USRLIBS:%=utest-run-%)
+utest: utest-build utest-run
 
-$(USRLIBS:%=utest-%): utest-%:
+utest-build-%:
        @CC=$(NCC) $(SUBMAKE) -C Usermode/Libraries/$*_src generate_exp
-       @CC=$(NCC) $(SUBMAKE) -C Usermode/Libraries/$*_src utest -k
+       @CC=$(NCC) $(SUBMAKE) -C Usermode/Libraries/$*_src utest-build
+utest-run-%:
+       @CC=$(NCC) $(SUBMAKE) -C Usermode/Libraries/$*_src utest-run -k
 
 # TODO: Module tests using DiskTool and NetTest
-mtest: mtest-Network
+mtest: mtest-build mtest-run
        @echo > /dev/null
-
-mtest-Network:
-       @$(SUBMAKE) -C Tools/nativelib
-       @$(SUBMAKE) -C Tools/NetTest
-       @$(SUBMAKE) -C Tools/NetTest_Runner
+mtest-build:
+       # Network
+       @CC=$(NCC) $(SUBMAKE) -C Tools/nativelib
+       @CC=$(NCC) $(SUBMAKE) -C Tools/NetTest
+       @CC=$(NCC) $(SUBMAKE) -C Tools/NetTest_Runner
+mtest-run:
+       @echo "=== Network Module Test ==="
        @cd Tools && ./nettest_runner
 
 SyscallList: include/syscalls.h
index 5317079..5c796c3 100644 (file)
@@ -42,8 +42,9 @@ all: _libs $(_BIN) $(_XBIN)
 
 .PHONY: _libs
 
+.PRECIOUS: .no
 
-HEADERS := $(patsubst include_exp/%,../../include/%,$(shell find include_exp/ -name \*.h))
+HEADERS := $(patsubst include_exp/%,../../include/%,$(shell find include_exp/ -name \*.h 2>/dev/null))
 _libs: $(HEADERS)
 
 ../../include/%: include_exp/%
@@ -58,6 +59,7 @@ generate_exp: $(UTESTS:%=EXP_%.txt)
        @echo > /dev/null
 
 utest-build: $(UTESTS:%=TEST_%)
+       @echo > /dev/null
 
 utest-run: $(UTESTS:%=runtest-%)
        @echo > /dev/null
index 25a5c56..09a7c8f 100644 (file)
@@ -8,7 +8,7 @@
 
 BIN = $(OUTPUTDIR)Libs/acess.ld
 
-.PHONY: all clean install utest generate_exp
+.PHONY: all clean install utest utest-build utest-run generate_exp
 
 all: $(BIN)
 
@@ -18,7 +18,7 @@ clean:
 install: $(BIN)
 
 # How does one unit test a linker script?
-utest generate_exp:
+utest generate_exp utest-build utest-run:
        @echo > /dev/null
 
 $(BIN):        acess_$(ARCHDIR).ld.h
index 7ddc5f4..3c20896 100644 (file)
@@ -6,7 +6,7 @@
 
 BIN = $(OUTPUTDIR)Libs/crt0.o $(OUTPUTDIR)Libs/crtbegin.o $(OUTPUTDIR)Libs/crtend.o
 
-.PHONY: all clean install utest generate_exp
+.PHONY: all clean install utest utest-build generate_exp
 
 all: $(BIN)
 
@@ -16,7 +16,7 @@ clean:
        $(RM) $(BIN)
 
 # Disabled unit tests
-utest generate_exp:
+utest generate_exp utest-build utest-run:
        @echo > /dev/null
 
 $(OUTPUTDIR)Libs/%.o: %.c

UCC git Repository :: git.ucc.asn.au