This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


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

three substantial build changes



The appended patch contains three mostly-orthogonal changes.  The first
change is in the variables used to build shared libraries.  If
libfoo-map is not set, Makerules looks for libfoo.map in the
subdirectory and $(..).  This lets us eliminate all but one use of
this variable (ld.so still needs it).  I made this change because it
simplifies adding a version script to any of the libraries; just create
the file and it'll be used.

The second change is to tidy up the way --no-whole-archive and
-fno-exceptions are set: configure now does all the work.  This
reduces clutter in Makerules, makes the link rules easier to read, and
makes it easy to set them to something else if we ever need that
(eg. if we get support for a linker with different switches).

The third change is to fix the iconvdata build rules so that if the
Makefile changes nothing is rebuilt unnecessarily.  This is done using
stamp files and move-if-change, much the way sunrpc handles the same
problem.  I also moved iso-8859-7jp.h into the perl-generated-headers
category where it belongs.

That Makefile could be made much shorter if the various headers had
their names in uppercase.  Then we could write

$(blah-generated-headers:%=$(objpfx)%): %.h: \
	$(..)localedata/charmaps/%

instead of having to list every file individually.

zw

1998-05-10 21:17  Zack Weinberg  <zack@rabi.phys.columbia.edu>

	* iconvdata/Makefile: Disentangle sed scripts a bit (use -n,
	input $< instead of $^, insert newlines when possible.)
	Move iso-8859-7jp.h from sed-generated-headers to
	perl-generated-headers.  Move stanza generating this file
	inside the ifneq($(PERL),no) conditional block.
	Make all the generated headers depend on stamp files, and
	change the build rules to update the stamps unconditionally
	but use move-if-change to update the headers.  This avoids
	much unnecessary recompilation.

	* configure.in: Instead of substituting `yes' or `no' for whether
	--no-whole-archive is available, set @no_whole_archive@ to the
	appropriate gcc switch or the empty string.  Likewise for
	-fno-exceptions.
	* config.make.in: Replace have-no-whole-archive with
	no-whole-archive and have-no-exceptions with no-exceptions.

	* Makerules: Delete stanzas setting no-whole-archive and
	no-exceptions.  Delete libc-map variable.
	(load-map-file): Set to the appropriate compiler switch, not
	just the file name.  If libfoo-map is not set, look for a
	libfoo.map in the current directory and $(..).
	(map-file): New variable, contains just the mapfile name.
	(build-shlib): Adjust for new value of load-map-file.
	(libc.so): Correct dependencies.

	* extra-lib.mk: Correct shlib dependencies since libfoo-map
	may not be set anymore.

	* elf/Makefile: Set ld-map to $(..)libc.map, not $(libc-map).
	Delete libdl-map.  Tweak ld.so link rule to work with changed
	variable settings in Makerules.
	* iconvdata/Makefile: Tweak build-module to work with changed
	variable settings in Makerules.

	* db/Makefile: Delete libdb-map.
	* hesiod/Makefile: Delete libnss_hesiod-map.
	* linuxthreads/Makefile: Delete libpthread-map.
	* locale/Makefile: Delete libBrokenLocale-map.
	* login/Makefile: Delete libutil-map.
	* math/Makefile: Delete libm-map.
	* md5-crypt/Makefile: Delete libcrypt-map.
	* nis/Makefile: Delete libnsl-map, libnss_nis-map, 
	libnss_nisplus-map, and libnss_compat-map.
	* nss/Makefile: Delete libnss_files-map, libnss_db-map, and
	libnss_ldap-map.
	* resolv/Makefile: Delete libresolv-map and libnss_dns-map.
	* rt/Makefile: Delete librt-map.

	* sunrpc/Makefile: Use move-if-change to update generated .h
	and .c files.

============================================================
Index: Makerules
--- Makerules	Sat, 09 May 1998 13:36:13 -0400 zack  Z.1
+++ Makerules	Sun, 10 May 1998 21:50:42 -0400 zack  Z.2
@@ -325,9 +325,9 @@
 # Reference map file only when versioning is selected and a map file name
 # is given.
 ifeq ($(versioning),yes)
-load-map-file = $($(@F:%.so=%)-map)
-else
-load-map-file =
+map-file = $(firstword $(wildcard \
+		$($(@F:.so=-map)) $(@F:.so=.map) $(..)$(@F:.so=.map)))
+load-map-file = $(map-file:%=-Wl,--version-script=%)
 endif
 
 # Pattern rule to build a shared object from an archive of PIC objects.
@@ -338,12 +338,6 @@
 lib%.so: lib%_pic.a $(+preinit) $(+postinit)
 	$(build-shlib)
 
-ifeq ($(have-no-whole-archive),yes)
-no-whole-archive = -Wl,--no-whole-archive
-else
-no-whole-archive =
-endif
-
 ifeq ($(elf),yes)
 interp-obj = $(common-objpfx)elf/interp.os
 $(common-objpfx)libc.so: $(interp-obj)
@@ -352,12 +346,12 @@
 
 define build-shlib
 $(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS)  \
