7035299 clean up CONFIG_SHELL in X makefiles
authorAlan Coopersmith <Alan.Coopersmith@Oracle.COM>
Sun, 10 Apr 2011 11:12:44 -0700
changeset 1111 582653852b4c
parent 1110 49ceb96104f0
child 1112 4778e9ecf66e
7035299 clean up CONFIG_SHELL in X makefiles
open-src/app/synergy/Makefile
open-src/common/Makefile.inc
open-src/common/delibtoolize.pl
open-src/driver/xf86-video-ati/Makefile
open-src/lib/freeglut/Makefile
open-src/lib/freetype/Makefile
open-src/xserver/xvnc/Makefile
--- a/open-src/app/synergy/Makefile	Fri Apr 08 16:08:16 2011 -0700
+++ b/open-src/app/synergy/Makefile	Sun Apr 10 11:12:44 2011 -0700
@@ -2,7 +2,7 @@
 #
 # synergy 1.x Makefile
 #
-# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -108,7 +108,6 @@
 
 MODULE_ENV = \
 	     SHELL="/bin/ksh93" \
-	     CONFIG_SHELL="/bin/ksh93" \
 	     CC="$(CC)" \
 	     CXX="$(CXX)" \
 	     CXXFLAGS="$(CXXFLAGS) $(MODULE_CXXFLAGS)" \
--- a/open-src/common/Makefile.inc	Fri Apr 08 16:08:16 2011 -0700
+++ b/open-src/common/Makefile.inc	Sun Apr 10 11:12:44 2011 -0700
@@ -502,6 +502,12 @@
 
 DEFAULT_PKG_CONFIG_PATH=$(TOP)/open-src/common/pc-files/$(BUILD_DIR):$(PROTODIR)$(PKGCONFIG_DIR):$(PROTODIR)$(PKGCONFIG_DIR_SHARE):$(PKGCONFIG_DIR):$(PKGCONFIG_DIR_SHARE)
 
+# Most upstream software is written by developers using bash as /bin/sh, so
+# we run configure scripts with that to minimize problems and work around
+# some ksh93 bugs we've hit
+CONFIG_SHELL_DEFAULT		= $(CONFIG_SHELL_SET:yes=$(POUND_SIGN))
+$(CONFIG_SHELL_DEFAULT)		CONFIG_SHELL = /usr/bin/bash
+
 # Set USE_DEFAULT_CONFIG_ENV=no in a Makefile to not use this default
 # autoconfig environment
 $(USE_DEFAULT_CONFIG_ENV:no=$(POUND_SIGN))	DEFAULT_CONFIG_ENV = \
@@ -513,7 +519,7 @@
     LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(MODTYPE_CFLAGS) $(MODTYPE_LDFLAGS) $(MODULE_CFLAGS) $(MODULE_LDFLAGS)" \
     PKG_CONFIG_PATH="$(DEFAULT_PKG_CONFIG_PATH)" \
     INSTALL="$(INSTALL_SCRIPT)" CPPROG="cp -p" \
-    MAKE="$(MODULE_MAKE)" CONFIG_SHELL="$(SHELL)"
+    MAKE="$(MODULE_MAKE)" CONFIG_SHELL="$(CONFIG_SHELL)"
 
 CONFIG_ENV = $(DEFAULT_CONFIG_ENV) $(MODTYPE_CONFIG_ENV) $(MODULE_CONFIG_ENV)
 
@@ -528,7 +534,7 @@
 	     $(AUTORECONF_ENV) autoreconf -v --install --force ; \
 	fi ; \
 	chmod a+x configure ; \
-	$(CONFIG_ENV) $(SHELL) ./configure $(CONFIG_OPTS) ; \
+	$(CONFIG_ENV) $(CONFIG_SHELL) ./configure $(CONFIG_OPTS) ; \
 	if [[ "$(DELIBTOOLIZE)" = "yes" ]] ; then \
 	    $(TOP)/open-src/common/delibtoolize.pl $(DELIBTOOLIZE_FLAGS) . ; \
 	fi
--- a/open-src/common/delibtoolize.pl	Fri Apr 08 16:08:16 2011 -0700
+++ b/open-src/common/delibtoolize.pl	Sun Apr 10 11:12:44 2011 -0700
@@ -1,6 +1,6 @@
 #! /usr/perl5/bin/perl
 #
-# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -274,7 +274,7 @@
 	my $dirname = $1;
 	my $installrule = <<'END_RULE';
 	list='$(<DIRNAME>_LTLIBRARIES)'; for p in $$list; do \
-	  so=$${p%+(.+(\d))} ; \
+	  so=$${p%.[[:digit:]]} ; \
 	  if [[ "$$p" != "$$so" ]] ; then \
 		echo "rm -f $(DESTDIR)$(<DIRNAME>dir)/$$so" ; \
 		rm -f $(DESTDIR)$(<DIRNAME>dir)/$$so ; \
