This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Forwarded message from Manfred Hollstein ("PATCH to pre-select languages to be build (was: Re: No Fortran - IS ANYBODY WORKING ON IT?)")


Forgot to cc: egcs-patches :-(



On Wed, 16 September 1998, 08:39:53, manfred@s-direktnet.de wrote:

 > On Tue, 15 September 1998, 02:10:15, law@cygnus.com wrote:
 > 
 >  > 
 >  > This kind of scheme works better if we ever have an option to
 >  > enable/disable a language at configure time.  ie --disable-chill
 >  > or something like that to disable the chill compiler, even if
 >  > it is in your source tree  and you don't remember LANGUAGES="..." :-)
 > 
 > Is anybody working on this already? I'd like to implement this as I've
 > stumbled across this especially on my damn slow  68k machine (which is
 > - even worse  - using multilibs  :-(  ); but unfortunately  I'm rather
 > busy doing other things at the moment, I  guess I'll be having a patch
 > available in 1 to 2 weeks. OK?
 > 
 > manfred

The  approach you were talking about  assumes,  everybody who wants to
restrict the languages to a particular subset

  - knows which languages do exist and which do I want.

My patch below goes the other way round. It's  based on the assumption
that most people

  - know which languages they actually want to build.

If the "--disable-chill"  would have been  available before the recent
languages had been introduced, all users, that only  wanted "c c++" to
be  built, would  still  get the  new  compilers,  simply because they
didn't know such a beast exists.

With my patch applied, you can do things like this:

  $ env ... [LANGUAGES="c c++"] ../egcs-src/configure \
	[--enable-languages="c c++"] ...

(You can use an environment  variable $LANGUAGES, or define the subset
via  --enable-languages="..." -  the --enable-l...  argument overrules
$LANGUAGES).

Then you can build as usual:

  $ make bootstrap

which  will only build  the C  and  C++ related compilers and  runtime
libs.  BUT,   you  can  still build  everything   else  by  passing  a
particular LANGUAGES="..."  argument to make:

  $ make bootstrap LANGUAGES="c f77"

will ensure, your build  contains everything for C  and F77 (since you
didn't call "make  clean" in between, it  actually still contains  the
C++ related stuff).

I think this approach is much more flexible than defining at configure
time "which languages do I want?".

Is this, what you can live with?

Another thing  which should be  fixed: currently "make  check" ignores
any  definition of LANGUAGES; on  my Motorola machines I restrict them
to "c  c++" due to the  slow machines.  Unfortunately, the "check-..."
targets    don't consider if they    actually  can do anything useful,
e.g. if "cc1plus" doesn't exist, don't even try to start "runtest"; in
my example, the check-f77 causes me one  additional *hour* of checking
on the dog slow m68k box :-( I'll be sending a patch for this, too.

manfred

1998-09-29  Manfred Hollstein  <manfred@s-direktnet.de>

	* configure (enable_languages): New variable; emit its value
	into the generated toplevel Makefile.

	* Makefile.in ($(ALL_MODULES)): Descent into language specific
	sub-directories only if $(LANGUAGES) contain the appropriate
	identifier.
	($(NATIVE_CHECK_MODULES)): Likewise.
	($(CROSS_CHECK_MODULES)): Likewise.
	($(INSTALL_MODULES)): Likewise.
	($(CONFIGURE_TARGET_MODULES)): Likewise.
	($(ALL_TARGET_MODULES)): Likewise.
	($(CHECK_TARGET_MODULES)): Likewise.
	($(INSTALL_TARGET_MODULES)): Likewise.

diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-19980929.orig/Makefile.in egcs-19980929/Makefile.in
--- egcs-19980929.orig/Makefile.in	Fri Sep 25 12:11:08 1998
+++ egcs-19980929/Makefile.in	Tue Sep 29 13:25:11 1998
@@ -1067,11 +1067,35 @@ gcc-no-fixedincludes:
 .PHONY: $(ALL_MODULES) all-gui all-libproc
 $(ALL_MODULES) all-gui all-libproc:
 	@dir=`echo $@ | sed -e 's/all-//'`; \
-	if [ -f ./$${dir}/Makefile ] ; then \
-	  r=`pwd`; export r; \
-	  s=`cd $(srcdir); pwd`; export s; \
-	  $(SET_LIB_PATH) \
-	  (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
+	case "$${dir}:$(LANGUAGES)" in \
+	  "libchill:"*"CHILL"*	| \
+	  "libf2c:"*"f77"*	| \
+	  "libio:"*"c++"*	| \
+	  "libstdc++:"*"c++"*	| \
+	  "libg++:"*"c++"*	| \
+	  "librx:"*"c++"*	| \
+	  "libobjc:"*"objc"* ) \
+	    do_action=yes ;; \
+	  "libchill:"*		| \
+	  "libf2c:"*		| \
+	  "libio:"*		| \
+	  "libstdc++:"*		| \
+	  "libg++:"*		| \
+	  "librx:"*		| \
+	  "libobjc:"*	 ) \
+	    do_action=no ;; \
+	  * ) \
+	    do_action=yes ;; \
+	esac; \
+	if [ $${do_action} = yes ]; then \
+	  if [ -f ./$${dir}/Makefile ] ; then \
+	    r=`pwd`; export r; \
+	    s=`cd $(srcdir); pwd`; export s; \
+	    $(SET_LIB_PATH) \
+	    (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
+	  else \
+	    true; \
+	  fi; \
 	else \
 	  true; \
 	fi
@@ -1084,6 +1108,63 @@ $(ALL_MODULES) all-gui all-libproc:
 $(NATIVE_CHECK_MODULES):
 	@if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
 	  dir=`echo $@ | sed -e 's/check-//'`; \
+	  case "$${dir}:$(LANGUAGES)" in \
+	    "libchill:"*"CHILL"*	| \
+	    "libf2c:"*"f77"*	| \
+	    "libio:"*"c++"*	| \
+	    "libstdc++:"*"c++"*	| \
+	    "libg++:"*"c++"*	| \
+	    "librx:"*"c++"*	| \
+	    "libobjc:"*"objc"* ) \
+	      do_action=yes ;; \
+	    "libchill:"*	| \
+	    "libf2c:"*		| \
+	    "libio:"*		| \
+	    "libstdc++:"*	| \
+	    "libg++:"*		| \
+	    "librx:"*		| \
+	    "libobjc:"*	 ) \
+	      do_action=no ;; \
+	    * ) \
+	      do_action=yes ;; \
+	  esac; \
+	  if [ $${do_action} = yes ]; then \
+	    if [ -f ./$${dir}/Makefile ] ; then \
+	      r=`pwd`; export r; \
+	      s=`cd $(srcdir); pwd`; export s; \
+	      $(SET_LIB_PATH) \
+	      (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
+	    else \
+	      true; \
+	    fi; \
+	  else \
+	    true; \
+	  fi; \
+	fi
+
+$(CROSS_CHECK_MODULES):
+	@dir=`echo $@ | sed -e 's/check-//'`; \
+	case "$${dir}:$(LANGUAGES)" in \
+	  "libchill:"*"CHILL"*	| \
+	  "libf2c:"*"f77"*	| \
+	  "libio:"*"c++"*	| \
+	  "libstdc++:"*"c++"*	| \
+	  "libg++:"*"c++"*	| \
+	  "librx:"*"c++"*	| \
+	  "libobjc:"*"objc"* ) \
+	    do_action=yes ;; \
+	  "libchill:"*		| \
+	  "libf2c:"*		| \
+	  "libio:"*		| \
+	  "libstdc++:"*		| \
+	  "libg++:"*		| \
+	  "librx:"*		| \
+	  "libobjc:"*	 ) \
+	    do_action=no ;; \
+	  * ) \
+	    do_action=yes ;; \
+	esac; \
+	if [ $${do_action} = yes ]; then \
 	  if [ -f ./$${dir}/Makefile ] ; then \
 	    r=`pwd`; export r; \
 	    s=`cd $(srcdir); pwd`; export s; \
