X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=blobdiff_plain;f=Makefile.common;h=c777d9d4ad6634a4d99e7b4c94eae86c6ea9e231;hp=d7275b8ab69b34163f9301c4613674b316e529e6;hb=870d6acd4d14fe474454fe4e07d01233a490c49f;hpb=b745128f20b0405cff433a66ccb44445b3feb9c8 diff --git a/Makefile.common b/Makefile.common index d7275b8..c777d9d 100644 --- a/Makefile.common +++ b/Makefile.common @@ -9,17 +9,16 @@ realdefault: default ### interproject deps ############################################################# cmd := find src -name \*.java -exec grep '^import org.ibex.' {} \; -cmd += | sed 's_import org\.ibex\.\([a-z]*\).*_ src/org/ibex/\1\n_' +cmd += | sed 's_import org\.ibex\.\([a-z]*\).*_ repo/\1.ibex.org/\n_' cmd += | sort | uniq | (while read A; do test -e $$A || echo $$A; done) $(eval upstream := $(shell $(cmd))) repos: $(upstream) repo/: ; mkdir repo repo/%.ibex.org/: repo/ - cd repo; darcs get --partial --verbose http://$*.ibex.org/ -src/org/ibex/%/: repo/%.ibex.org/ - cd repo/$*.ibex.org; darcs pull -a --verbose http://$*.ibex.org/ - cd src/org/ibex; ln -sf ../../../repo/$*.ibex.org/src $* + test -e $@ && (cd repo/$*.ibex.org; darcs pull -a --verbose http://$*.ibex.org/); true + test -e $@ || (cd repo; darcs get --partial --verbose http://$*.ibex.org/); true + test -e src/org/ibex/$* || (cd src/org/ibex; ln -sf ../../../repo/$*.ibex.org/src/org/ibex/$*); true ### cleanup targets ################################################################## @@ -33,10 +32,20 @@ dist-clean: ; rm -rf build .compile javac := javac java_sources := $(shell find src/org/ibex/*/ -name \*.java) +src/org/ibex/util/Preprocessor.java: repo/util.ibex.org/ +build/class/org/ibex/util/Preprocessor.class: src/org/ibex/util/Preprocessor.java + mkdir -p build/class/ + $(javac) -d build/class/ $< + +# HACK +java_sources_pp := $(filter-out src/org/ibex/net/ssl/RootCerts.java,$(java_sources)) compile: .compile -.compile: $(sources) +.compile: $(java_sources) build/class/org/ibex/util/Preprocessor.class make -s repos - $(javac) $(java_sources) + java -cp build/class org.ibex.util.Preprocessor $(java_sources_pp) + test -e src/org/ibex/net/ssl/RootCerts.java && \ + cp src/org/ibex/net/ssl/RootCerts.java build/java/org/ibex/net/ssl/RootCerts.java + $(javac) -d build/class $(java_sources:src/%.java=build/java/%.java) touch $@ @@ -54,6 +63,10 @@ propose-patch: commit: propose-patch darcs push xwt@xwt.org:/var/www/org/ibex/core/ +pull:; darcs pull cd repo; for A in *.ibex.org; do cd $$A; darcs pull http://$$A/; cd ..; done +whatsnew:; darcs whatsnew; true; cd repo; for A in *.ibex.org; do echo; echo $$A; cd $$A; darcs whatsnew; cd ..; done +record:; darcs record; cd repo; for A in *.ibex.org; do echo; echo $$A; cd $$A; darcs record; cd ..; done + ### documentation ##########################################################