-	  -B$(csu-objpfx) $(load-map-file:%=-Wl,--version-script=%) \
+	  -B$(csu-objpfx) $(load-map-file) \
 	  -Wl,-soname=lib$(libprefix)$(@F:lib%.so=%).so$($(@F)-version) \
 	  $(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
 	  -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
 	  -Wl,--whole-archive \
-	  $(filter-out $($(@F:.so=)-map) $(+preinit) $(+postinit),$^) \
+	  $(filter-out $(map-file) $(+preinit) $(+postinit),$^) \
 	  $(no-whole-archive) $(LDLIBS-$(@F:lib%.so=%).so)
 endef
 
@@ -385,8 +379,6 @@
 LDLIBS-c.so = $(gnulib)
 # Give libc.so an entry point and make it directly runnable itself.
 LDFLAGS-c.so += -e __libc_main
-# We have a versioning file for libc.so.
-libc-map = $(..)libc.map
 # Pre-link the objects of libc_pic.a so that we can locally resolve
 # COMMON symbols before we link against ld.so.  This is because ld.so
 # contains some of libc_pic.a already, which will prevent the COMMONs
@@ -399,7 +391,7 @@
 $(common-objpfx)libc.so: $(elfobjdir)/soinit.os \
 			 $(common-objpfx)libc_pic.os \
 			 $(elfobjdir)/sofini.os $(elfobjdir)/ld.so \
-			 $(libc-map)
+			 $(..)libc.map
 	$(build-shlib)
 common-generated += libc.so libc_pic.os
 ifdef libc.so-version
@@ -407,15 +399,6 @@
 	$(make-link)
 common-generated += libc.so$(libc.so-version)
 endif
-endif
-
-# Some files must not be compiled with the exception handler mechanism
-# enabled (introduced in gcc-2.8).  Use $(no-exceptions) in the
-# appropriate CFLAGS definition.
-ifeq ($(have-no-exceptions),yes)
-no-exceptions = -fno-exceptions
-else
-no-exceptions =
 endif
 
 # Figure out the source filenames in this directory.
============================================================
Index: config.make.in
--- config.make.in	Sun, 10 May 1998 15:48:16 -0400 zack  Z.1
+++ config.make.in	Sun, 10 May 1998 21:50:42 -0400 zack  Z.2
@@ -37,9 +37,9 @@
 with-cvs = @with_cvs@
 
 versioning = @VERSIONING@
+no-whole-archive = @no_whole_archive@
+no-exceptions = @no_exceptions@
 
-have-no-whole-archive = @libc_cv_ld_no_whole_archive@
-have-no-exceptions = @libc_cv_gcc_no_exceptions@
 have-bash2 = @libc_cv_have_bash2@
 have-ksh = @libc_cv_have_ksh@
 
============================================================
Index: configure.in
--- configure.in	Sun, 10 May 1998 15:48:16 -0400 zack  Z.1
+++ configure.in	Sun, 10 May 1998 21:50:42 -0400 zack  Z.2
@@ -883,7 +883,10 @@
   libc_cv_ld_no_whole_archive=no
 fi
 rm -f conftest*])
-AC_SUBST(libc_cv_ld_no_whole_archive)dnl
+if test $libc_cv_ld_no_whole_archive = yes; then
+  no_whole_archive=-Wl,--no-whole-archive
+fi
+AC_SUBST(no_whole_archive)dnl
 
 AC_CACHE_CHECK(for gcc -fno-exceptions, libc_cv_gcc_no_exceptions, [dnl
 cat > conftest.c <<\EOF
@@ -900,7 +903,10 @@
   libc_cv_gcc_no_exceptions=no
 fi
 rm -f conftest*])
-AC_SUBST(libc_cv_gcc_no_exceptions)dnl
+if test $libc_cv_ld_no_whole_archive = yes; then
+  no_exceptions=-fno-exceptions
+fi
+AC_SUBST(no_exceptions)dnl
 
 if test "$base_machine" = alpha ; then
 AC_CACHE_CHECK(for function ..ng prefix, libc_cv_gcc_alpha_ng_prefix, [dnl
============================================================
Index: db/Makefile
--- db/Makefile	Sat, 09 May 1998 13:36:13 -0400 zack  Z.1
+++ db/Makefile	Sun, 10 May 1998 21:50:42 -0400 zack  Z.2
@@ -19,7 +19,6 @@
 		  mpool \
 		  rec_close rec_delete rec_get rec_open rec_put rec_search \
 		  rec_seq rec_utils
-libdb-map	:= libdb.map
 
 headers		:= db.h mpool.h ndbm.h
 distribute	:= compat.h					\
============================================================
Index: elf/Makefile
--- elf/Makefile	Sat, 09 May 1998 13:36:13 -0400 zack  Z.1
+++ elf/Makefile	Sun, 10 May 1998 21:50:42 -0400 zack  Z.2
@@ -35,7 +35,7 @@
 # ld.so uses those routines, plus some special stuff for being the program
 # interpreter and operating independent of libc.
 rtld-routines	:= rtld $(dl-routines) dl-sysdep dl-minimal
-ld-map		= $(libc-map)
+ld-map		= $(..)libc.map
 distribute	= $(rtld-routines:=.c) dynamic-link.h do-rel.h dl-machine.h \
 		  dl-hash.h soinit.c sofini.c ldd.sh.in ldd.bash.in eval.c \
 		  genrtldtbl.awk atomicity.h dl-procinfo.h ldsodefs.h \
@@ -44,7 +44,6 @@
 extra-libs	 = libdl
 extra-libs-others = $(extra-libs)
 libdl-routines	:= dlopen dlclose dlsym dlvsym dlerror dladdr
-libdl-map	:= libdl.map
 
 before-compile = $(objpfx)trusted-dirs.h $(objpfx)rtldtbl.h
 
@@ -112,14 +111,10 @@
 
 $(objpfx)ld.so: $(objpfx)librtld.os $(addprefix $(objpfx),$(rtld-ldscript)) \
 		$(ld-map)
-	$(rtld-link) -Wl,-soname=$(rtld-installed-name)
-
-define rtld-link
-$(LINK.o) -nostdlib -nostartfiles -shared -o $@ \
-	  -Wl,-rpath=$(default-rpath) $(LDFLAGS-rtld) \
-	  $(filter-out $(rtld-ldscript) $($(@F:.so=)-map),$^) \
-	  $(load-map-file:%=-Wl,--version-script=%)
-endef
+	$(LINK.o) -nostdlib -nostartfiles -shared -o $@		\
+		-Wl,-rpath=$(default-rpath) $(LDFLAGS-rtld)	\
+		$(filter-out $(rtld-ldscript) $(map-file),$^)	\
+		$(load-map-file) -Wl,-soname=$(rtld-installed-name)
 
 # The dl code in the static libc needs a default library path.
 CFLAGS-dl-support.c = -D'DEFAULT_RPATH="$(default-rpath)"'
============================================================
Index: extra-lib.mk
--- extra-lib.mk	Sat, 09 May 1998 13:36:13 -0400 zack  Z.1
+++ extra-lib.mk	Sun, 10 May 1998 21:50:42 -0400 zack  Z.2
@@ -50,6 +50,6 @@
 include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-$(lib)))
 
 # Add the version script to the dependencies of the shared library.