--- a/open-src/driver/xf86-video-ati/Makefile	Fri Apr 08 16:08:16 2011 -0700
+++ b/open-src/driver/xf86-video-ati/Makefile	Sun Apr 10 11:12:44 2011 -0700
@@ -55,10 +55,6 @@
 # Extra flags to pass to configure script
 MODULE_CONFIG_OPTS=--enable-dri
 
-# Need to override setting of CONFIG_SHELL from Makefile.init to work around
-# ksh93 bug that causes config.status/config.h to be incorrectly generated
-MODULE_CONFIG_ENV= CONFIG_SHELL=/usr/bin/bash
-
 # Paths to find libraries/modules to link with - libraries themselves listed
 # in src/Makefile.am since ATI has multiple submodules with different needs
 MODULE_LD_OPTIONS= \
--- a/open-src/lib/freeglut/Makefile	Fri Apr 08 16:08:16 2011 -0700
+++ b/open-src/lib/freeglut/Makefile	Sun Apr 10 11:12:44 2011 -0700
@@ -2,7 +2,7 @@
 #
 # FreeGLUT 2.6.0 Makefile
 #
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -69,9 +69,6 @@
 # We want GNU cp
 GNUCP=/usr/gnu/bin/cp
 
-# And GNU sed
-GSED=/usr/gnu/bin/sed
-
 # We must build with GNU make
 MODULE_MAKE=$(GNUMAKE)
 MODULE_MAKE_SET=yes
@@ -103,7 +100,6 @@
 MODULE_ENV = \
 	     SHELL="/bin/bash" \
 	     MAKESHELL="/bin/bash" \
-	     CONFIG_SHELL="/bin/bash" \
 	     PROTODIR="$(PROTODIR)" \
 	     CC="$(CC)" \
 	     CPPFLAGS="$(MODULE_CPPFLAGS) $(CPPFLAGS)" \
@@ -121,12 +117,9 @@
 
 include ../Makefile.inc
 
-# Freeglut needs libtool
+# Freeglut's $(VERSION_INFO) breaks delibtoolize.pl
 DELIBTOOLIZE=no
 
-# But we don't want autoreconf
-AUTORECONF=no
-
 install: install_extra_symlinks
 
 install_extra_symlinks:
--- a/open-src/lib/freetype/Makefile	Fri Apr 08 16:08:16 2011 -0700
+++ b/open-src/lib/freetype/Makefile	Sun Apr 10 11:12:44 2011 -0700
@@ -2,7 +2,7 @@
 #
 # Freetype 2.x Makefile
 #
-# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -85,7 +85,6 @@
 
 # Additional command line options to GNU autoconf configure script
 MODULE_CONFIG_OPTS= \
-	CONFIG_SHELL="/bin/bash" \
 	--enable-biarch-config \
 	--libdir='$(MODULE_PREFIX)/lib$(ARCHLIBSUBDIR)' \
 	--with-zlib \
@@ -108,7 +107,6 @@
 MODULE_ENV = \
     SHELL="/bin/bash" \
     MAKESHELL="/bin/bash" \
-    CONFIG_SHELL="/bin/bash" \
     CPP="$(CC) -E $(LIB_CFLAGS)" \
     CXXCPP="$(CXX) -E $(CXXFLAGS)" \
     MAKEFLAGS= \
--- a/open-src/xserver/xvnc/Makefile	Fri Apr 08 16:08:16 2011 -0700
+++ b/open-src/xserver/xvnc/Makefile	Sun Apr 10 11:12:44 2011 -0700
@@ -194,17 +194,17 @@
 $(SOURCE_DIR)/unix/Makefile: $(SOURCE_TARGETS)
 	(cd $(SOURCE_DIR)/common && \
 		$(AUTORECONF_ENV) autoreconf --install --force && \
-		$(VNC_CONFIG_ENV) $(SHELL) ./configure $(VNC_CONFIG_OPTS) )
+		$(VNC_CONFIG_ENV) $(CONFIG_SHELL) ./configure $(VNC_CONFIG_OPTS) )
 	(cd $(SOURCE_DIR)/unix && \
 		$(AUTORECONF_ENV) autoreconf --install --force && \
-		$(VNC_CONFIG_ENV) $(SHELL) ./configure $(VNC_CONFIG_OPTS) )
+		$(VNC_CONFIG_ENV) $(CONFIG_SHELL) ./configure $(VNC_CONFIG_OPTS) )
 
 
 # Run configure script for Xvnc
 $(XORG_BUILD_DIR)/Makefile: $(SOURCE_TARGETS)
 	(cd $(XORG_BUILD_DIR) &&  \
 		$(AUTORECONF_ENV) autoreconf --install --force && \
-		$(XVNC_CONFIG_ENV) $(SHELL) ./configure $(XVNC_CONFIG_OPTS) )
+		$(XVNC_CONFIG_ENV) $(CONFIG_SHELL) ./configure $(XVNC_CONFIG_OPTS) )
 
 Xvnc_build: $(CONFIGURE_TARGETS)
 	(cd $(SOURCE_DIR)/unix ; \