diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-14 03:01:42 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-14 03:01:42 +0000 |
commit | cbb1afe909ae4d626a44e59541894425eca2be8a (patch) | |
tree | ef980d69d01037963dc54a49776acf7389f62e04 | |
parent | 56d9aac2421b3e7e2fa107a6c51452f5c5c8dafe (diff) | |
download | ruby-cbb1afe909ae4d626a44e59541894425eca2be8a.tar.gz ruby-cbb1afe909ae4d626a44e59541894425eca2be8a.tar.xz ruby-cbb1afe909ae4d626a44e59541894425eca2be8a.zip |
* configure.in (gnumake): check for GNU make.
* Makefile.in (uncommon.mk): includes filtered common.mk.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Makefile.in | 5 | ||||
-rw-r--r-- | configure.in | 37 | ||||
-rw-r--r-- | cygwin/GNUmakefile.in | 1 | ||||
-rw-r--r-- | djgpp/GNUmakefile.in | 1 |
5 files changed, 44 insertions, 6 deletions
@@ -1,4 +1,8 @@ -Thu Aug 14 11:45:09 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> +Thu Aug 14 12:01:39 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * configure.in (gnumake): check for GNU make. + + * Makefile.in (uncommon.mk): includes filtered common.mk. * common.mk (parse.h): workaround for nmake. diff --git a/Makefile.in b/Makefile.in index ab3fa699c..fc723b6ea 100644 --- a/Makefile.in +++ b/Makefile.in @@ -158,7 +158,7 @@ fake.rb: Makefile Makefile: $(srcdir)/Makefile.in $(srcdir)/enc/Makefile.in -$(MKFILES): config.status $(srcdir)/common.mk +$(MKFILES): config.status MAKE=$(MAKE) $(SHELL) ./config.status @{ \ echo "all:; -@rm -f conftest.mk"; \ @@ -168,6 +168,9 @@ $(MKFILES): config.status $(srcdir)/common.mk $(MAKE) -f conftest.mk | grep '^AUTO_REMAKE$$' >/dev/null 2>&1 || \ { echo "Makefile updated, restart."; exit 1; } +uncommon.mk: $(srcdir)/common.mk + sed 's/{\$$([^(){}]*)[^{}]*}//g' $< > $@ + config.status: $(srcdir)/configure $(srcdir)/enc/Makefile.in MINIRUBY="$(MINIRUBY)" $(SHELL) ./config.status --recheck diff --git a/configure.in b/configure.in index 1ad99ca5e..a6b11f71d 100644 --- a/configure.in +++ b/configure.in @@ -1849,13 +1849,39 @@ case "$target_os" in esac MINIDLNOBJ=dmydln.o ;; + *msdosdjgpp*) + FIRSTMAKEFILE=GNUmakefile:djgpp/GNUmakefile.in + ;; *) ;; esac MINIOBJS="$MINIDLNOBJ" -case "$build_os" in - *msdosdjgpp*) FIRSTMAKEFILE=GNUmakefile:djgpp/GNUmakefile.in;; +case "$FIRSTMAKEFILE" in +dnl ( +*GNUmakefile:*) + gnumake=yes + ;; +dnl ( +*) + AC_MSG_CHECKING([for if ${MAKE-make} is GNU make]) + mkdir conftest.dir + echo "all:; @echo yes" > conftest.dir/GNUmakefile + echo "all:; @echo no" > conftest.dir/Makefile + gnumake=`(cd conftest.dir; ${MAKE-make})` + rm -fr conftest.dir + case "$gnumake" in + dnl ( + *yes*) + echo "include Makefile" > GNUmakefile + echo "include uncommon.mk" >> GNUmakefile + gnumake=yes;; + dnl ( + *) + gnumake=no;; + esac + AC_MSG_RESULT($gnumake) + ;; esac CPPFLAGS="$CPPFLAGS "'$(DEFS)' @@ -2069,7 +2095,10 @@ AC_CONFIG_FILES(Makefile, [{ sed '/^MISSING/s/\$U\././g' Makefile echo; test x"$EXEEXT" = x || echo 'miniruby: miniruby$(EXEEXT)' test "$RUBY_INSTALL_NAME$EXEEXT" = ruby || echo 'ruby: $(PROGRAM);' - sed ['s/{\$([^(){}]*)[^{}]*}//g'] ${srcdir}/common.mk + if test "$gnumake" != yes; then + echo ['$(MKFILES): $(srcdir)/common.mk'] + sed ['s/{\$([^(){}]*)[^{}]*}//g'] ${srcdir}/common.mk + fi } >> confmk$$.tmp && mv -f confmk$$.tmp Makefile], -[RUBY_INSTALL_NAME=$RUBY_INSTALL_NAME EXEEXT=$EXEEXT]) +[RUBY_INSTALL_NAME=$RUBY_INSTALL_NAME EXEEXT=$EXEEXT gnumake=$gnumake]) AC_OUTPUT diff --git a/cygwin/GNUmakefile.in b/cygwin/GNUmakefile.in index 7995f31cd..f6883492b 100644 --- a/cygwin/GNUmakefile.in +++ b/cygwin/GNUmakefile.in @@ -1,4 +1,5 @@ include Makefile +include uncommon.mk ENABLE_SHARED=@ENABLE_SHARED@ DLLWRAP = @DLLWRAP@ --target=@target_os@ diff --git a/djgpp/GNUmakefile.in b/djgpp/GNUmakefile.in index 0a7e1fb13..b11e7fdc3 100644 --- a/djgpp/GNUmakefile.in +++ b/djgpp/GNUmakefile.in @@ -1,2 +1,3 @@ include Makefile VPATH = $(srcdir) $(srcdir)/missing +include uncommon.mk |