-$(objpfx)$(lib).so: $($(lib)-map)
+$(objpfx)$(lib).so: $(firstword $(wildcard $($(lib)-map) $(lib).map $(..)$(lib).map))
 
 endif
============================================================
Index: hesiod/Makefile
--- hesiod/Makefile	Sat, 09 May 1998 13:36:13 -0400 zack  Z.1
+++ hesiod/Makefile	Sun, 10 May 1998 21:50:42 -0400 zack  Z.2
@@ -30,7 +30,6 @@
 vpath %.c nss_hesiod
 
 libnss_hesiod-routines	:= hesiod hesiod-grp hesiod-pwd hesiod-service
-libnss_hesiod-map	:= libnss_hesiod.map
 # Build only shared library
 libnss_hesiod-inhibit-o	= $(filter-out .os,$(object-suffixes))
 
============================================================
Index: iconvdata/Makefile
--- iconvdata/Makefile	Sat, 09 May 1998 13:36:13 -0400 zack  Z.1
+++ iconvdata/Makefile	Sun, 10 May 1998 21:50:42 -0400 zack  Z.2
@@ -204,11 +204,11 @@
 # and it does not depend on the destination name to start with `lib'.
 define build-module
 $(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS)  \
-	  -B$(csu-objpfx) $(load-map-file:%=-Wl,--version-script=%) \
+	  -B$(csu-objpfx) $(load-map-file) \
 	  $(LDFLAGS.so) $(LDFLAGS-$(@F:%.so=%).so) \
 	  -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
 	  -Wl,--whole-archive \
-	  $(filter-out $($(@F:.so=)-map) $(+preinit) $(+postinit),$^) \
+	  $(filter-out $(map-file) $(+preinit) $(+postinit),$^) \
 	  $(no-whole-archive) $(LDLIBS-$(@F:%.so=%).so)
 endef
 
@@ -223,14 +223,22 @@
 
 # If we have the localedata add-on available we can build the conversion
 # tables for numerous charsets.
+move-if-change = ./$(..)scripts/move-if-change
+
 define generate-8bit-table
 $(make-target-directory)
 ( echo "static const uint32_t to_ucs4[256] = {"; \
-  sed -e '/^[^[:space:]]*[[:space:]]*.x00/d' -e 's/^[^[:space:]]*[[:space:]]*.x\(..\)[[:space:]]*<U\(....\)>.*/  [0x\1] = 0x\2,/p' -e d $^ | sort -u; \
+  sed -n -e '/^[^[:space:]]*[[:space:]]*.x00/d' \
+	 -e 's/^[^[:space:]]*[[:space:]]*.x\(..\)[[:space:]]*<U\(....\)>.*/  [0x\1] = 0x\2,/p' \
+	$< | sort -u; \
   echo "};"; \
   echo "static const char from_ucs4[] = {"; \
-  sed -e '/^[^[:space:]]*[[:space:]]*.x00/d' -e 's/^[^[:space:]]*[[:space:]]*.x\(..\)[[:space:]]*<U\(....\)>.*/  [0x\2] = 0x\1,/p' -e d $^ | sort -u; \
-  echo "};" ) > $@.new && rm -f $@ && mv $@.new $@
+  sed -n -e '/^[^[:space:]]*[[:space:]]*.x00/d' \
+	 -e 's/^[^[:space:]]*[[:space:]]*.x\(..\)[[:space:]]*<U\(....\)>.*/  [0x\2] = 0x\1,/p' \
+	$< | sort -u; \
+  echo "};" ) > $(@:stmp=T)
+  $(move-if-change) $(@:stmp=T) $(@:stmp=h)
+  touch $@
 endef
 
 sed-generated-headers := iso8859-2.h iso8859-3.h iso8859-4.h iso8859-6.h \
@@ -242,20 +250,24 @@
 			 ebcdic-pt.h ebcdic-uk.h ebcdic-us.h ibm037.h	 \
 			 ibm038.h ibm274.h ibm275.h ibm423.h ibm424.h	 \
 			 ibm500.h ibm870.h ibm871.h ibm891.h ibm903.h	 \
