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]

[libstdc++] Cosmetic cleanup of all Makefile.am's, and @x@ -> $(x)


Something I've been meaning to do for a while.  We've been using lots of
autoconf-substituted patterns directly in the makefiles.  The new tools
automatically provide a makefile variable for every ac_subst'd variable.
By referring to the make variable instead, debugging is a shade easier.

It's not a total search-and-replace, but it's close.  Things dealing with
libtool got left alone.

Some cosmetic tweaks, mostly removal of trailing whitespace.


2003-08-27  Phil Edwards  <pme@gcc.gnu.org>

	* Makefile.am:  Remove trailing whitespace.  Remove needless
	"foo = @foo@" assignments.  Replace direct uses of @foo@ with $(foo).
	* include/Makefile.am:  Likewise.
	* libmath/Makefile.am:  Likewise.
	* libsupc++/Makefile.am:  Likewise.
	* po/Makefile.am:  Likewise.
	* src/Makefile.am:  Likewise.
	* testsuite/Makefile.am:  Likewise.

	* Makefile.in, include/Makefile.in, libmath/Makefile.in,
	libsupc++/Makefile.in, po/Makefile.in, src/Makefile.in,
	testsuite/Makefile.in:  Regenerated.


Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/Makefile.am,v
retrieving revision 1.47
diff -u -3 -p -r1.47 Makefile.am
--- Makefile.am	27 Aug 2003 19:06:43 -0000	1.47
+++ Makefile.am	27 Aug 2003 21:26:18 -0000
@@ -29,7 +29,7 @@ if GLIBCXX_HOSTED
   hosted_source = src po
 endif
 ## Keep this list sync'd with acinclude.m4:GLIBCXX_CONFIGURE.
-SUBDIRS = include libmath libsupc++ $(hosted_source) testsuite 
+SUBDIRS = include libmath libsupc++ $(hosted_source) testsuite
 
 # These rules are messy, but are hella worth it.
 doxygen:
@@ -132,7 +132,7 @@ AM_MAKEFLAGS = \
 	"NM_FOR_BUILD=$(NM_FOR_BUILD)" \
 	"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
 	"DESTDIR=$(DESTDIR)" \
-	"WERROR=$(WERROR)" 
+	"WERROR=$(WERROR)"
 
 # Subdir rules rely on $(FLAGS_TO_PASS)
 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
Index: include/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/Makefile.am,v
retrieving revision 1.69
diff -u -3 -p -r1.69 Makefile.am
--- include/Makefile.am	27 Aug 2003 19:06:55 -0000	1.69
+++ include/Makefile.am	27 Aug 2003 21:26:19 -0000
@@ -225,7 +225,7 @@ ext_headers = \
 
 
 # This is the common subset of files that all three "C" header models use.
-c_base_srcdir = @C_INCLUDE_DIR@
+c_base_srcdir = $(C_INCLUDE_DIR)
 c_base_builddir = .
 c_base_headers = \
 	${c_base_srcdir}/std_cassert.h \
@@ -304,19 +304,19 @@ else
 c_compatibility_headers_extra =
 endif
 
-host_srcdir = ${glibcxx_srcdir}/@OS_INC_SRCDIR@
+host_srcdir = ${glibcxx_srcdir}/$(OS_INC_SRCDIR)
 host_builddir = ./${host_alias}/bits
 host_headers = \
 	${host_srcdir}/ctype_base.h \
 	${host_srcdir}/ctype_inline.h \
 	${host_srcdir}/ctype_noninline.h \
 	${host_srcdir}/os_defines.h \
