switch gcclass and classgen from darcs to git
[nestedvm.git] / upstream / Makefile
index 3549e76..bc22067 100644 (file)
@@ -30,8 +30,10 @@ tasks/everything: \
        tasks/build_linpack \
 
 
-darcs_gcclass = http://darcs.brianweb.net/gcclass
-darcs_classgen = http://darcs.brianweb.net/classgen
+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
 
@@ -64,7 +66,7 @@ $(top_lev_stuff):
 tasks/download_%:
        if [ -z "$(url_$*)" ]; then echo "No url for $*" >&2; false; fi
        mkdir -p download
-       cd download && curl -O $(url_$*)
+       cd download && curl -LO $(url_$*)
        touch $@
 
 tasks/extract_%: tasks/download_%
@@ -83,8 +85,8 @@ tasks/extract_darcs_%:
        if [ -d "$(root)/_darcs" ]; then \
                cd build && darcs get --repo-name="$*" --verbose "$(darcs_$*)"; \
        else \
-               mkdir -p "build/$*" && cd "build/$*"; \
-               darcs get $(darcs_$*); \
+               mkdir -p "build/" && cd "build/"; \
+               darcs get --repo-name=$* $(darcs_$*); \
        fi
        touch $@
 
@@ -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_$*"
@@ -132,7 +158,7 @@ url_gcc-core = http://mirrors.kernel.org/gnu/gcc/gcc-$(version_gcc)/gcc-core-$(v
 url_gcc-c++ = http://mirrors.kernel.org/gnu/gcc/gcc-$(version_gcc)/gcc-g++-$(version_gcc).tar.gz
 url_gcc-g77 = http://mirrors.kernel.org/gnu/gcc/gcc-$(version_gcc)/gcc-g77-$(version_gcc).tar.gz
 
-patches_gcc = gcc-fixes.patch gcc-fdata-sections-bss.patch gcc-64bitclean.patch
+patches_gcc = gcc-fixes.patch gcc-fdata-sections-bss.patch gcc-64bitclean.patch gcc-with-newer-version.patch
 
 configure_gcc = --target=mips-unknown-elf --disable-threads --with-gnu-ld --with-gnu-as --with-newlib=yes --enable-sjlj-exceptions --enable-languages="c"
 configure_gcc_step2 = $(configure_gcc) --enable-languages="c,c++,f77"
@@ -211,7 +237,7 @@ tasks/build_newlib: tasks/build_gcc
 
 ## openbsdglob ##############################################################################
 
-url_openbsdglob = http://www.brianweb.net/xwt/openbsdglob.tar.gz
+url_openbsdglob = http://nestedvm.ibex.org/upstream/openbsdglob.tar.gz
 
 tasks/build_openbsdglob: tasks/download_openbsdglob tasks/build_newlib
        @mkdir -p $(usr)/mips-unknown-elf/{include,lib}
@@ -228,7 +254,7 @@ tasks/build_openbsdglob: tasks/download_openbsdglob tasks/build_newlib
 
 ## regex ##############################################################################
 
-url_regex = http://arglist.com/regex/regex3.8a.tar.gz
+url_regex = http://www.arglist.com/regex/files/regex3.8a.tar.gz
 
 tasks/build_regex: tasks/download_regex tasks/build_newlib
        @mkdir -p $(usr)/mips-unknown-elf/{include,lib}
@@ -312,7 +338,7 @@ tasks/build_linker: tasks/build_binutils $(root)/src/org/ibex/nestedvm/linker.ld
 
 ## libjpeg ##############################################################################
 
-version_libjpeg = 6b
+version_libjpeg = 7
 url_libjpeg = http://www.ijg.org/files/jpegsrc.v$(version_libjpeg).tar.gz
 
 tasks/extract_libjpeg: tasks/download_libjpeg
@@ -326,7 +352,7 @@ tasks/extract_libjpeg: tasks/download_libjpeg
 
 tasks/build_libjpeg: tasks/patch_libjpeg tasks/build_libc
        cd build/libjpeg-$(version_libjpeg) && \
-               ./configure && \
+               ./configure --host=mips && \
                make CC="mips-unknown-elf-gcc" \
                        AR="mips-unknown-elf-ar rc" \
                        AR2="mips-unknown-elf-ranlib" \
@@ -377,7 +403,7 @@ tasks/build_freetype: tasks/patch_freetype tasks/build_libc
 
 version_boehmgc = 6.3alpha2
 #url_boehmgc = http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc$(version_boehmgc).tar.gz
-url_boehmgc = http://www.brianweb.net/misc/gc$(version_boehmgc).tar.gz
+url_boehmgc = http://nestedvm.ibex.org/upstream/gc$(version_boehmgc).tar.gz
 patches_boehmgc = boehm-gc.patch
 
 tasks/extract_boehmgc: tasks/download_boehmgc
@@ -401,15 +427,15 @@ tasks/build_boehmgc: tasks/patch_boehmgc tasks/build_libc
 
 ## busybox ##############################################################################
 
-version_busybox = 1.00
-url_busybox = http://busybox.net/downloads/busybox-$(version_busybox).tar.gz
+version_busybox = 1.00-pre9
+url_busybox = http://www.busybox.net/downloads/legacy/busybox-$(version_busybox).tar.gz
 patches_busybox = busybox.patch
 
 tasks/build_busybox: tasks/patch_busybox tasks/build_libc
        cd build && \
                rm -f busybox && \
                ln -s busybox-$(version_busybox) busybox
-       cd build/busybox && $(MAKE) CC=mips-unknown-elf-gcc LDFLAGS="$(MIPS_LDFLAGS)" CFLAGS_EXTRA="$(MIPS_CFLAGS) -DNESTEDVM -g"
+       cd build/busybox && yes | $(MAKE) LDFLAGS="$(MIPS_LDFLAGS)" CFLAGS_EXTRA="$(MIPS_CFLAGS) -DNESTEDVM -g"
        touch $@
 
 ## tex ##############################################################################