From: Kern Sibbald Date: Sun, 11 Jan 2009 11:25:05 +0000 (+0000) Subject: Attempt to explicitly call gmake when needed, or if not found X-Git-Tag: Release-7.0.0~3476 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=821b2c7622b5878dd8fa6d698761b2094016a308;p=bacula%2Fbacula Attempt to explicitly call gmake when needed, or if not found skip the calls. This should fix the FreeBSD regression/build. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8353 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/Makefile.in b/bacula/Makefile.in index 476fdf5004..f53148cf68 100755 --- a/bacula/Makefile.in +++ b/bacula/Makefile.in @@ -193,9 +193,6 @@ Makefiles: clean: @for I in ${all_subdirs} ; \ do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done - @if test `make --version | head -n1 | cut -c1-3` = "GNU" ; then \ - (cd src/win32; ${MAKE} clean) \ - fi @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1) @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum @$(RMF) examples/1 examples/2 examples/devices/1 examples/devices/2 diff --git a/bacula/autoconf/Make.common.in b/bacula/autoconf/Make.common.in index ea9310c77b..7276e34bbc 100644 --- a/bacula/autoconf/Make.common.in +++ b/bacula/autoconf/Make.common.in @@ -49,6 +49,7 @@ ECHO = @ECHO@ CMP = @CMP@ TBL = @TBL@ AR = @AR@ +GMAKE = @GMAKE@ RANLIB = @RANLIB@ MKDIR = @BUILD_DIR@/autoconf/mkinstalldirs INSTALL = @INSTALL@ diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 827d20c87e..4bb7e07335 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -93,6 +93,7 @@ AC_PATH_PROG(DVDRWFORMAT, dvd+rw-format, dvd+rw-format) AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config) AC_PATH_PROG(QMAKE, qmake, none) AC_PATH_PROG(QMAKEQT4, qmake-qt4, none) +AC_PATH_PROG(GMAKE, gmake, none) AC_ARG_VAR(WXCONFIG, [wx-config command. On some systems, you must set it to wx-config-2.6 to use wxWidgets 2.6.]) if test "x$WXCONFIG" = x; then WXCONFIG=wx-config diff --git a/bacula/configure b/bacula/configure index b3ec94abe1..6ed1ee9080 100755 --- a/bacula/configure +++ b/bacula/configure @@ -846,6 +846,7 @@ DVDRWFORMAT PKGCONFIG QMAKE QMAKEQT4 +GMAKE WXCONFIG WXFLAGS CDRECORD @@ -5096,6 +5097,47 @@ echo "${ECHO_T}no" >&6; } fi +# Extract the first word of "gmake", so it can be a program name with args. +set dummy gmake; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_GMAKE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GMAKE in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GMAKE="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GMAKE" && ac_cv_path_GMAKE="none" + ;; +esac +fi +GMAKE=$ac_cv_path_GMAKE +if test -n "$GMAKE"; then + { echo "$as_me:$LINENO: result: $GMAKE" >&5 +echo "${ECHO_T}$GMAKE" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$WXCONFIG" = x; then WXCONFIG=wx-config @@ -5946,13 +5988,13 @@ if test "${lt_cv_nm_interface+set}" = set; then else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5949: $ac_compile\"" >&5) + (eval echo "\"\$as_me:5991: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5952: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:5994: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5955: output\"" >&5) + (eval echo "\"\$as_me:5997: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -7173,7 +7215,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7176 "configure"' > conftest.$ac_ext + echo '#line 7218 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9388,11 +9430,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9391: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9433: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9395: \$? = $ac_status" >&5 + echo "$as_me:9437: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9727,11 +9769,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9730: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9772: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9734: \$? = $ac_status" >&5 + echo "$as_me:9776: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9832,11 +9874,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9835: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9877: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9839: \$? = $ac_status" >&5 + echo "$as_me:9881: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9887,11 +9929,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9890: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9932: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9894: \$? = $ac_status" >&5 + echo "$as_me:9936: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12643,7 +12685,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12646 "configure" +#line 12688 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12739,7 +12781,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12742 "configure" +#line 12784 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14751,11 +14793,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14754: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14796: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14758: \$? = $ac_status" >&5 + echo "$as_me:14800: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14850,11 +14892,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14853: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14895: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14857: \$? = $ac_status" >&5 + echo "$as_me:14899: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14902,11 +14944,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14905: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14947: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14909: \$? = $ac_status" >&5 + echo "$as_me:14951: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -43032,6 +43074,7 @@ DVDRWFORMAT!$DVDRWFORMAT$ac_delim PKGCONFIG!$PKGCONFIG$ac_delim QMAKE!$QMAKE$ac_delim QMAKEQT4!$QMAKEQT4$ac_delim +GMAKE!$GMAKE$ac_delim WXCONFIG!$WXCONFIG$ac_delim WXFLAGS!$WXFLAGS$ac_delim CDRECORD!$CDRECORD$ac_delim @@ -43041,7 +43084,6 @@ ARFLAGS!$ARFLAGS$ac_delim MAKE_SHELL!$MAKE_SHELL$ac_delim LOCAL_LIBS!$LOCAL_LIBS$ac_delim LOCAL_CFLAGS!$LOCAL_CFLAGS$ac_delim -LOCAL_LDFLAGS!$LOCAL_LDFLAGS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 94; then @@ -43087,6 +43129,7 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +LOCAL_LDFLAGS!$LOCAL_LDFLAGS$ac_delim LOCAL_DEFS!$LOCAL_DEFS$ac_delim LIBTOOL!$LIBTOOL$ac_delim build!$build$ac_delim @@ -43183,7 +43226,6 @@ GNOME_LIBS!$GNOME_LIBS$ac_delim GNOME_DIR!$GNOME_DIR$ac_delim BAT_DIR!$BAT_DIR$ac_delim QWT_INC!$QWT_INC$ac_delim -QWT_LDFLAGS!$QWT_LDFLAGS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -43225,6 +43267,7 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +QWT_LDFLAGS!$QWT_LDFLAGS$ac_delim QWT_LIB!$QWT_LIB$ac_delim QWT!$QWT$ac_delim WXCONS_CPPFLAGS!$WXCONS_CPPFLAGS$ac_delim @@ -43319,7 +43362,7 @@ DISTVER!$DISTVER$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 92; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 93; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/bacula/src/filed/Makefile.in b/bacula/src/filed/Makefile.in index 44ea26276b..27bb660a48 100644 --- a/bacula/src/filed/Makefile.in +++ b/bacula/src/filed/Makefile.in @@ -59,20 +59,28 @@ all: Makefile @WIN32@ bacula-fd @STATIC_FD@ @echo " " win32/winlib.a: - (cd win32; $(MAKE) DESTDIR=$(DESTDIR)) + @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \ + (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \ + fi @rm -f bacula-fd.exe win32/winmain.o: - (cd win32; $(MAKE) DESTDIR=$(DESTDIR)) + @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \ + (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \ + fi @rm -f bacula-fd.exe win32/winres.res: - (cd win32; $(MAKE) DESTDIR=$(DESTDIR)) + @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \ + (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \ + fi @rm -f bacula-fd.exe # win32 libraries if needed win32: $(WIN32OBJS) - (cd win32; $(MAKE) DESTDIR=$(DESTDIR)) + @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \ + (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \ + fi @rm -f bacula-fd.exe bacula-fd: Makefile $(SVROBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) @WIN32@ @@ -97,8 +105,8 @@ libtool-clean: clean: @LIBTOOL_CLEAN_TARGET@ @$(RMF) bacula-fd filed core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3 @$(RMF) static-bacula-fd - if test -f win32/Makefile; then \ - (cd win32; $(MAKE) clean); \ + @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \ + (cd win32; $(GMAKE) clean); \ fi realclean: clean @@ -107,15 +115,15 @@ realclean: clean distclean: realclean if test $(srcdir) = .; then $(MAKE) realclean; fi (cd $(srcdir); $(RMF) Makefile) - if test -f win32/Makefile; then \ - (cd win32; $(MAKE) distclean); \ + @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \ + (cd win32; $(GMAKE) distclean); \ fi devclean: realclean if test $(srcdir) = .; then $(MAKE) realclean; fi (cd $(srcdir); $(RMF) Makefile) - if test -f win32/Makefile; then \ - (cd win32; $(MAKE) devclean); \ + @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \ + (cd win32; $(GMAKE) devclean); \ fi install: all diff --git a/bacula/src/findlib/Makefile.in b/bacula/src/findlib/Makefile.in index c8bbc9e438..59e027bba6 100644 --- a/bacula/src/findlib/Makefile.in +++ b/bacula/src/findlib/Makefile.in @@ -87,15 +87,15 @@ install: @LIBTOOL_INSTALL_TARGET@ @INCLUDE_INSTALL_TARGET@ uninstall: @LIBTOOL_UNINSTALL_TARGET@ @INCLUDE_UNINSTALL_TARGET@ libtool-clean: - find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF) - $(RMF) *.la - $(RMF) -r .libs _libs + @find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF) + @$(RMF) *.la + @$(RMF) -r .libs _libs clean: @LIBTOOL_CLEAN_TARGET@ - $(RMF) find core a.out *.o *.bak *~ *.intpro *.extpro 1 2 3 + @$(RMF) find core a.out *.o *.bak *~ *.intpro *.extpro 1 2 3 realclean: clean - $(RMF) tags + @$(RMF) tags distclean: realclean if test $(srcdir) = .; then $(MAKE) realclean; fi diff --git a/bacula/src/lib/Makefile.in b/bacula/src/lib/Makefile.in index 9c3be8dea5..68009e8d82 100644 --- a/bacula/src/lib/Makefile.in +++ b/bacula/src/lib/Makefile.in @@ -202,16 +202,16 @@ install: @LIBTOOL_INSTALL_TARGET@ @INCLUDE_INSTALL_TARGET@ uninstall: @LIBTOOL_UNINSTALL_TARGET@ @INCLUDE_UNINSTALL_TARGET@ libtool-clean: - find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF) - $(RMF) *.la - $(RMF) -r .libs _libs + @find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF) + @$(RMF) *.la + @$(RMF) -r .libs _libs clean: @LIBTOOL_CLEAN_TARGET@ - $(RMF) core a.out *.o *.bak *.tex *.pdf *~ *.intpro *.extpro 1 2 3 - $(RMF) rwlock_test md5sum sha1sum + @$(RMF) core a.out *.o *.bak *.tex *.pdf *~ *.intpro *.extpro 1 2 3 + @$(RMF) rwlock_test md5sum sha1sum realclean: clean - $(RMF) tags + @$(RMF) tags distclean: realclean if test $(srcdir) = .; then $(MAKE) realclean; fi diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index f5c18951e6..07d307404b 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -10,6 +10,9 @@ filepattern (restore with regex in bsr) mixed priorities General: +11Jan09 +kes Attempt to explicitly call gmake when needed, or if not found + skip the calls. This should fix the FreeBSD regression/build. 10Jan09 kes Fix bat.pro.in so that bat will install. 09Jan09