@@ -1092,15 +1173,6 @@ $(NATIVE_CHECK_MODULES):
 	  else \
 	    true; \
 	  fi; \
-	fi
-
-$(CROSS_CHECK_MODULES):
-	@dir=`echo $@ | sed -e 's/check-//'`; \
-	if [ -f ./$${dir}/Makefile ] ; then \
-	  r=`pwd`; export r; \
-	  s=`cd $(srcdir); pwd`; export s; \
-	  $(SET_LIB_PATH) \
-	  (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
 	else \
 	  true; \
 	fi
@@ -1110,11 +1182,35 @@ $(CROSS_CHECK_MODULES):
 .PHONY: $(INSTALL_MODULES)
 $(INSTALL_MODULES): installdirs
 	@dir=`echo $@ | sed -e 's/install-//'`; \
-	if [ -f ./$${dir}/Makefile ] ; then \
-	  r=`pwd`; export r; \
-	  s=`cd $(srcdir); pwd`; export s; \
-	  $(SET_LIB_PATH) \
-	  (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
+	case "$${dir}:$(LANGUAGES)" in \
+	  "libchill:"*"CHILL"*	| \
+	  "libf2c:"*"f77"*	| \
+	  "libio:"*"c++"*	| \
+	  "libstdc++:"*"c++"*	| \
+	  "libg++:"*"c++"*	| \
+	  "librx:"*"c++"*	| \
+	  "libobjc:"*"objc"* ) \
+	    do_action=yes ;; \
+	  "libchill:"*		| \
+	  "libf2c:"*		| \
+	  "libio:"*		| \
+	  "libstdc++:"*		| \
+	  "libg++:"*		| \
+	  "librx:"*		| \
+	  "libobjc:"*	 ) \
+	    do_action=no ;; \
+	  * ) \
+	    do_action=yes ;; \
+	esac; \
+	if [ $${do_action} = yes ]; then \
+	  if [ -f ./$${dir}/Makefile ] ; then \
+	    r=`pwd`; export r; \
+	    s=`cd $(srcdir); pwd`; export s; \
+	    $(SET_LIB_PATH) \
+	    (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
+	  else \
+	    true; \
+	  fi; \
 	else \
 	  true; \
 	fi
@@ -1124,91 +1220,139 @@ $(INSTALL_MODULES): installdirs
 .PHONY: $(CONFIGURE_TARGET_MODULES)
 $(CONFIGURE_TARGET_MODULES):
 	@dir=`echo $@ | sed -e 's/configure-target-//'`; \
-	if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
-	  r=`pwd`; export r; \
-	  $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
-	  if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
-	    if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
-	      if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
-		rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
+	case "$${dir}:$(LANGUAGES)" in \
+	  "libchill:"*"CHILL"*	| \
+	  "libf2c:"*"f77"*	| \
+	  "libio:"*"c++"*	| \
+	  "libstdc++:"*"c++"*	| \
+	  "libg++:"*"c++"*	| \
+	  "librx:"*"c++"*	| \
+	  "libobjc:"*"objc"* ) \
+	    do_action=yes ;; \
+	  "libchill:"*		| \
+	  "libf2c:"*		| \
+	  "libio:"*		| \
+	  "libstdc++:"*		| \
+	  "libg++:"*		| \
+	  "librx:"*		| \
+	  "libobjc:"*	 ) \
+	    do_action=no ;; \
+	  * ) \
+	    do_action=yes ;; \
+	esac; \
+	if [ $${do_action} = yes ]; then \
+	  if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
+	    r=`pwd`; export r; \
+	    $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
+	    if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
+	      if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
+		if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
+		  rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
+		else \
+		  echo "Multilibs changed for $${dir}, reconfiguring"; \
+		  rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
+		  mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
+		fi; \
 	      else \
