summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-14 03:01:42 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-14 03:01:42 +0000
commita91845f5b3ec726e08501cc6597c1788b223cd41 (patch)
treeef980d69d01037963dc54a49776acf7389f62e04
parent0d8df8889342b3d235ffcea209beea5032c9a711 (diff)
* configure.in (gnumake): check for GNU make.
* Makefile.in (uncommon.mk): includes filtered common.mk. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--Makefile.in5
-rw-r--r--configure.in37
-rw-r--r--cygwin/GNUmakefile.in1
-rw-r--r--djgpp/GNUmakefile.in1
5 files changed, 44 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index ad92199..92e728f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 ab3fa69..fc723b6 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 1ad99ca..a6b11f7 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 7995f31..f688349 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 0a7e1fb..b11e7fd 100644
--- a/djgpp/GNUmakefile.in
+++ b/djgpp/GNUmakefile.in
@@ -1,2 +1,3 @@
include Makefile
VPATH = $(srcdir) $(srcdir)/missing
+include uncommon.mk