CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
made some Makefile's test improvements (missing changed to Makefile)
authorJose V Beneyto <sepen@crux.nu>
Sat, 6 Mar 2010 10:09:50 +0000 (11:09 +0100)
committerJose V Beneyto <sepen@crux.nu>
Sat, 6 Mar 2010 10:09:50 +0000 (11:09 +0100)
Makefile

index 85ab9347d2dce73fe6fad0c4e8e45b55a66449eb..e4c8ad4c624c40a762b24476d758bc80707723c8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -243,28 +243,18 @@ gcc-final-distclean: gcc-final-clean
 
 
 # TEST THE TOOLCHAIN
-$(WORK)/build-test:
-       mkdir -p $(WORK)/build-test
-       touch $(WORK)/build-test
+$(WORK)/test: $(WORK)/test.c
+       export PATH=$$PATH:$(CROSSTOOLS)/bin
+       unset CFLAGS && unset CXXFLAGS && unset CC
+       AR=ar LDFLAGS="-Wl,-rpath,$(CROSSTOOLS)/lib" \
+       $(TARGET)-gcc -Wall -o test $(WORK)/test.c
+       [ "`file -b $(WORK)/test | cut -d',' -f2 | sed 's| ||g'`" = "ARM"  ] || exit 1
+       touch $(WORK)/test
 
-$(WORK)/build-test/hello.c: $(WORK)/build-test
-       echo '#include <stdio.h>' > $(WORK)/build-test/hello.c
-       echo 'int main(int argc,char ** argv){printf("Hello World!\n");return 0;}' >> $(WORK)/build-test/hello.c
-       touch $(WORK)/build-test/hello.c
-
-$(WORK)/build-test/hello: $(WORK)/build-test/hello.c
-       cd $(WORK)/build-test && \
-               export PATH=$$PATH:$(CROSSTOOLS)/bin && \
-               unset CFLAGS && unset CXXFLAGS && unset CC && \
-               AR=ar LDFLAGS="-Wl,-rpath,$(CROSSTOOLS)/lib" \
-               $(TARGET)-gcc -Wall -o hello hello.c
-       [ "`file -b $(WORK)/build-test/hello | cut -d',' -f2 | sed 's| ||g'`" = "ARM"  ] || exit 1
-       touch $(WORK)/build-test/hello
-
-test: gcc-final $(WORK)/build-test/hello
+test: gcc-final $(WORK)/test
 
 test-clean:
-       rm -vrf $(WORK)/build-test
+       rm -vrf $(WORK)/test
 
 test-distclean: test-clean