-			 ibm904.h ibm905.h ibm1047.h iso8859-7jp.h
+			 ibm904.h ibm905.h ibm1047.h
 
 define generate-8bit-gap-table
 $(make-target-directory)
 ( echo "static const uint32_t to_ucs4[256] = {"; \
-  sed -e '/^[^[:space:]]*[[:space:]]*.x00/d' -e 's/^[^[:space:]]*[[:space:]]*.x\(..\)[[:space:]]*<U\(....\)>.*/  [0x\1] = 0x\2,/p' -e d $^ | sort -u; \
+  sed -n -e '/^[^[:space:]]*[[:space:]]*.x00/d'  \
+	 -e 's/^[^[:space:]]*[[:space:]]*.x\(..\)[[:space:]]*<U\(....\)>.*/  [0x\1] = 0x\2,/p' \
+	 $< | sort -u; \
   echo "};"; \
   echo "static const struct gap from_idx[] = {"; \
-  sed -e 's/^[^[:space:]]*[[:space:]]*.x\(..\)[[:space:]]*<U\(....\)>.*/0x\2 0x\1/p' -e d $^ | sort -u | $(PERL) gap.pl; \
+  sed -n -e 's/^[^[:space:]]*[[:space:]]*.x\(..\)[[:space:]]*<U\(....\)>.*/0x\2 0x\1/p' $< | sort -u | $(PERL) gap.pl; \
   echo "  { start: 0xffff, end: 0xffff, idx:     0 }"; \
   echo "};"; \
   echo "static const char from_ucs4[] = {"; \
-  sed -e 's/^[^[:space:]]*[[:space:]]*.x\(..\)[[:space:]]*<U\(....\)>.*/0x\2 0x\1/p' -e d $^ | sort -u | $(PERL) gaptab.pl; \
-  echo "};" ) > $@.new && rm -f $@ && mv $@.new $@
+  sed -n -e 's/^[^[:space:]]*[[:space:]]*.x\(..\)[[:space:]]*<U\(....\)>.*/0x\2 0x\1/p' $< | sort -u | $(PERL) gaptab.pl; \
+  echo "};" ) > $(@:stmp=T)
+  $(move-if-change) $(@:stmp=T) $(@:stmp=h)
+  touch $@
 endef
 
 perl-generated-headers := koi8-r.h latin-greek.h latin-greek-1.h	 \
@@ -279,191 +291,196 @@
 before-compile = $(addprefix $(objpfx),$(sed-generated-headers)) \
 		 $(addprefix $(objpfx),$(perl-generated-headers))
 
-
 # Rules to generate the headers.
-$(objpfx)iso8859-2.h: ../localedata/charmaps/ISO-8859-2 Makefile
+$(sed-generated-headers:%=$(objpfx)%): $(objpfx)%.h: $(objpfx)%.stmp
+	@:
+
+$(objpfx)iso8859-2.stmp: ../localedata/charmaps/ISO-8859-2 Makefile
 	$(generate-8bit-table)
-$(objpfx)iso8859-3.h: ../localedata/charmaps/ISO-8859-3 Makefile
+$(objpfx)iso8859-3.stmp: ../localedata/charmaps/ISO-8859-3 Makefile
 	$(generate-8bit-table)
-$(objpfx)iso8859-4.h: ../localedata/charmaps/ISO-8859-4 Makefile
+$(objpfx)iso8859-4.stmp: ../localedata/charmaps/ISO-8859-4 Makefile
 	$(generate-8bit-table)
-$(objpfx)iso8859-6.h: ../localedata/charmaps/ISO-8859-6 Makefile
+$(objpfx)iso8859-6.stmp: ../localedata/charmaps/ISO-8859-6 Makefile
 	$(generate-8bit-table)
-$(objpfx)iso8859-9.h: ../localedata/charmaps/ISO-8859-9 Makefile
+$(objpfx)iso8859-9.stmp: ../localedata/charmaps/ISO-8859-9 Makefile
 	$(generate-8bit-table)
 
-$(objpfx)koi-8.h: ../localedata/charmaps/KOI-8 Makefile
+$(objpfx)koi-8.stmp: ../localedata/charmaps/KOI-8 Makefile
 	$(generate-8bit-table)
 
-$(objpfx)hp-roman8.h: ../localedata/charmaps/HP-ROMAN8 Makefile
+$(objpfx)hp-roman8.stmp: ../localedata/charmaps/HP-ROMAN8 Makefile
 	$(generate-8bit-table)
 
-$(objpfx)ebcdic-at-de.h: ../localedata/charmaps/EBCDIC-AT-DE Makefile
+$(objpfx)ebcdic-at-de.stmp: ../localedata/charmaps/EBCDIC-AT-DE Makefile
 	$(generate-8bit-table)
-$(objpfx)ebcdic-at-de-a.h: ../localedata/charmaps/EBCDIC-AT-DE-A Makefile
+$(objpfx)ebcdic-at-de-a.stmp: ../localedata/charmaps/EBCDIC-AT-DE-A Makefile
 	$(generate-8bit-table)
-$(objpfx)ebcdic-ca-fr.h: ../localedata/charmaps/EBCDIC-CA-FR Makefile
+$(objpfx)ebcdic-ca-fr.stmp: ../localedata/charmaps/EBCDIC-CA-FR Makefile
 	$(generate-8bit-table)
-$(objpfx)ebcdic-dk-no.h: ../localedata/charmaps/EBCDIC-DK-NO Makefile
+$(objpfx)ebcdic-dk-no.stmp: ../localedata/charmaps/EBCDIC-DK-NO Makefile
 	$(generate-8bit-table)
-$(objpfx)ebcdic-dk-no-a.h: ../localedata/charmaps/EBCDIC-DK-NO-A Makefile
+$(objpfx)ebcdic-dk-no-a.stmp: ../localedata/charmaps/EBCDIC-DK-NO-A Makefile
 	$(generate-8bit-table)
-$(objpfx)ebcdic-es.h: ../localedata/charmaps/EBCDIC-ES Makefile
+$(objpfx)ebcdic-es.stmp: ../localedata/charmaps/EBCDIC-ES Makefile
 	$(generate-8bit-table)
-$(objpfx)ebcdic-es-a.h: ../localedata/charmaps/EBCDIC-ES-A Makefile
+$(objpfx)ebcdic-es-a.stmp: ../localedata/charmaps/EBCDIC-ES-A Makefile
 	$(generate-8bit-table)
-$(objpfx)ebcdic-es-s.h: ../localedata/charmaps/EBCDIC-ES-S Makefile
+$(objpfx)ebcdic-es-s.stmp: ../localedata/charmaps/EBCDIC-ES-S Makefile
 	$(generate-8bit-table)
-$(objpfx)ebcdic-fi-se.h: ../localedata/charmaps/EBCDIC-FI-SE Makefile
+$(objpfx)ebcdic-fi-se.stmp: ../localedata/charmaps/EBCDIC-FI-SE Makefile
 	$(generate-8bit-table)
