Author: sebor
Date: Wed Sep 14 17:18:54 2005
New Revision: 280977
URL: http://svn.apache.org/viewcvs?rev=280977&view=rev
Log:
2005-09-14 Martin Sebor <[EMAIL PROTECTED]>
* GNUmakefile: Silenced the error output from the $(shell) function
when it fails to execute a command. See for details on how and why:
http://lists.gnu.org/archive/html/help-make/2005-09/msg00070.html
Checked BUILDTYPE and BUILDMODE only when TOPDIR is not defined,
i.e., only during the initial invocation of make, and avoided doing
so during recursive invocations since both variables are defined in
makefile.in.
Modified:
incubator/stdcxx/trunk/GNUmakefile
Modified: incubator/stdcxx/trunk/GNUmakefile
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/GNUmakefile?rev=280977&r1=280976&r2=280977&view=diff
==============================================================================
--- incubator/stdcxx/trunk/GNUmakefile (original)
+++ incubator/stdcxx/trunk/GNUmakefile Wed Sep 14 17:18:54 2005
@@ -230,38 +230,43 @@
############################################################################
# try to determine configuration (unless specified on the command line)
+ # invoke $(SHELL) from within the $(shell) function to silence shell
+ # any error messages when the compiler isn't found
ifeq ($(CONFIG),)
- ifeq ($(shell g++ -v >/dev/null 2>&1 && echo $$?),0)
+ ifeq ($(shell $(SHELL) -c "g++ -v" >/dev/null 2>&1 \
+ && echo $$?),0)
# use gcc on every OS by default
CONFIG = gcc.config
else
ifeq ($(OSNAME),AIX)
# check for VisualAge on AIX
- ifeq ($(shell xlC -qversion >/dev/null 2>&1 && echo $$?),0)
+ ifeq ($(shell $(SHELL) -c "xlC -qversion" >/dev/null 2>&1 \
+ && echo $$?),0)
CONFIG = vacpp.config
endif
else
ifeq ($(OSNAME),HP-UX)
# check for aCC on HP-UX
- ifeq ($(shell aCC -V >/dev/null 2>&1 && echo $$?),0)
+ ifeq ($(shell $(SHELL) -c "aCC -V" >/dev/null 2>&1 && echo $$?),0)
CONFIG = acc.config
endif
else
ifeq ($(OSNAME),IRIX64)
# check for MIPSpro on IRIX
- ifeq ($(shell CC -v >/dev/null 2>&1 && echo $$?),0)
+ ifeq ($(shell $(SHELL) -c "CC -v" >/dev/null 2>&1 && echo $$?),0)
CONFIG = mipspro.config
endif
else
ifeq ($(OSNAME),OSF1)
# check for Compaq C++ on Tru64 UNIX
- ifeq ($(shell cxx -V >/dev/null 2>&1; echo $$?),0)
+ ifeq ($(shell $(SHELL) -c "cxx -V" >/dev/null 2>&1; echo $$?),0)
CONFIG = osf_cxx.config
endif
else
ifeq ($(OSNAME),SunOS)
# check for SunPro on Solaris
- ifeq ($(shell CC -V >/dev/null 2>&1 && echo $$?),0)
+ ifeq ($(shell $(SHELL) -c "CC -V" >/dev/null 2>&1 \
+ && echo $$?),0)
CONFIG = sunpro.config
endif
endif # SunOS
@@ -349,15 +354,19 @@
bmode = debug,pthreads,shared,wide
endif # ifeq ($(BUILDTYPE),15d)
- ifneq ($(BUILDTYPE),)
- ifneq ($(BUILDMODE),)
- $(error "at most one of BUILDMODE and BUILDTYPE may be defined")
- else
- BUILDMODE=$(bmode)
+ ifeq ($(TOPDIR),)
+ # during the first (non-recursive) invocation only,
+ # check to make sure at most one of BUILDTYPE and BUILDMODE
+ # is defined
+ ifneq ($(BUILDTYPE),)
+ ifneq ($(BUILDMODE),)
+ $(error "at most one of BUILDMODE and BUILDTYPE may be defined")
+ else
+ BUILDMODE=$(bmode)
+ endif
endif
+ TOPDIR = $(CURDIR)
endif
-
- TOPDIR = $(CURDIR)
ifeq ($(filter /%,$(CONFIG)),)
ifeq ($(filter %/%,$(CONFIG)),)