-		echo "Multilibs changed for $${dir}, reconfiguring"; \
-		rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
 		mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
 	      fi; \
-	    else \
-	      mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
 	    fi; \
 	  fi; \
+	else \
+	  true; \
 	fi; exit 0	# break command into two pieces
 	@dir=`echo $@ | sed -e 's/configure-target-//'`; \
-	if [ ! -d $(TARGET_SUBDIR) ]; then \
-	  true; \
-	elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
-	  true; \
-	elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
-	  if [ -d $(srcdir)/$${dir} ]; then \
-	    [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
-	    r=`pwd`; export r; \
-	    s=`cd $(srcdir); pwd`; export s; \
-	    $(SET_LIB_PATH) \
-	    AR="$(AR_FOR_TARGET)"; export AR; \
-	    AS="$(AS_FOR_TARGET)"; export AS; \
-	    CC="$(CC_FOR_TARGET)"; export CC; \
-	    CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
-	    CXX="$(CXX_FOR_TARGET)"; export CXX; \
-	    CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
-	    DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
-	    LD="$(LD_FOR_TARGET)"; export LD; \
-            LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
-	    NM="$(NM_FOR_TARGET)"; export NM; \
-	    RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
-	    WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
-	    echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
-	    cd $(TARGET_SUBDIR)/$${dir}; \
-	    case $(srcdir) in \
-	    /*) \
-	      topdir=$(srcdir) ;; \
-	    *) \
-	      case "$(TARGET_SUBDIR)" in \
-	      .) topdir="../$(srcdir)" ;; \
-	      *) topdir="../../$(srcdir)" ;; \
-	      esac ;; \
-	    esac; \
-	    if [ "$(srcdir)" = "." ] ; then \
-	      if [ "$(TARGET_SUBDIR)" != "." ] ; then \
-		if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
-		  if [ -f Makefile ]; then \
-		    if $(MAKE) distclean; then \
-		      true; \
+	case "$${dir}:$(LANGUAGES)" in \
+	  "libchill:"*"CHILL"*	| \
+	  "libf2c:"*"f77"*	| \
+	  "libio:"*"c++"*	| \
+	  "libstdc++:"*"c++"*	| \
+	  "libg++:"*"c++"*	| \
+	  "librx:"*"c++"*	| \
+	  "libobjc:"*"objc"* ) \
+	    do_action=yes ;; \
+	  "libchill:"*		| \
+	  "libf2c:"*		| \
+	  "libio:"*		| \
+	  "libstdc++:"*		| \
+	  "libg++:"*		| \
+	  "librx:"*		| \
+	  "libobjc:"*	 ) \
+	    do_action=no ;; \
+	  * ) \
+	    do_action=yes ;; \
+	esac; \
+	if [ $${do_action} = yes ]; then \
+	  if [ ! -d $(TARGET_SUBDIR) ]; then \
+	    true; \
+	  elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
+	    true; \
+	  elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
+	    if [ -d $(srcdir)/$${dir} ]; then \
+	      [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
+	      r=`pwd`; export r; \
+	      s=`cd $(srcdir); pwd`; export s; \
+	      $(SET_LIB_PATH) \
+	      AR="$(AR_FOR_TARGET)"; export AR; \
+	      AS="$(AS_FOR_TARGET)"; export AS; \
+	      CC="$(CC_FOR_TARGET)"; export CC; \
+	      CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+	      CXX="$(CXX_FOR_TARGET)"; export CXX; \
+	      CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+	      DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
+	      LD="$(LD_FOR_TARGET)"; export LD; \
+	      LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
+	      NM="$(NM_FOR_TARGET)"; export NM; \
+	      RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
+	      WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+	      echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
+	      cd $(TARGET_SUBDIR)/$${dir}; \
+	      case $(srcdir) in \
+	      /*) \
+		topdir=$(srcdir) ;; \
+	      *) \
+		case "$(TARGET_SUBDIR)" in \
+		.) topdir="../$(srcdir)" ;; \
+		*) topdir="../../$(srcdir)" ;; \
+		esac ;; \
+	      esac; \
+	      if [ "$(srcdir)" = "." ] ; then \
+		if [ "$(TARGET_SUBDIR)" != "." ] ; then \
+		  if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
+		    if [ -f Makefile ]; then \
+		      if $(MAKE) distclean; then \
+			true; \
+		      else \
+			exit 1; \
+		      fi; \
 		    else \
-		      exit 1; \
+		      true; \
 		    fi; \
 		  else \
-		    true; \
+		    exit 1; \
 		  fi; \
 		else \
-		  exit 1; \
+		  true; \
 		fi; \
+		srcdiroption="--srcdir=."; \
+		libsrcdir="."; \
 	      else \
-		true; \
+		srcdiroption="--srcdir=$${topdir}/$${dir}"; \
+		libsrcdir="$$s/$${dir}"; \
+	      fi; \
+	      if [ -f $${libsrcdir}/configure ] ; then \
+		rm -f no-such-file; \
+		CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+		  $(CONFIG_ARGUMENTS) $${srcdiroption} \
+		  --with-target-subdir="$(TARGET_SUBDIR)"; \
+	      else \
+		rm -f no-such-file; \
+		CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
+		  $(CONFIG_ARGUMENTS) $${srcdiroption} \
+		  --with-target-subdir="$(TARGET_SUBDIR)"; \
 	      fi; \
-	      srcdiroption="--srcdir=."; \
-	      libsrcdir="."; \
-	    else \
-	      srcdiroption="--srcdir=$${topdir}/$${dir}"; \
-	      libsrcdir="$$s/$${dir}"; \
-	    fi; \
-	    if [ -f $${libsrcdir}/configure ] ; then \
-	      rm -f no-such-file; \
-	      CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
-		$(CONFIG_ARGUMENTS) $${srcdiroption} \
-		--with-target-subdir="$(TARGET_SUBDIR)"; \
 	    else \
-	      rm -f no-such-file; \
-	      CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
-		$(CONFIG_ARGUMENTS) $${srcdiroption} \
-		--with-target-subdir="$(TARGET_SUBDIR)"; \
+	      true; \
 	    fi; \
 	  else \
 	    true; \
@@ -1222,11 +1366,35 @@ $(CONFIGURE_TARGET_MODULES):
 .PHONY: $(ALL_TARGET_MODULES)
 $(ALL_TARGET_MODULES):
 	@dir=`echo $@ | sed -e 's/all-target-//'`; \
-	if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
-	  r=`pwd`; export r; \
-	  s=`cd $(srcdir); pwd`; export s; \
-	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
+	case "$${dir}:$(LANGUAGES)" in \
+	  "libchill:"*"CHILL"*	| \
+	  "libf2c:"*"f77"*	| \
+	  "libio:"*"c++"*	| \
+	  "libstdc++:"*"c++"*	| \
+	  "libg++:"*"c++"*	| \
+	  "librx:"*"c++"*	| \
+	  "libobjc:"*"objc"* ) \
+	    do_action=yes ;; \
+	  "libchill:"*		| \
+	  "libf2c:"*		| \
+	  "libio:"*		| \
+	  "libstdc++:"*		| \
+	  "libg++:"*		| \
+	  "librx:"*		| \
+	  "libobjc:"*	 ) \
+	    do_action=no ;; \
+	  * ) \
+	    do_action=yes ;; \
+	esac; \
+	if [ $${do_action} = yes ]; then \
+	  if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
+	    r=`pwd`; export r; \
+	    s=`cd $(srcdir); pwd`; export s; \
+	    $(SET_LIB_PATH) \
+	    (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
+	  else \
+	    true; \
+	  fi; \
 	else \
 	  true; \
 	fi
@@ -1236,11 +1404,35 @@ $(ALL_TARGET_MODULES):
 .PHONY: $(CHECK_TARGET_MODULES)
 $(CHECK_TARGET_MODULES):
 	@dir=`echo $@ | sed -e 's/check-target-//'`; \
-	if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
-	  r=`pwd`; export r; \
-	  s=`cd $(srcdir); pwd`; export s; \
-	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
+	case "$${dir}:$(LANGUAGES)" in \
+	  "libchill:"*"CHILL"*	| \
+	  "libf2c:"*"f77"*	| \
+	  "libio:"*"c++"*	| \
+	  "libstdc++:"*"c++"*	| \
+	  "libg++:"*"c++"*	| \
+	  "librx:"*"c++"*	| \
+	  "libobjc:"*"objc"* ) \
+	    do_action=yes ;; \
+	  "libchill:"*		| \
+	  "libf2c:"*		| \
+	  "libio:"*		| \
+	  "libstdc++:"*		| \
+	  "libg++:"*		| \
+	  "librx:"*		| \
+	  "libobjc:"*	 ) \
+	    do_action=no ;; \
+	  * ) \
+	    do_action=yes ;; \
+	esac; \
+	if [ $${do_action} = yes ]; then \
+	  if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
+	    r=`pwd`; export r; \
+	    s=`cd $(srcdir); pwd`; export s; \
+	    $(SET_LIB_PATH) \
+	    (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
+	  else \
+	    true; \
+	  fi; \
 	else \
 	  true; \
 	fi
@@ -1251,12 +1443,36 @@ $(CHECK_TARGET_MODULES):
 .PHONY: $(INSTALL_TARGET_MODULES)
 $(INSTALL_TARGET_MODULES): installdirs
 	@dir=`echo $@ | sed -e 's/install-target-//'`; \
-	if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
-	  r=`pwd`; export r; \
-	  s=`cd $(srcdir); pwd`; export s; \
-	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/$${dir}; \
-	    $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
+	case "$${dir}:$(LANGUAGES)" in \
+	  "libchill:"*"CHILL"*	| \
+	  "libf2c:"*"f77"*	| \
+	  "libio:"*"c++"*	| \
+	  "libstdc++:"*"c++"*	| \
+	  "libg++:"*"c++"*	| \
+	  "librx:"*"c++"*	| \
+	  "libobjc:"*"objc"* ) \
+	    do_action=yes ;; \
+	  "libchill:"*		| \
+	  "libf2c:"*		| \
+	  "libio:"*		| \
+	  "libstdc++:"*		| \
+	  "libg++:"*		| \
+	  "librx:"*		| \
+	  "libobjc:"*	 ) \
+	    do_action=no ;; \
+	  * ) \
+	    do_action=yes ;; \
+	esac; \
+	if [ $${do_action} = yes ]; then \
+	  if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
+	    r=`pwd`; export r; \
+	    s=`cd $(srcdir); pwd`; export s; \
+	    $(SET_LIB_PATH) \
+	    (cd $(TARGET_SUBDIR)/$${dir}; \
+	      $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
+	  else \
+	    true; \
+	  fi; \
 	else \
 	  true; \
 	fi
diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-19980929.orig/configure egcs-19980929/configure
--- egcs-19980929.orig/configure	Tue Sep 29 11:10:55 1998
+++ egcs-19980929/configure	Tue Sep 29 15:16:02 1998
@@ -825,6 +825,12 @@ do
   test -n "$DEFAULT_LEX" && break
 done
 
+# Look if the user specified --enable-languages="..."; if not, use
+# the environment variable $LANGUAGES if defined.
+if test "${enable_languages+set}" != set && test "${LANGUAGES+set}" = set; then
+	enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
+fi
+
 if [ "${build}" != "${host}" ]; then
   # If we are doing a Canadian Cross, in which the host and build systems
   # are not the same, we set reasonable default values for the tools.
@@ -1214,6 +1220,14 @@ build_os = ${build_os}
 build_canonical = ${build_cpu}-${build_vendor}-${build_os}
 EOF
 	    esac
+
+	    # Generate the appropriate default list of languages the user
+	    # "normally" intends to build.
+	    # If the user did not specify anything, we don't emit anything
+	    # here, which means "default to build all available languages".
+	    if test "${subdir}/" = "./" && test "${enable_languages+set}" = set; then
+	        echo "LANGUAGES = `echo ${enable_languages} | tr ',' ' '`" >> ${Makefile}
+	    fi
 
             case "${package_makefile_frag}" in
               "") ;;



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]