-$(objpfx)ebcdic-fi-se-a.h: ../localedata/charmaps/EBCDIC-FI-SE-A Makefile
+$(objpfx)ebcdic-fi-se-a.stmp: ../localedata/charmaps/EBCDIC-FI-SE-A Makefile
 	$(generate-8bit-table)
-$(objpfx)ebcdic-fr.h: ../localedata/charmaps/EBCDIC-FR Makefile
+$(objpfx)ebcdic-fr.stmp: ../localedata/charmaps/EBCDIC-FR Makefile
 	$(generate-8bit-table)
-$(objpfx)ebcdic-is-friss.h: ../localedata/charmaps/EBCDIC-IS-FRISS Makefile
+$(objpfx)ebcdic-is-friss.stmp: ../localedata/charmaps/EBCDIC-IS-FRISS Makefile
 	$(generate-8bit-table)
-$(objpfx)ebcdic-it.h: ../localedata/charmaps/EBCDIC-IT Makefile
+$(objpfx)ebcdic-it.stmp: ../localedata/charmaps/EBCDIC-IT Makefile
 	$(generate-8bit-table)
-$(objpfx)ebcdic-pt.h: ../localedata/charmaps/EBCDIC-PT Makefile
+$(objpfx)ebcdic-pt.stmp: ../localedata/charmaps/EBCDIC-PT Makefile
 	$(generate-8bit-table)
-$(objpfx)ebcdic-uk.h: ../localedata/charmaps/EBCDIC-UK Makefile
+$(objpfx)ebcdic-uk.stmp: ../localedata/charmaps/EBCDIC-UK Makefile
 	$(generate-8bit-table)
-$(objpfx)ebcdic-us.h: ../localedata/charmaps/EBCDIC-US Makefile
+$(objpfx)ebcdic-us.stmp: ../localedata/charmaps/EBCDIC-US Makefile
 	$(generate-8bit-table)
-$(objpfx)ibm037.h: ../localedata/charmaps/IBM037 Makefile
+$(objpfx)ibm037.stmp: ../localedata/charmaps/IBM037 Makefile
 	$(generate-8bit-table)
-$(objpfx)ibm038.h: ../localedata/charmaps/IBM038 Makefile
+$(objpfx)ibm038.stmp: ../localedata/charmaps/IBM038 Makefile
 	$(generate-8bit-table)
-$(objpfx)ibm274.h: ../localedata/charmaps/IBM274 Makefile
+$(objpfx)ibm274.stmp: ../localedata/charmaps/IBM274 Makefile
 	$(generate-8bit-table)
-$(objpfx)ibm275.h: ../localedata/charmaps/IBM275 Makefile
+$(objpfx)ibm275.stmp: ../localedata/charmaps/IBM275 Makefile
 	$(generate-8bit-table)
-$(objpfx)ibm423.h: ../localedata/charmaps/IBM423 Makefile
+$(objpfx)ibm423.stmp: ../localedata/charmaps/IBM423 Makefile
 	$(generate-8bit-table)
-$(objpfx)ibm500.h: ../localedata/charmaps/IBM500 Makefile
+$(objpfx)ibm500.stmp: ../localedata/charmaps/IBM500 Makefile
 	$(generate-8bit-table)
-$(objpfx)ibm870.h: ../localedata/charmaps/IBM870 Makefile
+$(objpfx)ibm870.stmp: ../localedata/charmaps/IBM870 Makefile
 	$(generate-8bit-table)
-$(objpfx)ibm871.h: ../localedata/charmaps/IBM871 Makefile
+$(objpfx)ibm871.stmp: ../localedata/charmaps/IBM871 Makefile
 	$(generate-8bit-table)
-$(objpfx)ibm891.h: ../localedata/charmaps/IBM891 Makefile
+$(objpfx)ibm891.stmp: ../localedata/charmaps/IBM891 Makefile
 	$(generate-8bit-table)
-$(objpfx)ibm903.h: ../localedata/charmaps/IBM903 Makefile
+$(objpfx)ibm903.stmp: ../localedata/charmaps/IBM903 Makefile
 	$(generate-8bit-table)
-$(objpfx)ibm904.h: ../localedata/charmaps/IBM904 Makefile
+$(objpfx)ibm904.stmp: ../localedata/charmaps/IBM904 Makefile
 	$(generate-8bit-table)
-$(objpfx)ibm905.h: ../localedata/charmaps/IBM905 Makefile
+$(objpfx)ibm905.stmp: ../localedata/charmaps/IBM905 Makefile
 	$(generate-8bit-table)
-$(objpfx)ibm1047.h: ../localedata/charmaps/IBM1047 Makefile
+$(objpfx)ibm1047.stmp: ../localedata/charmaps/IBM1047 Makefile
 	$(generate-8bit-table)
 