-	${glibcxx_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h \
-	${glibcxx_srcdir}/@FPOS_INC_SRCDIR@/fpos.h
+	${glibcxx_srcdir}/$(ATOMICITY_INC_SRCDIR)/atomicity.h \
+	${glibcxx_srcdir}/$(FPOS_INC_SRCDIR)/fpos.h
 
 # Non-installed host_header files.
 host_headers_noinst = \
-	${glibcxx_srcdir}/@CLOCALE_INTERNAL_H@
+	${glibcxx_srcdir}/$(CLOCALE_INTERNAL_H)
 
 # These host_headers_extra files are all built with ad hoc naming rules.
 host_headers_extra = \
@@ -441,13 +441,13 @@ stamp-host: ${host_headers} ${host_heade
 	@if [ ! -f stamp-host ]; then \
 	  (cd ${host_builddir} ;\
 	  $(LN_S) ${host_headers} . || true ;\
-	  $(LN_S) ${glibcxx_srcdir}/@BASIC_FILE_H@ basic_file.h || true ;\
-	  $(LN_S) ${glibcxx_srcdir}/@CSTDIO_H@ c++io.h || true ;\
-	  $(LN_S) ${glibcxx_srcdir}/@CLOCALE_H@ c++locale.h || true ;\
-	  $(LN_S) ${glibcxx_srcdir}/@CLOCALE_INTERNAL_H@ . || true ;\
-	  $(LN_S) ${glibcxx_srcdir}/@CMESSAGES_H@ messages_members.h || true ;\
-	  $(LN_S) ${glibcxx_srcdir}/@CTIME_H@ time_members.h || true ;\
-	  $(LN_S) ${glibcxx_srcdir}/@CCODECVT_H@ codecvt_specializations.h || true);\
+	  $(LN_S) ${glibcxx_srcdir}/$(BASIC_FILE_H) basic_file.h || true ;\
+	  $(LN_S) ${glibcxx_srcdir}/$(CSTDIO_H) c++io.h || true ;\
+	  $(LN_S) ${glibcxx_srcdir}/$(CLOCALE_H) c++locale.h || true ;\
+	  $(LN_S) ${glibcxx_srcdir}/$(CLOCALE_INTERNAL_H) . || true ;\
+	  $(LN_S) ${glibcxx_srcdir}/$(CMESSAGES_H) messages_members.h || true ;\
+	  $(LN_S) ${glibcxx_srcdir}/$(CTIME_H) time_members.h || true ;\
+	  $(LN_S) ${glibcxx_srcdir}/$(CCODECVT_H) codecvt_specializations.h || true);\
 	fi ;\
 	$(STAMP) stamp-host
 
@@ -464,7 +464,6 @@ ${host_builddir}/c++config.h: ${top_buil
 	echo "#endif // _CXXCONFIG_" >>$@
 
 # Host includes for threads
-glibcxx_thread_h = @glibcxx_thread_h@
 uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
 
 ${host_builddir}/gthr.h: ${toplevel_srcdir}/gcc/gthr.h stamp-${host_alias}
Index: libmath/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/libmath/Makefile.am,v
retrieving revision 1.23
diff -u -3 -p -r1.23 Makefile.am
--- libmath/Makefile.am	17 Aug 2003 20:23:09 -0000	1.23
+++ libmath/Makefile.am	27 Aug 2003 21:26:19 -0000
@@ -26,7 +26,7 @@ mkinstalldirs = $(SHELL) $(toplevel_srcd
 
 noinst_LTLIBRARIES = libmath.la
 
-libmath_la_LIBADD = @LIBMATHOBJS@
+libmath_la_LIBADD = $(LIBMATHOBJS)
 
 libmath_la_DEPENDENCIES = $(libmath_la_LIBADD)
 
Index: libsupc++/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/libsupc++/Makefile.am,v
retrieving revision 1.47
diff -u -3 -p -r1.47 Makefile.am
--- libsupc++/Makefile.am	27 Aug 2003 00:38:28 -0000	1.47
+++ libsupc++/Makefile.am	27 Aug 2003 21:26:19 -0000
@@ -19,20 +19,20 @@
 ## You should have received a copy of the GNU General Public License
 ## along with GCC; see the file COPYING.  If not, write to
 ## the Free Software Foundation, 59 Temple Place - Suite 330,
-## Boston, MA 02111-1307, USA. 
+## Boston, MA 02111-1307, USA.
 
 include $(top_srcdir)/fragment.am
 
 # Need this library to both be part of libstdc++.a, and installed
 # separately too.
-# 1) separate libsupc++.la 
+# 1) separate libsupc++.la
 toolexeclib_LTLIBRARIES = libsupc++.la
 # 2) integrated libsupc++convenience.la that is to be a part of libstdc++.a
 noinst_LTLIBRARIES = libsupc++convenience.la
 
 
 headers = \
-	exception new typeinfo cxxabi.h exception_defines.h 
+	exception new typeinfo cxxabi.h exception_defines.h
 
 sources = \
 	del_op.cc \
@@ -62,8 +62,8 @@ sources = \
 	vec.cc \
 	vterminate.cc
 
-libsupc___la_SOURCES = $(sources) 
-libsupc__convenience_la_SOURCES = $(sources) 
+libsupc___la_SOURCES = $(sources)
+libsupc__convenience_la_SOURCES = $(sources)
 
 glibcxxinstalldir = $(gxx_include_dir)
 glibcxxinstall_HEADERS = $(headers)
@@ -72,13 +72,13 @@ glibcxxinstall_HEADERS = $(headers)
 # modified in a per-library or per-sub-library way.  Need to manually
 # set this option because CONFIG_CXXFLAGS has to be after
 # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
-# as the occasion call for it. 
+# as the occasion call for it.
 AM_CXXFLAGS = \
 	-fno-implicit-templates \
 	$(LIBSUPCXX_PICFLAGS) \
 	$(WARN_CXXFLAGS) \
 	$(OPTIMIZE_CXXFLAGS) \
-	$(CONFIG_CXXFLAGS) 
+	$(CONFIG_CXXFLAGS)
 
 AM_MAKEFLAGS = \
 	"gxx_include_dir=$(gxx_include_dir)"
@@ -105,8 +105,8 @@ AM_MAKEFLAGS = \
 # We have to put --tag disable-shared after --tag CXX lest things
 # CXX undo the affect of disable-shared.
 LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared \
-               --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \
-	       $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) 
+	       --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \
+	       $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
 
 # 3) We'd have a problem when building the shared libstdc++ object if
 # the rules automake generates would be used.  We cannot allow g++ to
@@ -115,8 +115,8 @@ LTCXXCOMPILE = $(LIBTOOL) --tag CXX --ta
 # directory to configure libstdc++-v3 to use gcc as the C++
 # compilation driver.
 CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared \
-          --mode=link $(CXX) \
-          @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+	  --mode=link $(CXX) \
+	  $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
 
 # We have to have rules modified from the default to counteract SUN make
 # prepending each of $(glibcxxinstall_HEADERS) with VPATH below.
Index: po/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/po/Makefile.am,v
retrieving revision 1.11
diff -u -3 -p -r1.11 Makefile.am
--- po/Makefile.am	27 Aug 2003 00:38:28 -0000	1.11
+++ po/Makefile.am	27 Aug 2003 21:26:19 -0000
@@ -25,33 +25,33 @@ include $(top_srcdir)/fragment.am
 
 # Location of installation directories.
 locale_installdir = $(DESTDIR)$(datadir)/locale
-locale_builddir = @glibcxx_localedir@
+locale_builddir = $(glibcxx_localedir)
 
 # Tell automake that foo.po makes foo.mo
 SUFFIXES = .po .mo
 
-LOCALE_IN = @glibcxx_POFILES@
-LOCALE_OUT = @glibcxx_MOFILES@
+LOCALE_IN = $(glibcxx_POFILES)
+LOCALE_OUT = $(glibcxx_MOFILES)
 
 MSGFMT = msgfmt
 
 # Necessary files.
 DISTFILES = \
 	Makefile.am Makefile.in string_literals.cc POTFILES.in $(PACKAGE).pot \
-	$(LOCALE_IN) 
+	$(LOCALE_IN)
 
 .po.mo:
 	$(MSGFMT) -o $@ $<
 
-all-local: all-local-@USE_NLS@
-all-local-no: 
-all-local-yes: $(LOCALE_OUT) 
+all-local: all-local-$(USE_NLS)
+all-local-no:
+all-local-yes: $(LOCALE_OUT)
 
 # 'make check' needs the catalogs constructed in build directory.
-check: check-@USE_NLS@
+check: check-$(USE_NLS)
 check-no:
 check-yes:
-	$(mkinstalldirs) $(locale_builddir) 
+	$(mkinstalldirs) $(locale_builddir)
 	catalogs='$(LOCALE_OUT)'; \
 	for cat in $$catalogs; do \
 	  cat=`basename $$cat`; \
@@ -59,14 +59,14 @@ check-yes:
 	  install_dir=$(locale_builddir)/$$lang/LC_MESSAGES; \
 	  $(mkinstalldirs) $$install_dir; \
 	  $(INSTALL_DATA) $$cat $$install_dir/$(PACKAGE).mo; \
-	done 
+	done
 
-# Install rules here. 
+# Install rules here.
 # Wish install could just `cp -R ./share $(locale_installdir)` ...
-install-data-local: install-data-local-@USE_NLS@
+install-data-local: install-data-local-$(USE_NLS)
 install-data-local-no:
 install-data-local-yes: all-local-yes
-	$(mkinstalldirs) $(locale_installdir) 
+	$(mkinstalldirs) $(locale_installdir)
 	catalogs='$(LOCALE_OUT)'; \
 	for cat in $$catalogs; do \
 	  cat=`basename $$cat`; \
@@ -85,4 +85,4 @@ pot:
 	  `grep -r -l '__N(".*")' .`
 
 # Specify what gets cleaned up on a 'make clean'
-CLEANFILES = $(LOCALE_OUT) 
+CLEANFILES = $(LOCALE_OUT)
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/src/Makefile.am,v
retrieving revision 1.132
diff -u -3 -p -r1.132 Makefile.am
--- src/Makefile.am	27 Aug 2003 00:38:28 -0000	1.132
+++ src/Makefile.am	27 Aug 2003 21:26:19 -0000
@@ -55,26 +55,26 @@ host_sources = \
 	numeric_members.cc \
 	time_members.cc
 
-codecvt_members.cc: ${glibcxx_srcdir}/@CCODECVT_CC@
-	@LN_S@ ${glibcxx_srcdir}/@CCODECVT_CC@ . || true
+codecvt_members.cc: ${glibcxx_srcdir}/$(CCODECVT_CC)
+	$(LN_S) ${glibcxx_srcdir}/$(CCODECVT_CC) . || true
 
-collate_members.cc: ${glibcxx_srcdir}/@CCOLLATE_CC@
-	@LN_S@ ${glibcxx_srcdir}/@CCOLLATE_CC@ . || true
+collate_members.cc: ${glibcxx_srcdir}/$(CCOLLATE_CC)
+	$(LN_S) ${glibcxx_srcdir}/$(CCOLLATE_CC) . || true
 
-ctype_members.cc: ${glibcxx_srcdir}/@CCTYPE_CC@
-	@LN_S@ ${glibcxx_srcdir}/@CCTYPE_CC@ . || true
+ctype_members.cc: ${glibcxx_srcdir}/$(CCTYPE_CC)
+	$(LN_S) ${glibcxx_srcdir}/$(CCTYPE_CC) . || true
 
-messages_members.cc: ${glibcxx_srcdir}/@CMESSAGES_CC@
-	@LN_S@ ${glibcxx_srcdir}/@CMESSAGES_CC@ . || true
+messages_members.cc: ${glibcxx_srcdir}/$(CMESSAGES_CC)
+	$(LN_S) ${glibcxx_srcdir}/$(CMESSAGES_CC) . || true
 
-monetary_members.cc: ${glibcxx_srcdir}/@CMONEY_CC@
-	@LN_S@ ${glibcxx_srcdir}/@CMONEY_CC@ . || true
+monetary_members.cc: ${glibcxx_srcdir}/$(CMONEY_CC)
+	$(LN_S) ${glibcxx_srcdir}/$(CMONEY_CC) . || true
 
-numeric_members.cc: ${glibcxx_srcdir}/@CNUMERIC_CC@
-	@LN_S@ ${glibcxx_srcdir}/@CNUMERIC_CC@ . || true
+numeric_members.cc: ${glibcxx_srcdir}/$(CNUMERIC_CC)
+	$(LN_S) ${glibcxx_srcdir}/$(CNUMERIC_CC) . || true
 
-time_members.cc: ${glibcxx_srcdir}/@CTIME_CC@
-	@LN_S@ ${glibcxx_srcdir}/@CTIME_CC@ . || true
+time_members.cc: ${glibcxx_srcdir}/$(CTIME_CC)
+	$(LN_S) ${glibcxx_srcdir}/$(CTIME_CC) . || true
 
 # Source files linked in via configuration/make substitution for a
 # particular host, but with ad hoc naming rules.
@@ -82,11 +82,11 @@ host_sources_extra = \
 	basic_file.cc \
 	c++locale.cc
 
-c++locale.cc: ${glibcxx_srcdir}/@CLOCALE_CC@
-	@LN_S@ ${glibcxx_srcdir}/@CLOCALE_CC@ ./$@ || true
+c++locale.cc: ${glibcxx_srcdir}/$(CLOCALE_CC)
+	$(LN_S) ${glibcxx_srcdir}/$(CLOCALE_CC) ./$@ || true
 
-basic_file.cc: ${glibcxx_srcdir}/@BASIC_FILE_CC@
-	@LN_S@ ${glibcxx_srcdir}/@BASIC_FILE_CC@ ./$@ || true
+basic_file.cc: ${glibcxx_srcdir}/$(BASIC_FILE_CC)
+	$(LN_S) ${glibcxx_srcdir}/$(BASIC_FILE_CC) ./$@ || true
 
 # Sources present in the src directory.
 sources = \
@@ -131,13 +131,13 @@ libstdc___la_LIBADD = \
 libstdc___la_DEPENDENCIES = libstdc++-symbol.ver $(libstdc___la_LIBADD)
 
 libstdc___la_LDFLAGS = \
-	-version-info @libtool_VERSION@ ${version_arg} \
-	-lm @LIBUNWIND_FLAG@
+	-version-info $(libtool_VERSION) ${version_arg} \
+	-lm $(LIBUNWIND_FLAG)
 
 
 # Use special rules for the deprecated source files so that they find
 # deprecated include files.
-GLIBCXX_INCLUDE_DIR=@glibcxx_builddir@/include
+GLIBCXX_INCLUDE_DIR=$(glibcxx_builddir)/include
 strstream.lo: strstream.cc
 	$(LTCXXCOMPILE) -I$(GLIBCXX_INCLUDE_DIR)/backward -Wno-deprecated -c $<
 strstream.o: strstream.cc
@@ -199,7 +199,7 @@ LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mo
 # directory to configure libstdc++-v3 to use gcc as the C++
 # compilation driver.
 CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(CXX) \
-	  @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+	  $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
 
 
 # Added bits to build debug library.
@@ -228,9 +228,9 @@ stamp-debug:
 	echo `date` > stamp-debug;
 
 build_debug: stamp-debug
-	(cd ${debugdir} && $(MAKE) CXXFLAGS='@DEBUG_FLAGS@' all)
+	(cd ${debugdir} && $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' all)
 
 # Install debug library here.
 install_debug:
 	(cd ${debugdir} && $(MAKE) \
-	toolexeclibdir=@glibcxx_toolexeclibdir@/debug install)
+	toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
Index: testsuite/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/Makefile.am,v
retrieving revision 1.31
diff -u -3 -p -r1.31 Makefile.am
--- testsuite/Makefile.am	17 Aug 2003 20:23:12 -0000	1.31
+++ testsuite/Makefile.am	27 Aug 2003 21:26:19 -0000
@@ -52,7 +52,7 @@ libv3test_a_SOURCES = testsuite_hooks.cc
 if GLIBCXX_TEST_ABI
 noinst_PROGRAMS = abi_check
 else
-noinst_PROGRAMS = 
+noinst_PROGRAMS =
 endif
 abi_check_SOURCES = abi_check.cc
 
@@ -69,9 +69,8 @@ endif
 # This is automatically run after the generated check-DEJAGNU rule.
 check-local: check-abi
 
-baseline_dir = @baseline_dir@
 baseline_file = ${baseline_dir}/baseline_symbols.txt
-extract_symvers = @glibcxx_srcdir@/scripts/extract_symvers
+extract_symvers = $(glibcxx_srcdir)/scripts/extract_symvers
 
 current_symbols.txt: ${extract_symvers} ../src/.libs/libstdc++.so
 	  -@(${extract_symvers} ../src/.libs/libstdc++.so current_symbols.txt)
@@ -84,7 +83,7 @@ baseline_symbols:
 	    exit 1; \
 	  fi; true)
 
-new-abi-baseline: 
+new-abi-baseline:
 	-@$(mkinstalldirs) ${baseline_dir}
 	-@(output=${baseline_file}; \
 	  if test -f $${output}; then \
@@ -101,7 +100,7 @@ check-abi: abi_check baseline_symbols cu
 	-@(./abi_check --check ./current_symbols.txt ${baseline_file} \
 	2>&1 | tee libstdc++-abi.sum)
 
-check-abi-verbose: abi_check baseline_symbols current_symbols.txt 
+check-abi-verbose: abi_check baseline_symbols current_symbols.txt
 	-@(./abi_check --check-verbose ./current_symbols.txt ${baseline_file} \
 	2>&1 | tee libstdc++-abi.sum)
 
@@ -126,7 +125,7 @@ check-script-install: ${survey_script}
 	  ${survey_script} 0)
 
 
-# Runs the testsuite/performance tests.  
+# Runs the testsuite/performance tests.
 # Some of these tests create large (~75MB) files, allocate huge
 # ammounts of memory, or otherwise tie up machine resources. Thus,
 # running this is off by default.
@@ -147,4 +146,4 @@ check-script check-script-install check-
 
 # By adding these files here, automake will remove them for 'make clean'
 CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \
-	     testsuite_* site.exp abi_check baseline_symbols 
+	     testsuite_* site.exp abi_check baseline_symbols


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