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]
Other format: [Raw text]

[Makefile] Define *_INSTALL_NAME immediately (with patch)


In my current fix for PR12730 (installing a tarball without makeinfo or
pod::man), I will need to use ${GCC_INSTALL_NAME} and friends as a make
target.

Since the *_INSTALL_NAME are created via sed scripts, they would be
unable to be targets unless they are defined immediately ":=" instead of
deferred "=".

Then as long as I was cleaning up those entries, I replaced their
easy-to-overlook backquotes with a more modern (circa 1988) gnumake
construct "$(shell ...).

Bootstrapped i686-pc-cygwin with a make install
I also did a cross build to --target=pentium4-unknown-elf with a make
install.

OK to install?
KC


gcc/
2004-01-16  Kelley Cook  <kcook@gcc.gnu.org>

	* Makefile.in (target_noncanonical, program_transform_name): Use 
	immediate define instead of deferred.
	(GCC_INSTALL_NAME, GCC_TARGET_INSTALL_NAME, CPP_INSTALL_NAME, 
	PROTOIZE_INSTALL_NAME, UNPROTOIZE_INSTALL_NAME, GCOV_INSTALL_NAME,
	GCCBUG_INSTALL_NAME): Define via a immediate $(shell) instead of
	deferred backquote.

gcc/cp
2004-01-16  Kelley Cook  <kcook@gcc.gnu.org>

	* Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME, 
	CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
	immediate $(shell) instead of deferred backquote.

gcc/f
2004-01-16  Kelley Cook  <kcook@gcc.gnu.org>

	* Make-lang.in (G77_INSTALL_NAME): Define via a immediate $(shell)
	instead of deferred backquote.

gcc/java
2004-01-16  Kelley Cook  <kcook@gcc.gnu.org>

	* Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME, 
	GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell) 
	instead of deferred backquote.

diff -prud gcc-snapshot/gcc/Makefile.in gcc-info/gcc/Makefile.in
--- gcc-snapshot/gcc/Makefile.in	2004-01-15 12:03:34.881307200 -0500
+++ gcc-info/gcc/Makefile.in	2004-01-16 09:55:44.842206400 -0500
@@ -60,10 +60,10 @@ MAKEOVERRIDES =
 build=@build@
 host=@host@
 target=@target@
-target_noncanonical=@target_noncanonical@
+target_noncanonical:=@target_noncanonical@
 
 # Sed command to transform gcc to installed name.
-program_transform_name = @program_transform_name@
+program_transform_name := @program_transform_name@
 
 # -----------------------------
 # Directories used during build
@@ -594,13 +593,13 @@ BUILD_LDFLAGS=$(LDFLAGS)
 BUILD_CPPFLAGS=$(ALL_CPPFLAGS)
 
 # Actual name to use when installing a native compiler.
-GCC_INSTALL_NAME = `echo gcc|sed '$(program_transform_name)'`
-GCC_TARGET_INSTALL_NAME = $(target_noncanonical)-`echo gcc|sed '$(program_transform_name)'`
-CPP_INSTALL_NAME = `echo cpp|sed '$(program_transform_name)'`
-PROTOIZE_INSTALL_NAME = `echo protoize|sed '$(program_transform_name)'`
-UNPROTOIZE_INSTALL_NAME = `echo unprotoize|sed '$(program_transform_name)'`
-GCOV_INSTALL_NAME = `echo gcov|sed '$(program_transform_name)'`
-GCCBUG_INSTALL_NAME = `echo gccbug|sed '$(program_transform_name)'`
+GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
+GCC_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gcc|sed '$(program_transform_name)')
+CPP_INSTALL_NAME := $(shell echo cpp|sed '$(program_transform_name)')
+PROTOIZE_INSTALL_NAME := $(shell echo protoize|sed '$(program_transform_name)')
+UNPROTOIZE_INSTALL_NAME := $(shell echo unprotoize|sed '$(program_transform_name)')
+GCOV_INSTALL_NAME := $(shell echo gcov|sed '$(program_transform_name)')
+GCCBUG_INSTALL_NAME := $(shell echo gccbug|sed '$(program_transform_name)')
 
 # Setup the testing framework, if you have one
 EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
diff -prud gcc-snapshot/gcc/cp/Make-lang.in gcc-info/gcc/cp/Make-lang.in
--- gcc-snapshot/gcc/cp/Make-lang.in	2004-01-15 12:04:45.860539200 -0500
+++ gcc-info/gcc/cp/Make-lang.in	2004-01-16 09:52:15.841678400 -0500
@@ -37,10 +37,10 @@
 # - define the names for selecting the language in LANGUAGES.
 
 # Actual names to use when installing a native compiler.
-CXX_INSTALL_NAME = `echo c++|sed '$(program_transform_name)'`
-GXX_INSTALL_NAME = `echo g++|sed '$(program_transform_name)'`
-CXX_TARGET_INSTALL_NAME = $(target_noncanonical)-`echo c++|sed '$(program_transform_name)'`
-GXX_TARGET_INSTALL_NAME = $(target_noncanonical)-`echo g++|sed '$(program_transform_name)'`
+CXX_INSTALL_NAME := $(shell echo c++|sed '$(program_transform_name)')
+GXX_INSTALL_NAME := $(shell echo g++|sed '$(program_transform_name)')
+CXX_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo c++|sed '$(program_transform_name)')
+GXX_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo g++|sed '$(program_transform_name)')
 
 #
 # Define the names for selecting c++ in LANGUAGES.
diff -prud gcc-snapshot/gcc/f/Make-lang.in gcc-info/gcc/f/Make-lang.in
--- gcc-snapshot/gcc/f/Make-lang.in	2004-01-15 12:05:02.613961200 -0500
+++ gcc-info/gcc/f/Make-lang.in	2004-01-16 09:52:22.080649600 -0500
@@ -38,7 +38,7 @@
 # $(srcdir) must be set to the gcc/ source directory (not gcc/f/).
 #
 # Actual name to use when installing a native compiler.
-G77_INSTALL_NAME = `echo g77|sed '$(program_transform_name)'`
+G77_INSTALL_NAME := $(shell echo g77|sed '$(program_transform_name)')
 
 # Some versions of `touch' (such as the version on Solaris 2.8) 
 # do not correctly set the timestamp due to buggy versions of `utime'
diff -prud gcc-snapshot/gcc/java/Make-lang.in gcc-info/gcc/java/Make-lang.in
--- gcc-snapshot/gcc/java/Make-lang.in	2004-01-15 12:05:26.968009200 -0500
+++ gcc-info/gcc/java/Make-lang.in	2004-01-16 09:52:54.887824000 -0500
@@ -41,9 +41,9 @@
 # - define the names for selecting the language in LANGUAGES.
 
 # Actual names to use when installing a native compiler.
-JAVA_INSTALL_NAME = `echo gcj|sed '$(program_transform_name)'`
-JAVA_TARGET_INSTALL_NAME = $(target_noncanonical)-`echo gcj|sed '$(program_transform_name)'`
-GCJH_TARGET_INSTALL_NAME = $(target_noncanonical)-`echo gcjh|sed '$(program_transform_name)'`
+JAVA_INSTALL_NAME := $(shell echo gcj|sed '$(program_transform_name)')
+JAVA_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gcj|sed '$(program_transform_name)')
+GCJH_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gcjh|sed '$(program_transform_name)')
 
 GCJ = gcj
 

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