Makefile: move tmp files to bin/
authorNiki Roo <roo.niki@gmail.com>
Thu, 24 Mar 2016 18:41:12 +0000 (19:41 +0100)
committerNiki Roo <roo.niki@gmail.com>
Thu, 24 Mar 2016 18:41:12 +0000 (19:41 +0100)
Makefile

index 961520a02725ee1260ac6f11c25069c1091ff6ec..009247227462df20a40d7953a3ae40d0fb98efc3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -27,42 +27,45 @@ mrpropre: clean
        @rm -f jvcard.jar jvcard-`grep "APPLICATION_VERSION" src/be/nikiroo/jvcard/launcher/Main.java | cut -d'"' -f2`.jar
 
 jvcard.jar: bin/be/nikiroo/jvcard/*/* bin/be/nikiroo/jvcard/*
+       @mkdir -p bin/
        @echo 'Main-Class: be.nikiroo.jvcard.launcher.Main' > bin/manifest
        @echo >> bin/manifest
        @echo Creating jar file jvcard-`grep "APPLICATION_VERSION" src/be/nikiroo/jvcard/launcher/Main.java | cut -d'"' -f2`.jar...
-       @cd bin && find . | grep -v './[0-9]' | grep -v './manifest' | grep -v './lanterna' | jar -m manifest -cf ../jvcard-`grep "APPLICATION_VERSION" ../src/be/nikiroo/jvcard/launcher/Main.java | cut -d'"' -f2`.jar -@
+       jar -m bin/manifest -cf jvcard-`grep "APPLICATION_VERSION" src/be/nikiroo/jvcard/launcher/Main.java | cut -d'"' -f2`.jar -C bin/ be -C bin/ com
        @rm bin/manifest
        @echo Copying to jvcard.jar...
        @cp jvcard-`grep "APPLICATION_VERSION" src/be/nikiroo/jvcard/launcher/Main.java | cut -d'"' -f2`.jar jvcard.jar
 
-bin/5: lanterna files
+bin/5: lanterna bin/files
        @echo Compiling in Java 1.5 mode "('make bin/5')"...
-       javac -cp bin/ -encoding UTF-8 -Xlint -source 5 @files -d bin/
+       javac -cp bin/ -encoding UTF-8 -Xlint -source 5 @bin/files -d bin/
        @rm -f bin/[0-9]
        @touch bin/5
 
-bin/6: lanterna files
+bin/6: lanterna bin/files
        @echo Compiling in Java 1.6 mode "('make bin/6')"...
-       javac -cp bin/ -encoding UTF-8 -Xlint -source 6 @files -d bin/
+       javac -cp bin/ -encoding UTF-8 -Xlint -source 6 @bin/files -d bin/
        @rm -f bin/[0-9]
        @touch bin/6
 
-bin/7: lanterna files
+bin/7: lanterna bin/files
        @echo Compiling in Java 1.7 mode "('make bin/7')"...
-       javac -cp bin/ -encoding UTF-8 -Xlint -source 7 @files -d bin/
+       javac -cp bin/ -encoding UTF-8 -Xlint -source 7 @bin/files -d bin/
        @rm -f bin/[0-9]
        @touch bin/7
 
-bin/8: lanterna files
+bin/8: lanterna bin/files
        @echo Compiling in Java 1.8 mode "('make bin/8')"...
-       javac -cp bin/ -encoding UTF-8 -Xlint -source 8 @files -d bin/
+       javac -cp bin/ -encoding UTF-8 -Xlint -source 8 @bin/files -d bin/
        @rm -f bin/[0-9]
        @touch bin/8
 
-files: src/be/nikiroo/jvcard/*/* src/be/nikiroo/jvcard/*
-       @find src/be/ -name '*.java' > files
+bin/files: src/be/nikiroo/jvcard/*/* src/be/nikiroo/jvcard/*
+       @mkdir -p bin/
+       @find src/be/ -name '*.java' > bin/files
 
 bin/lanterna:
+       @mkdir -p bin/
        @find src/com/ -name '*.java' > bin/lanterna
        javac -encoding UTF-8 -source 5 @lanterna -d bin/ || rm bin/lanterna
        @test -e bin/lanterna