-$(objpfx)iso8859-7jp.h: ../localedata/charmaps/ISO-8859-7 Makefile
+ifneq ($(PERL),no)
+$(perl-generated-headers:%=$(objpfx)%): $(objpfx)%.h: $(objpfx)%.stmp
+	@:
+
+$(objpfx)iso8859-5.stmp: ../localedata/charmaps/ISO-8859-5 Makefile
+	$(generate-8bit-gap-table)
+$(objpfx)iso8859-7.stmp: ../localedata/charmaps/ISO-8859-7 Makefile
+	$(generate-8bit-gap-table)
+$(objpfx)iso8859-7jp.stmp: ../localedata/charmaps/ISO-8859-7 Makefile
 	$(make-target-directory)
 	( echo "static const uint32_t iso88597_to_ucs4[96] = {"; \
-	  sed -e '/^[^[:space:]]*[[:space:]]*.x00/d' -e 's/^[^[:space:]]*[[:space:]]*.x\([A-F].\)[[:space:]]*<U\(....\)>.*/  [0x\1 - 0xA0] = 0x\2,/p' -e d $^ | sort -u; \
+	  sed -n -e '/^[^[:space:]]*[[:space:]]*.x00/d' -e 's/^[^[:space:]]*[[:space:]]*.x\([A-F].\)[[:space:]]*<U\(....\)>.*/  [0x\1 - 0xA0] = 0x\2,/p' $< | sort -u; \
 	  echo "};"; \
 	  echo "static const struct gap from_idx[] = {"; \
-	  sed -e 's/^[^[:space:]]*[[:space:]]*.x\([A-F].\)[[:space:]]*<U\(....\)>.*/0x\2 0x\1/p' -e d $^ | sort -u | $(PERL) gap.pl; \
+	  sed -n -e 's/^[^[:space:]]*[[:space:]]*.x\([A-F].\)[[:space:]]*<U\(....\)>.*/0x\2 0x\1/p' $< | sort -u | $(PERL) gap.pl; \
 	  echo "  { start: 0xffff, end: 0xffff, idx:     0 }"; \
 	  echo "};"; \
 	  echo "static const char iso88597_from_ucs4[] = {"; \
-	  sed -e 's/^[^[:space:]]*[[:space:]]*.x\([A-F].\)[[:space:]]*<U\(....\)>.*/0x\2 0x\1/p' -e d $^ | sort -u | $(PERL) gaptab.pl; \
-	  echo "};" ) > $@.new && rm -f $@ && mv $@.new $@
-
+	  sed -n -e 's/^[^[:space:]]*[[:space:]]*.x\([A-F].\)[[:space:]]*<U\(....\)>.*/0x\2 0x\1/p' $< | sort -u | $(PERL) gaptab.pl; \
+	  echo "};" ) > $(@:stmp=T)
+	$(move-if-change) $(@:stmp=T) $(@:stmp=h)
+	touch $@
 
-ifneq ($(PERL),no)
-$(objpfx)iso8859-5.h: ../localedata/charmaps/ISO-8859-5 Makefile
+$(objpfx)iso8859-8.stmp: ../localedata/charmaps/ISO-8859-8 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)iso8859-7.h: ../localedata/charmaps/ISO-8859-7 Makefile
+$(objpfx)iso8859-10.stmp: ../localedata/charmaps/ISO-8859-10 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)iso8859-8.h: ../localedata/charmaps/ISO-8859-8 Makefile
-	$(generate-8bit-gap-table)
-$(objpfx)iso8859-10.h: ../localedata/charmaps/ISO-8859-10 Makefile
-	$(generate-8bit-gap-table)
-
-$(objpfx)koi8-r.h: ../localedata/charmaps/KOI8-R Makefile
+$(objpfx)koi8-r.stmp: ../localedata/charmaps/KOI8-R Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)latin-greek.h: ../localedata/charmaps/LATIN-GREEK Makefile
+$(objpfx)latin-greek.stmp: ../localedata/charmaps/LATIN-GREEK Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)latin-greek-1.h: ../localedata/charmaps/LATIN-GREEK-1 Makefile
+$(objpfx)latin-greek-1.stmp: ../localedata/charmaps/LATIN-GREEK-1 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm256.h: ../localedata/charmaps/IBM256 Makefile
+$(objpfx)ibm256.stmp: ../localedata/charmaps/IBM256 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm273.h: ../localedata/charmaps/IBM273 Makefile
+$(objpfx)ibm273.stmp: ../localedata/charmaps/IBM273 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm277.h: ../localedata/charmaps/IBM277 Makefile
+$(objpfx)ibm277.stmp: ../localedata/charmaps/IBM277 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm278.h: ../localedata/charmaps/IBM278 Makefile
+$(objpfx)ibm278.stmp: ../localedata/charmaps/IBM278 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm280.h: ../localedata/charmaps/IBM280 Makefile
+$(objpfx)ibm280.stmp: ../localedata/charmaps/IBM280 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm281.h: ../localedata/charmaps/IBM281 Makefile
+$(objpfx)ibm281.stmp: ../localedata/charmaps/IBM281 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm284.h: ../localedata/charmaps/IBM284 Makefile
+$(objpfx)ibm284.stmp: ../localedata/charmaps/IBM284 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm285.h: ../localedata/charmaps/IBM285 Makefile
+$(objpfx)ibm285.stmp: ../localedata/charmaps/IBM285 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm290.h: ../localedata/charmaps/IBM290 Makefile
+$(objpfx)ibm290.stmp: ../localedata/charmaps/IBM290 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm297.h: ../localedata/charmaps/IBM297 Makefile
+$(objpfx)ibm297.stmp: ../localedata/charmaps/IBM297 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm420.h: ../localedata/charmaps/IBM420 Makefile
+$(objpfx)ibm420.stmp: ../localedata/charmaps/IBM420 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm424.h: ../localedata/charmaps/IBM424 Makefile
+$(objpfx)ibm424.stmp: ../localedata/charmaps/IBM424 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm437.h: ../localedata/charmaps/IBM437 Makefile
+$(objpfx)ibm437.stmp: ../localedata/charmaps/IBM437 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm850.h: ../localedata/charmaps/IBM850 Makefile
+$(objpfx)ibm850.stmp: ../localedata/charmaps/IBM850 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm851.h: ../localedata/charmaps/IBM851 Makefile
+$(objpfx)ibm851.stmp: ../localedata/charmaps/IBM851 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm852.h: ../localedata/charmaps/IBM852 Makefile
+$(objpfx)ibm852.stmp: ../localedata/charmaps/IBM852 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm855.h: ../localedata/charmaps/IBM855 Makefile
+$(objpfx)ibm855.stmp: ../localedata/charmaps/IBM855 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm857.h: ../localedata/charmaps/IBM857 Makefile
+$(objpfx)ibm857.stmp: ../localedata/charmaps/IBM857 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm860.h: ../localedata/charmaps/IBM860 Makefile
+$(objpfx)ibm860.stmp: ../localedata/charmaps/IBM860 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm861.h: ../localedata/charmaps/IBM861 Makefile
+$(objpfx)ibm861.stmp: ../localedata/charmaps/IBM861 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm862.h: ../localedata/charmaps/IBM862 Makefile
+$(objpfx)ibm862.stmp: ../localedata/charmaps/IBM862 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm863.h: ../localedata/charmaps/IBM863 Makefile
+$(objpfx)ibm863.stmp: ../localedata/charmaps/IBM863 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm864.h: ../localedata/charmaps/IBM864 Makefile
+$(objpfx)ibm864.stmp: ../localedata/charmaps/IBM864 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm865.h: ../localedata/charmaps/IBM865 Makefile
+$(objpfx)ibm865.stmp: ../localedata/charmaps/IBM865 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm868.h: ../localedata/charmaps/IBM868 Makefile
+$(objpfx)ibm868.stmp: ../localedata/charmaps/IBM868 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm869.h: ../localedata/charmaps/IBM869 Makefile
+$(objpfx)ibm869.stmp: ../localedata/charmaps/IBM869 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm875.h: ../localedata/charmaps/IBM875 Makefile
+$(objpfx)ibm875.stmp: ../localedata/charmaps/IBM875 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm880.h: ../localedata/charmaps/IBM880 Makefile
+$(objpfx)ibm880.stmp: ../localedata/charmaps/IBM880 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm918.h: ../localedata/charmaps/IBM918 Makefile
+$(objpfx)ibm918.stmp: ../localedata/charmaps/IBM918 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm1004.h: ../localedata/charmaps/IBM1004 Makefile
+$(objpfx)ibm1004.stmp: ../localedata/charmaps/IBM1004 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)ibm1026.h: ../localedata/charmaps/IBM1026 Makefile
+$(objpfx)ibm1026.stmp: ../localedata/charmaps/IBM1026 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)cp1250.h: ../localedata/charmaps/CP1250 Makefile
+$(objpfx)cp1250.stmp: ../localedata/charmaps/CP1250 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)cp1251.h: ../localedata/charmaps/CP1251 Makefile
+$(objpfx)cp1251.stmp: ../localedata/charmaps/CP1251 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)cp1252.h: ../localedata/charmaps/CP1252 Makefile
+$(objpfx)cp1252.stmp: ../localedata/charmaps/CP1252 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)cp1253.h: ../localedata/charmaps/CP1253 Makefile
+$(objpfx)cp1253.stmp: ../localedata/charmaps/CP1253 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)cp1254.h: ../localedata/charmaps/CP1254 Makefile
+$(objpfx)cp1254.stmp: ../localedata/charmaps/CP1254 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)cp1255.h: ../localedata/charmaps/CP1255 Makefile
+$(objpfx)cp1255.stmp: ../localedata/charmaps/CP1255 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)cp1256.h: ../localedata/charmaps/CP1256 Makefile
+$(objpfx)cp1256.stmp: ../localedata/charmaps/CP1256 Makefile
 	$(generate-8bit-gap-table)
