From 031222f07c4ac6549cfdcb0667114ba5476bbbaf Mon Sep 17 00:00:00 2001 From: Adam Megacz Date: Tue, 1 May 2012 16:10:50 -0700 Subject: [PATCH 1/1] switch gcclass and classgen from darcs to git --- Makefile | 6 +++--- upstream/Makefile | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0b0944a..7c7692b 100644 --- a/Makefile +++ b/Makefile @@ -106,7 +106,7 @@ build/org/ibex/nestedvm/util/.Dummy.class: $(java_classes): build/org/ibex/nestedvm/util/.Dummy.class endif -$(java_classes): $(java_sources) $(tasks)/build_darcs_classgen +$(java_classes): $(java_sources) $(tasks)/build_git_classgen $(JAVAC) -classpath "$(classpath)" -d build $(java_sources) # GCJ Stuff @@ -235,7 +235,7 @@ nestedvm.jar: $(java_classes) .manifest .gcclass_hints: $(java_sources) sed -n 's/.*GCCLASS_HINT: \([^ ]*\) \([^ ]*\).*/hint:\1:\2/p' $(java_sources) > $@ -compact_runtime_compiler.jar: $(java_classes) .manifest $(tasks)/build_darcs_gcclass .gcclass_hints +compact_runtime_compiler.jar: $(java_classes) .manifest $(tasks)/build_git_gcclass .gcclass_hints mkdir -p tmp/pruned rm -rf tmp/pruned/* $(JAVA) -cp \ @@ -408,7 +408,7 @@ ntlmtest: build/tests/NtlmAuth.class @test -e smb.conf || cp upstream/build/samba/examples/smb.conf.default smb.conf $(JAVA) -cp "$(classpath)" tests.NtlmAuth --username=brian --password=test --diagnostics -d 5 -ntlmauth.jar: build/tests/NtlmAuth.class $(tasks)/build_darcs_gcclass .gcclass_hints +ntlmauth.jar: build/tests/NtlmAuth.class $(tasks)/build_git_gcclass .gcclass_hints mkdir -p tmp/pruned rm -rf tmp/pruned/* java -cp \ diff --git a/upstream/Makefile b/upstream/Makefile index 43f14a7..bc22067 100644 --- a/upstream/Makefile +++ b/upstream/Makefile @@ -32,6 +32,8 @@ tasks/everything: \ darcs_gcclass = http://gcclass.ibex.org/ darcs_classgen = http://classgen.ibex.org/ +git_gcclass = http://gcclass.ibex.org/.git/ +git_classgen = http://classgen.ibex.org/.git/ cross_root := $(usr)/mips-unknown-elf .SECONDARY: # This is broken in gmake < 3.79.1 @@ -100,6 +102,30 @@ tasks/build_darcs_%: tasks/extract_darcs_% cd "build/$*" && $(MAKE) touch $@ +tasks/extract_git_%: + if [ -e $@ ]; then echo "Error: $@ exists. something isn't right"; false; else true; fi + mkdir -p build + if [ -z "$(git_$*)" ]; then echo "No git url for $*" >&2; false; fi + if [ -d "$(root)/.git" ]; then \ + cd build && git clone "$(git_$*)" "$*"; \ + else \ + mkdir -p "build/" && cd "build/"; \ + git clone $(darcs_$*) $*; \ + fi + touch $@ + +update_git_%: tasks/extract_git_% + if [ -d "build/$*/.git" ]; then \ + cd "build/$*" && git fetch; \ + else \ + cd "build/$*" && git clone $(git_$*); \ + fi + rm -f "tasks/build_git_$*" # to force a rebuild + +tasks/build_git_%: tasks/extract_git_% + cd "build/$*" && $(MAKE) + touch $@ + clean_%: rm -rf "build/$(*)"* rm -f "tasks/build_$*" "tasks/patch_$*" "tasks/extract_$*" -- 1.7.10.4