$(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
.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 \
@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 \
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
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_$*"