-$(objpfx)cp1257.h: ../localedata/charmaps/CP1257 Makefile
+$(objpfx)cp1257.stmp: ../localedata/charmaps/CP1257 Makefile
 	$(generate-8bit-gap-table)
 endif
 
============================================================
Index: linuxthreads/Makefile
--- linuxthreads/Makefile	Sat, 09 May 1998 13:36:13 -0400 zack  Z.1
+++ linuxthreads/Makefile	Sun, 10 May 1998 21:50:42 -0400 zack  Z.2
@@ -34,7 +34,6 @@
 libpthread-routines := attr cancel condvar join manager mutex ptfork \
 		       ptlongjmp pthread signals specific errno lockfile \
 		       semaphore spinlock wrapsyscall rwlock
-libpthread-map	:= libpthread.map
 
 include ../Rules
 
============================================================
Index: locale/Makefile
--- locale/Makefile	Sat, 09 May 1998 13:36:13 -0400 zack  Z.1
+++ locale/Makefile	Sun, 10 May 1998 21:50:42 -0400 zack  Z.2
@@ -46,7 +46,6 @@
 extra-libs-others = $(extra-libs)
 
 libBrokenLocale-routines = broken_cur_max
-libBrokenLocale-map = libBrokenLocale.map
 
 subdir-dirs	= programs
 vpath %.c programs
============================================================
Index: login/Makefile
--- login/Makefile	Sat, 09 May 1998 13:36:13 -0400 zack  Z.1
+++ login/Makefile	Sun, 10 May 1998 21:50:42 -0400 zack  Z.2
@@ -48,7 +48,6 @@
 extra-libs-others := $(extra-libs)
 
 libutil-routines:= login login_tty logout logwtmp openpty forkpty
-libutil-map	:= libutil.map
 
 include ../Rules
 
============================================================
Index: math/Makefile
--- math/Makefile	Sat, 09 May 1998 13:36:13 -0400 zack  Z.1
+++ math/Makefile	Sun, 10 May 1998 21:50:42 -0400 zack  Z.2
@@ -36,8 +36,6 @@
 extra-libs	:= libm
 extra-libs-others = $(extra-libs)
 
-libm-map	:= libm.map
-
 libm-support = k_standard s_lib_version s_matherr s_signgam		\
 	       fclrexcpt fgetexcptflg fraiseexcpt fsetexcptflg		\
 	       ftestexcept fegetround fesetround fegetenv feholdexcpt	\
============================================================
Index: md5-crypt/Makefile
--- md5-crypt/Makefile	Sat, 09 May 1998 13:36:13 -0400 zack  Z.1
+++ md5-crypt/Makefile	Sun, 10 May 1998 21:50:42 -0400 zack  Z.2
@@ -32,7 +32,6 @@
 
 md5-routines := crypt-entry md5-crypt md5
 libcrypt-routines := $(md5-routines)
