From 9847824b38e1725b8fafaed25b5dab132bbe9179 Mon Sep 17 00:00:00 2001 From: Guido Draheim Date: Mon, 7 Aug 2006 23:39:02 +0000 Subject: [PATCH] automate cf builds (.) --- Makefile.mk | 55 ++++++++++++++++++++++--- configure | 68 +++++++------------------------ m4/ax_enable_builddir_uname.m4 | 73 +++++++++------------------------- test/Makefile.am | 2 +- test/Makefile.in | 2 +- 5 files changed, 84 insertions(+), 116 deletions(-) diff --git a/Makefile.mk b/Makefile.mk index f500722..084c042 100644 --- a/Makefile.mk +++ b/Makefile.mk @@ -1,3 +1,4 @@ +PUB=pub/ auto: aclocal && autoconf && autoheader && automake @@ -17,12 +18,56 @@ rpm: dist-bzip $(PACKAGE).spec rpmbuild -ta $(PACKAGE)-$(VERSION).tar.bz2 dist-bzip : dist-bzip2 - $(MAKE) dist-bzip-done -dist-bzip-done dist-done : - cp */$(PACKAGE)-$(VERSION).tar.bz2 . + $(MAKE) dist-bzip2-done +dist-bzip2-done dist-done : + test -d $(PUB) || mkdir $(PUB) + @ echo cp $(BUILD)/$(PACKAGE)-$(VERSION).tar.bz2 $(PUB). \ + ; cp $(BUILD)/$(PACKAGE)-$(VERSION).tar.bz2 $(PUB). +snapshot: + $(MAKE) dist-bzip2 VERSION=`date +%Y.%m%d` +distclean-done: + - rm -r *.d configsub : cp ../savannah.config/config.guess uses/config.guess cp ../savannah.config/config.sub uses/config.sub -cf: - scp $(PACKAGE)-$(VERSION).tar.bz2 cf-shell.sf.net: + +cf = $(cf_fedora) +cf_debian = x86-linux1 +cf_fedora = x86-linux2 +cf_freebsd = x86-freebsd1 +cf_netbsd = x86-netbsd1 +cf_openbsd = x86-openbsd1 +cf_amd64 = amd64-linux1 +cf_alpha = usf-cf-alpha-linux-1 +cf_powermac = ppc-osx3 +cf_powerpc = openpower-linux1 +cf_sparc = sparc-solaris1 +cf_solaris = x86-solaris1 +cf_all = $(cf_debian) $(cf_fedora) $(cf_freebsd) $(cf_netbsd) $(cf_openbsd) \ + $(cf_amd64) $(cf_alpha) $(cf_powerpc) $(cf_sparc) $(cf_solaris) \ + $(cf_powermac) +cf : cf-upload cf-system-all +cf-upload: ; scp $(PUB)$(PACKAGE)-$(VERSION).tar.bz2 cf-shell.sf.net: +cf-unpack: ; ssh cf-shell.sf.net \ + "ssh $(cf) 'tar xjvf $(PACKAGE)-$(VERSION).tar.bz2'" +cf-configure: ; ssh cf-shell.sf.net \ + "ssh $(cf) 'uname -msr; cd $(PACKAGE)-$(VERSION) && sh configure'" +cf-build: ; ssh cf-shell.sf.net \ + "ssh $(cf) 'uname -msr; cd $(PACKAGE)-$(VERSION) && make'" +cf-check: ; ssh cf-shell.sf.net \ + "ssh $(cf) 'uname -msr; cd $(PACKAGE)-$(VERSION) && make check'" +cf-system: ; ssh cf-shell.sf.net \ + "ssh $(cf) 'uname -msr | sed s,^,====$(cf)====,'" +cf-configure-all: + @ for cf in $(cf_all) ; do echo $(MAKE) cf-configure cf=$$cf \ + ; sleep 1; $(MAKE) cf-configure cf=$$cf ; done +cf-build-all: + @ for cf in $(cf_all) ; do echo $(MAKE) cf-build cf=$$cf \ + ; sleep 1; $(MAKE) cf-build cf=$$cf ; done +cf-check-all: + @ for cf in $(cf_all) ; do echo $(MAKE) cf-check cf=$$cf \ + ; sleep 1; $(MAKE) cf-check cf=$$cf ; done +cf-system-all: + @ for cf in $(cf_all) ; do echo $(MAKE) cf-configure cf=$$cf \ + ; sleep 1 ; $(MAKE) cf-system cf=$$cf ; done diff --git a/configure b/configure index 0cd6293..a31235f 100755 --- a/configure +++ b/configure @@ -1651,7 +1651,7 @@ echo "$as_me: toplevel srcdir already configured... skipping subdir build" >&6;} else test ".$ax_enable_builddir" = "." && ax_enable_builddir="." test ".$ax_enable_builddir" = ".no" && ax_enable_builddir="." - test ".$BUILD" = "." && BUILD=`uname -mn | sed -e "s| |_|g"` + test ".$BUILD" = "." && BUILD=`uname -msr | tr " /" "__"`.d test ".$ax_enable_builddir" = ".yes" && ax_enable_builddir="$BUILD" if test ".$ax_enable_builddir" != ".." ; then # we know where to go and { if $as_mkdir_p; then @@ -25219,22 +25219,9 @@ echo "$as_me: skipping top_srcdir/Makefile - left untouched" >&6;} echo "$as_me: skipping top_srcdir/Makefile - not created" >&6;} fi else - if test -f "$ac_top_srcdir/Makefile" ; then - a=`grep "^VERSION " "$ac_top_srcdir/Makefile"` ; b=`grep "^VERSION " Makefile` - test "$a" != "$b" && rm "$ac_top_srcdir/Makefile" - fi - if test -f "$ac_top_srcdir/Makefile" ; then - echo "$ac_top_srcdir/Makefile : $ac_top_srcdir/Makefile.in" > $tmp/conftemp.mk - echo " @ echo 'REMOVED,,,' >\$@" >> $tmp/conftemp.mk - eval "${MAKE-make} -f $tmp/conftemp.mk 2>/dev/null >/dev/null" - if grep '^REMOVED,,,' "$ac_top_srcdir/Makefile" >/dev/null - then rm $ac_top_srcdir/Makefile ; fi - cp $tmp/conftemp.mk $ac_top_srcdir/makefiles.mk~ ## DEBUGGING - fi - if test ! -f "$ac_top_srcdir/Makefile" ; then - { echo "$as_me:$LINENO: create top_srcdir/Makefile guessed from local Makefile" >&5 + { echo "$as_me:$LINENO: create top_srcdir/Makefile guessed from local Makefile" >&5 echo "$as_me: create top_srcdir/Makefile guessed from local Makefile" >&6;} - x='`' ; cat >$tmp/conftemp.sed <<_EOF + x='`' ; cat >$tmp/conftemp.sed <<_EOF /^\$/n x /^\$/bS @@ -25260,46 +25247,19 @@ s/:.*/:/ /:\$/s/ / /g /^.*[=]/!s%\$% ; (cd \$(BUILD) \\&\\& \$(ISNOTSRCDIR) \\&\\& \$(MAKE) "\$\@") || exit ; \$(MAKE) done "RULE=\$\@"% _EOF - cp "$tmp/conftemp.sed" "$ac_top_srcdir/makefile.sed~" ## DEBUGGING - echo 'BUILD=`uname -mn | sed -e "s| |_|g"`' >$ac_top_srcdir/Makefile - echo 'ISNOTSRCDIR=test ! -f configure' >>$ac_top_srcdir/Makefile - $ax_enable_builddir_sed -f $tmp/conftemp.sed Makefile >>$ac_top_srcdir/Makefile - echo 'done: ;@ if grep "$(RULE)-done .*:" Makefile > /dev/null; then echo $(MAKE) $(RULE)-done ; $(MAKE) $(RULE)-done ; else true ; fi' >> $ac_top_srcdir/Makefile - if test -f "$ac_top_srcdir/Makefile.mk" ; then - { echo "$as_me:$LINENO: extend top_srcdir/Makefile with top_srcdir/Makefile.mk" >&5 + test ".$USE_MAINTAINER_MODE" = ".no" || \ + cp "$tmp/conftemp.sed" "$ac_top_srcdir/makefile.sed~" ## DEBUGGING + echo 'BUILD=`uname -msr | tr " /" "__"`.d' >$ac_top_srcdir/Makefile + echo 'ISNOTSRCDIR=test ! -f configure' >>$ac_top_srcdir/Makefile + $ax_enable_builddir_sed -f $tmp/conftemp.sed Makefile >>$ac_top_srcdir/Makefile + echo 'done: ;@ if grep "$(RULE)-done .*:" Makefile > /dev/null; then echo $(MAKE) $(RULE)-done ; $(MAKE) $(RULE)-done ; else true ; fi' >> $ac_top_srcdir/Makefile + if test -f "$ac_top_srcdir/Makefile.mk" ; then + { echo "$as_me:$LINENO: extend top_srcdir/Makefile with top_srcdir/Makefile.mk" >&5 echo "$as_me: extend top_srcdir/Makefile with top_srcdir/Makefile.mk" >&6;} - cat $ac_top_srcdir/Makefile.mk >>$ac_top_srcdir/Makefile - fi ; xxxx="####" - echo "$xxxx CONFIGURATIONS FOR TOPLEVEL MAKEFILE: " >>$ac_top_srcdir/Makefile - # sanity check - if grep '^; echo "MAKE ' $ac_top_srcdir/Makefile >/dev/null ; then - { echo "$as_me:$LINENO: buggy sed found - it deletes tab in \"a\" text parts" >&5 -echo "$as_me: buggy sed found - it deletes tab in \"a\" text parts" >&6;} - $ax_enable_builddir_sed -e '/^@ HOST=/s/^/ /' -e '/^; /s/^/ /' $ac_top_srcdir/Makefile \ - >$ac_top_srcdir/Makefile~ - (test -s $ac_top_srcdir/Makefile~ && mv $ac_top_srcdir/Makefile~ $ac_top_srcdir/Makefile) 2>/dev/null - fi - else - xxxx="\\#\\#\\#\\#" - # echo "/^$xxxx *$ax_enable_builddir_host /d" >$tmp/conftemp.sed - echo "s!^$xxxx [^|]* | *$ax_enable_builddir *\$!$xxxx ...... $ax_enable_builddir!" >$tmp/conftemp.sed - $ax_enable_builddir_sed -f "$tmp/conftemp.sed" "$ac_top_srcdir/Makefile" >$tmp/mkfile.tmp - cp "$tmp/conftemp.sed" "$ac_top_srcdir/makefiles.sed~" ## DEBUGGING - cp "$tmp/mkfile.tmp" "$ac_top_srcdir/makefiles.out~" ## DEBUGGING - if cmp -s "$ac_top_srcdir/Makefile" "$tmp/mkfile.tmp" 2>/dev/null ; then - { echo "$as_me:$LINENO: keeping top_srcdir/Makefile from earlier configure" >&5 -echo "$as_me: keeping top_srcdir/Makefile from earlier configure" >&6;} - rm "$tmp/mkfile.tmp" - else - { echo "$as_me:$LINENO: reusing top_srcdir/Makefile from earlier configure" >&5 -echo "$as_me: reusing top_srcdir/Makefile from earlier configure" >&6;} - mv "$tmp/mkfile.tmp" "$ac_top_srcdir/Makefile" - fi + cat $ac_top_srcdir/Makefile.mk >>$ac_top_srcdir/Makefile fi - { echo "$as_me:$LINENO: build in $ax_enable_builddir (HOST=$ax_enable_builddir_host)" >&5 -echo "$as_me: build in $ax_enable_builddir (HOST=$ax_enable_builddir_host)" >&6;} - xxxx="####" - echo "$xxxx" "$ax_enable_builddir_host" "|$ax_enable_builddir" >>$ac_top_srcdir/Makefile + { echo "$as_me:$LINENO: make uses BUILD=$ax_enable_builddir (on $ax_enable_builddir_host:)" >&5 +echo "$as_me: make uses BUILD=$ax_enable_builddir (on $ax_enable_builddir_host:)" >&6;} fi ;; depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do diff --git a/m4/ax_enable_builddir_uname.m4 b/m4/ax_enable_builddir_uname.m4 index 492e19e..4e795fc 100644 --- a/m4/ax_enable_builddir_uname.m4 +++ b/m4/ax_enable_builddir_uname.m4 @@ -7,7 +7,7 @@ dnl into a separate builddir. dnl dnl Defaults: dnl -dnl $1 = $build (defaults to `uname -mn`) +dnl $1 = $build (defaults to `uname -msr`.d) dnl $2 = Makefile.mk dnl $3 = -all dnl @@ -18,7 +18,7 @@ dnl found in the created toplevel builddir Makefile. It just copies the dnl variables and rule-targets, each extended with a default dnl rule-execution that recurses into the build directory of the dnl current "BUILD". You can override the auto-dection through -dnl `uname -mn | sed -e "s| |_|g"` at build-time of course, as in +dnl `uname -msr | tr " /" "__"`.d at build-time of course, as in dnl dnl make BUILD=i386-mingw-cross dnl @@ -58,7 +58,7 @@ if test ".$srcdir" = ".." ; then else test ".$SUB" = "." && SUB="." test ".$SUB" = ".no" && SUB="." - test ".$BUILD" = "." && BUILD=`uname -mn | sed -e "s| |_|g"` + test ".$BUILD" = "." && BUILD=`uname -msr | tr " /" "__"`.d test ".$SUB" = ".yes" && SUB="m4_ifval([$1], [$1],[$BUILD])" if test ".$SUB" != ".." ; then # we know where to go and AS_MKDIR_P([$SUB]) @@ -103,21 +103,8 @@ pushdef([END],[Makefile.mk])dnl AC_MSG_NOTICE([skipping TOP/Makefile - not created]) fi else - if test -f "$SRC/Makefile" ; then - a=`grep "^VERSION " "$SRC/Makefile"` ; b=`grep "^VERSION " Makefile` - test "$a" != "$b" && rm "$SRC/Makefile" - fi - if test -f "$SRC/Makefile" ; then - echo "$SRC/Makefile : $SRC/Makefile.in" > $tmp/conftemp.mk - echo " []@ echo 'REMOVED,,,' >\$[]@" >> $tmp/conftemp.mk - eval "${MAKE-make} -f $tmp/conftemp.mk 2>/dev/null >/dev/null" - if grep '^REMOVED,,,' "$SRC/Makefile" >/dev/null - then rm $SRC/Makefile ; fi - cp $tmp/conftemp.mk $SRC/makefiles.mk~ ## DEBUGGING - fi - if test ! -f "$SRC/Makefile" ; then - AC_MSG_NOTICE([create TOP/Makefile guessed from local Makefile]) - x='`' ; cat >$tmp/conftemp.sed <<_EOF + AC_MSG_NOTICE([create TOP/Makefile guessed from local Makefile]) + x='`' ; cat >$tmp/conftemp.sed <<_EOF /^\$/n x /^\$/bS @@ -143,43 +130,19 @@ s/:.*/:/ /:\$/s/ / /g /^.*[[=]]/!s%\$% ; (cd \$(BUILD) \\&\\& \$(ISNOTSRCDIR) \\&\\& \$(MAKE) "\$\@") || exit ; \$(MAKE) done "RULE=\$\@"% _EOF - cp "$tmp/conftemp.sed" "$SRC/makefile.sed~" ## DEBUGGING - echo 'BUILD=`uname -mn | sed -e "s| |_|g"`' >$SRC/Makefile - echo 'ISNOTSRCDIR=test ! -f configure' >>$SRC/Makefile - $SED -f $tmp/conftemp.sed Makefile >>$SRC/Makefile - echo 'done: ;@ if grep "$(RULE)-done .*:" Makefile > /dev/null; then dnl - echo $(MAKE) $(RULE)-done ; $(MAKE) $(RULE)-done ; else true ; fi' dnl - >> $SRC/Makefile - if test -f "$SRC/m4_ifval([$2],[$2],[END])" ; then - AC_MSG_NOTICE([extend TOP/Makefile with TOP/m4_ifval([$2],[$2],[END])]) - cat $SRC/END >>$SRC/Makefile - fi ; xxxx="####" - echo "$xxxx CONFIGURATIONS FOR TOPLEVEL MAKEFILE: " >>$SRC/Makefile - # sanity check - if grep '^; echo "MAKE ' $SRC/Makefile >/dev/null ; then - AC_MSG_NOTICE([buggy sed found - it deletes tab in "a" text parts]) - $SED -e '/^@ HOST=/s/^/ /' -e '/^; /s/^/ /' $SRC/Makefile \ - >$SRC/Makefile~ - (test -s $SRC/Makefile~ && mv $SRC/Makefile~ $SRC/Makefile) 2>/dev/null - fi - else - xxxx="\\#\\#\\#\\#" - # echo "/^$xxxx *$ax_enable_builddir_host /d" >$tmp/conftemp.sed - echo "s!^$xxxx [[^|]]* | *$SUB *\$!$xxxx ...... $SUB!" >$tmp/conftemp.sed - $SED -f "$tmp/conftemp.sed" "$SRC/Makefile" >$tmp/mkfile.tmp - cp "$tmp/conftemp.sed" "$SRC/makefiles.sed~" ## DEBUGGING - cp "$tmp/mkfile.tmp" "$SRC/makefiles.out~" ## DEBUGGING - if cmp -s "$SRC/Makefile" "$tmp/mkfile.tmp" 2>/dev/null ; then - AC_MSG_NOTICE([keeping TOP/Makefile from earlier configure]) - rm "$tmp/mkfile.tmp" - else - AC_MSG_NOTICE([reusing TOP/Makefile from earlier configure]) - mv "$tmp/mkfile.tmp" "$SRC/Makefile" - fi - fi - AC_MSG_NOTICE([build in $SUB (HOST=$ax_enable_builddir_host)]) - xxxx="####" - echo "$xxxx" "$ax_enable_builddir_host" "|$SUB" >>$SRC/Makefile + test ".$USE_MAINTAINER_MODE" = ".no" || \ + cp "$tmp/conftemp.sed" "$SRC/makefile.sed~" ## DEBUGGING + echo 'BUILD=`uname -msr | tr " /" "__"`.d' >$SRC/Makefile + echo 'ISNOTSRCDIR=test ! -f configure' >>$SRC/Makefile + $SED -f $tmp/conftemp.sed Makefile >>$SRC/Makefile + echo 'done: ;@ if grep "$(RULE)-done .*:" Makefile > /dev/null; then dnl + echo $(MAKE) $(RULE)-done ; $(MAKE) $(RULE)-done ; else true ; fi' dnl + >> $SRC/Makefile + if test -f "$SRC/m4_ifval([$2],[$2],[END])" ; then + AC_MSG_NOTICE([extend TOP/Makefile with TOP/m4_ifval([$2],[$2],[END])]) + cat $SRC/END >>$SRC/Makefile + fi + AC_MSG_NOTICE([make uses BUILD=$SUB (on $ax_enable_builddir_host:)]) fi popdef([END])dnl AS_VAR_POPDEF([SED])dnl diff --git a/test/Makefile.am b/test/Makefile.am index e3133e1..3819524 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -20,7 +20,7 @@ $(zzcat) $(zzdir) $(zziptest) $(zzxorcat) $(zzxordir) $(xorcopy) : \ # ------------------------------------------------------------------- NULL=/dev/null README = $(top_srcdir)/README -testdatadir = $(top_srcdir)/test.tmp +testdatadir = $(top_srcdir)/testdata.d testzip testzips : test.zip test1.zip test2.zip test3.zip diff --git a/test/Makefile.in b/test/Makefile.in index 9784e45..996f9df 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -238,7 +238,7 @@ zzxorcopy = ../bins/zzxorcopy$(EXEEXT) # ------------------------------------------------------------------- NULL = /dev/null README = $(top_srcdir)/README -testdatadir = $(top_srcdir)/test.tmp +testdatadir = $(top_srcdir)/testdata.d # ------------------------------------------------------------------- stdtests = @ZIPTESTS@ check-test0 check-test1 check-zzdir check-zzcat -- 2.40.0