-libcrypt-map := libcrypt.map
 
 onlymd5-routines := onlymd5-entry md5-crypt md5
 distribute += onlymd5-entry.c
============================================================
Index: nis/Makefile
--- nis/Makefile	Sat, 09 May 1998 13:36:13 -0400 zack  Z.1
+++ nis/Makefile	Sun, 10 May 1998 21:50:42 -0400 zack  Z.2
@@ -53,19 +53,15 @@
 		  nis_modify nis_remove nis_add nis_defaults\
 		  nis_findserv nis_callback nis_clone_dir nis_clone_obj\
 		  nis_clone_res
-libnsl-map	= libnsl.map
 
 libnss_compat-routines	:= $(addprefix compat-,grp pwd spwd) nisplus-parser
 libnss_compat-inhibit-o	= $(filter-out .os,$(object-suffixes))
-libnss_compat-map	:= libnss_compat.map
 
 libnss_nis-routines	:= $(addprefix nis-,$(databases))
 libnss_nis-inhibit-o	= $(filter-out .os,$(object-suffixes))
-libnss_nis-map		:= libnss_nis.map
 
 libnss_nisplus-routines	:= $(addprefix nisplus-,$(databases)) nisplus-parser
 libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes))
-libnss_nisplus-map	:= libnss_nisplus.map
 
 include ../Rules
 
============================================================
Index: nss/Makefile
--- nss/Makefile	Sat, 09 May 1998 13:36:13 -0400 zack  Z.1
+++ nss/Makefile	Sun, 10 May 1998 21:50:42 -0400 zack  Z.2
@@ -54,19 +54,15 @@
 
 
 libnss_files-routines	:= $(addprefix files-,$(filter-out key, $(databases)))
-libnss_files-map	:= libnss_files.map
 distribute		+= files-XXX.c files-parse.c
 
 libnss_db-routines	:= $(addprefix db-,$(filter-out hosts network key,\
 							$(databases)))
-libnss_db-map		:= libnss_db.map
 generated		+= $(filter-out db-alias.c db-netgrp.c, \
 					$(addsuffix .c,$(libnss_db-routines)))
 distribute		+= db-XXX.c
 
 libnss_ldap-routines	:= $(addprefix ldap-,proto) util ldap-nss
-libnss_ldap-map		:= libnss_ldap.map
-
 
 # Build static module if requested
 ifneq ($(build-static-nss),yes)
============================================================
Index: resolv/Makefile
--- resolv/Makefile	Sat, 09 May 1998 13:36:13 -0400 zack  Z.1
+++ resolv/Makefile	Sun, 10 May 1998 21:50:42 -0400 zack  Z.2
@@ -36,13 +36,11 @@
 libresolv-routines := gethnamaddr res_comp res_debug	\
 		      res_data res_mkquery res_query res_send		\
 		      inet_net_ntop inet_net_pton inet_neta base64
-libresolv-map := libresolv.map
 
 subdir-dirs = nss_dns
 vpath %.c nss_dns
 
 libnss_dns-routines	:= dns-host dns-network
-libnss_dns-map		:= libnss_dns.map
 ifneq ($(build-static-nss),yes)
 libnss_dns-inhibit-o	= $(filter-out .os,$(object-suffixes))
 endif
============================================================
Index: rt/Makefile
--- rt/Makefile	Sat, 09 May 1998 13:36:13 -0400 zack  Z.1
+++ rt/Makefile	Sun, 10 May 1998 21:50:42 -0400 zack  Z.2
@@ -27,9 +27,6 @@
 		  aio_read64 aio_return aio_suspend aio_write		\
 		  aio_write64 lio_listio lio_listio64 aio_sigqueue	\
 		  aio_notify
-
-librt-map := librt.map
-
 tests := tst-aio
 
 # Make sure that everything is distributed independent of configuration.
============================================================
Index: sunrpc/Makefile
--- sunrpc/Makefile	Sat, 09 May 1998 13:36:13 -0400 zack  Z.1
+++ sunrpc/Makefile	Sun, 10 May 1998 21:50:42 -0400 zack  Z.2
@@ -135,15 +135,14 @@
 # Generate the rpcsvc headers with rpcgen.
 # We use a stamp file to avoid unnessary recompilation each time rpcgen is
 # relinked.
+move-if-change = ./$(..)scripts/move-if-change
 $(rpcsvc:%.x=$(objpfx)rpcsvc/%.h): $(objpfx)rpcsvc/%.h: $(objpfx)rpcsvc/%.stmp
 	@:
 $(objpfx)rpcsvc/%.stmp: rpcsvc/%.x $(objpfx)rpcgen
 	$(make-target-directory)
 	-@rm -f ${@:stmp=T} $@
 	$(rpcgen-cmd) -h $< -o ${@:stmp=T}
-	if test -r ${@:stmp=h} && cmp -s ${@:stmp=h} ${@:stmp=T}; \
-	then rm -f ${@:stmp=T}; \
-	else mv -f ${@:stmp=T} ${@:stmp=h}; fi
+	$(move-if-change) $(@:stmp=T) $(@:stmp=h)
 	touch $@
 
 # Generate the rpcsvc XDR functions with rpcgen.
@@ -152,9 +151,7 @@
 $(objpfx)x%.stmp: rpcsvc/%.x $(objpfx)rpcgen
 	-@rm -f ${@:stmp=T} $@
 	$(rpcgen-cmd) -c $< -o ${@:stmp=T}
-	if test -r ${@:stmp=c} && cmp -s ${@:stmp=c} ${@:stmp=T}; \
-	then rm -f ${@:stmp=T}; \
-	else mv -f ${@:stmp=T} ${@:stmp=c}; fi
+	$(move-if-change) $(@:stmp=T) $(@:stmp=h)
 	touch $@
 
 # The generated source files depend on the corresponding generated headers.



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