Bugzilla Bug 303508: enhanced the makefile rule for $(MAPFILE). Added

the new variable MAPFILE_SOURCE instead of the hardcoded
$(LIBRARY_NAME).def to represent the "source" mapfile, and use $< to
refer to the "source" mapfile (prerequisite of the target) in
PROCESS_MAP_FILE. r=nelsonb.
Modified Files:
	AIX.mk BSD_OS.mk Darwin.mk FreeBSD.mk HP-UX.mk IRIX.mk
	Linux.mk Linux2.1.mk Linux2.2.mk Linux2.4.mk Linux2.5.mk
	Linux2.6.mk NCR3.0.mk NEC4.2.mk NetBSD.mk OS2.mk OSF1.mk
	OpenUNIX.mk OpenVMS.mk ReliantUNIX.mk SCO_SV3.2.mk SunOS5.mk
	UNIXWARE2.1.mk WIN16.mk WIN32.mk WINCE.mk rules.mk ruleset.mk
This commit is contained in:
wtchang%redhat.com 2005-09-16 17:09:23 +00:00
parent 65241f7ef4
commit d67071df3f
28 changed files with 31 additions and 28 deletions

View File

@ -84,7 +84,7 @@ else
DSO_LDOPTS += -bexpall DSO_LDOPTS += -bexpall
endif endif
PROCESS_MAP_FILE = grep -v ';+' $(LIBRARY_NAME).def | grep -v ';-' | \ PROCESS_MAP_FILE = grep -v ';+' $< | grep -v ';-' | \
sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' > $@ sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' > $@
ifdef BUILD_OPT ifdef BUILD_OPT

View File

@ -84,7 +84,7 @@ ifdef MAPFILE
# Add LD options to restrict exported symbols to those in the map file # Add LD options to restrict exported symbols to those in the map file
endif endif
# Change PROCESS to put the mapfile in the correct format for this platform # Change PROCESS to put the mapfile in the correct format for this platform
PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ PROCESS_MAP_FILE = cp $< $@
G++INCLUDES = -I/usr/include/g++ G++INCLUDES = -I/usr/include/g++

View File

@ -104,7 +104,7 @@ DSO_LDOPTS = -dynamiclib -compatibility_version 1 -current_version 1 -install_na
MKSHLIB = $(CC) -arch $(CPU_ARCH) $(DSO_LDOPTS) MKSHLIB = $(CC) -arch $(CPU_ARCH) $(DSO_LDOPTS)
DLL_SUFFIX = dylib DLL_SUFFIX = dylib
PROCESS_MAP_FILE = grep -v ';+' $(LIBRARY_NAME).def | grep -v ';-' | \ PROCESS_MAP_FILE = grep -v ';+' $< | grep -v ';-' | \
sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,^,_,' > $@ sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,^,_,' > $@
G++INCLUDES = -I/usr/include/g++ G++INCLUDES = -I/usr/include/g++

View File

@ -78,7 +78,7 @@ ifdef MAPFILE
# Add LD options to restrict exported symbols to those in the map file # Add LD options to restrict exported symbols to those in the map file
endif endif
# Change PROCESS to put the mapfile in the correct format for this platform # Change PROCESS to put the mapfile in the correct format for this platform
PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ PROCESS_MAP_FILE = cp $< $@
G++INCLUDES = -I/usr/include/g++ G++INCLUDES = -I/usr/include/g++

View File

@ -71,7 +71,7 @@ MKSHLIB = $(LD) $(DSO_LDOPTS)
ifdef MAPFILE ifdef MAPFILE
MKSHLIB += -c $(MAPFILE) MKSHLIB += -c $(MAPFILE)
endif endif
PROCESS_MAP_FILE = grep -v ';+' $(LIBRARY_NAME).def | grep -v ';-' | \ PROCESS_MAP_FILE = grep -v ';+' $< | grep -v ';-' | \
sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,^,+e ,' > $@ sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,^,+e ,' > $@
DSO_LDOPTS = -b +h $(notdir $@) DSO_LDOPTS = -b +h $(notdir $@)

View File

@ -107,7 +107,7 @@ ifdef MAPFILE
# Add LD options to restrict exported symbols to those in the map file # Add LD options to restrict exported symbols to those in the map file
endif endif
# Change PROCESS to put the mapfile in the correct format for this platform # Change PROCESS to put the mapfile in the correct format for this platform
PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ PROCESS_MAP_FILE = cp $< $@
DSO_LDOPTS = -elf -shared -all DSO_LDOPTS = -elf -shared -all

View File

@ -143,7 +143,7 @@ ifeq ($(OS_RELEASE),2.0)
ifdef MAPFILE ifdef MAPFILE
MKSHLIB += -Wl,--version-script,$(MAPFILE) MKSHLIB += -Wl,--version-script,$(MAPFILE)
endif endif
PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \ PROCESS_MAP_FILE = grep -v ';-' $< | \
sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
endif endif

View File

@ -42,7 +42,7 @@ ifeq ($(OS_RELEASE),2.1)
ifdef MAPFILE ifdef MAPFILE
MKSHLIB += -Wl,--version-script,$(MAPFILE) MKSHLIB += -Wl,--version-script,$(MAPFILE)
endif endif
PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \ PROCESS_MAP_FILE = grep -v ';-' $< | \
sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
endif endif

View File

@ -43,6 +43,6 @@ MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
ifdef MAPFILE ifdef MAPFILE
MKSHLIB += -Wl,--version-script,$(MAPFILE) MKSHLIB += -Wl,--version-script,$(MAPFILE)
endif endif
PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \ PROCESS_MAP_FILE = grep -v ';-' $< | \
sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@

View File

@ -43,6 +43,6 @@ MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
ifdef MAPFILE ifdef MAPFILE
MKSHLIB += -Wl,--version-script,$(MAPFILE) MKSHLIB += -Wl,--version-script,$(MAPFILE)
endif endif
PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \ PROCESS_MAP_FILE = grep -v ';-' $< | \
sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@

View File

@ -43,6 +43,6 @@ MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
ifdef MAPFILE ifdef MAPFILE
MKSHLIB += -Wl,--version-script,$(MAPFILE) MKSHLIB += -Wl,--version-script,$(MAPFILE)
endif endif
PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \ PROCESS_MAP_FILE = grep -v ';-' $< | \
sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@

View File

@ -43,6 +43,6 @@ MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
ifdef MAPFILE ifdef MAPFILE
MKSHLIB += -Wl,--version-script,$(MAPFILE) MKSHLIB += -Wl,--version-script,$(MAPFILE)
endif endif
PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \ PROCESS_MAP_FILE = grep -v ';-' $< | \
sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@

View File

@ -72,7 +72,7 @@ ifdef MAPFILE
# Add LD options to restrict exported symbols to those in the map file # Add LD options to restrict exported symbols to those in the map file
endif endif
# Change PROCESS to put the mapfile in the correct format for this platform # Change PROCESS to put the mapfile in the correct format for this platform
PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ PROCESS_MAP_FILE = cp $< $@
CPU_ARCH = x86 CPU_ARCH = x86
ARCH = ncr ARCH = ncr

View File

@ -55,7 +55,7 @@ ifdef MAPFILE
# Add LD options to restrict exported symbols to those in the map file # Add LD options to restrict exported symbols to those in the map file
endif endif
# Change PROCESS to put the mapfile in the correct format for this platform # Change PROCESS to put the mapfile in the correct format for this platform
PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ PROCESS_MAP_FILE = cp $< $@
RANLIB = /bin/true RANLIB = /bin/true

View File

@ -80,7 +80,7 @@ ifdef MAPFILE
# Add LD options to restrict exported symbols to those in the map file # Add LD options to restrict exported symbols to those in the map file
endif endif
# Change PROCESS to put the mapfile in the correct format for this platform # Change PROCESS to put the mapfile in the correct format for this platform
PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ PROCESS_MAP_FILE = cp $< $@
G++INCLUDES = -I/usr/include/g++ G++INCLUDES = -I/usr/include/g++

View File

@ -101,7 +101,7 @@ PROCESS_MAP_FILE = \
echo CODE LOADONCALL MOVEABLE DISCARDABLE >> $@; \ echo CODE LOADONCALL MOVEABLE DISCARDABLE >> $@; \
echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> $@; \ echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> $@; \
echo EXPORTS >> $@; \ echo EXPORTS >> $@; \
grep -v ';+' $(LIBRARY_NAME).def | grep -v ';-' | \ grep -v ';+' $< | grep -v ';-' | \
sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,\([\t ]*\),\1_,' | \ sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,\([\t ]*\),\1_,' | \
awk 'BEGIN {ord=1;} { print($$0 " @" ord " RESIDENTNAME"); ord++;}' >> $@ awk 'BEGIN {ord=1;} { print($$0 " @" ord " RESIDENTNAME"); ord++;}' >> $@
@ -168,7 +168,7 @@ PROCESS_MAP_FILE = \
echo CODE LOADONCALL MOVEABLE DISCARDABLE >> $@; \ echo CODE LOADONCALL MOVEABLE DISCARDABLE >> $@; \
echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> $@; \ echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> $@; \
echo EXPORTS >> $@; \ echo EXPORTS >> $@; \
grep -v ';+' $(LIBRARY_NAME).def | grep -v ';-' | \ grep -v ';+' $< | grep -v ';-' | \
sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' >> $@ sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' >> $@
endif #NO_SHARED_LIB endif #NO_SHARED_LIB

View File

@ -68,7 +68,7 @@ MKSHLIB += ld -shared -expect_unresolved "*" -soname $(notdir $@)
ifdef MAPFILE ifdef MAPFILE
MKSHLIB += -hidden -input $(MAPFILE) MKSHLIB += -hidden -input $(MAPFILE)
endif endif
PROCESS_MAP_FILE = grep -v ';+' $(LIBRARY_NAME).def | grep -v ';-' | \ PROCESS_MAP_FILE = grep -v ';+' $< | grep -v ';-' | \
sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,^,-exported_symbol ,' > $@ sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,^,-exported_symbol ,' > $@
DSO_LDOPTS += -shared DSO_LDOPTS += -shared

View File

@ -79,7 +79,7 @@ ifdef MAPFILE
# Add LD options to restrict exported symbols to those in the map file # Add LD options to restrict exported symbols to those in the map file
endif endif
# Change PROCESS to put the mapfile in the correct format for this platform # Change PROCESS to put the mapfile in the correct format for this platform
PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ PROCESS_MAP_FILE = cp $< $@
# #
# These defines are for building unix plugins # These defines are for building unix plugins

View File

@ -66,7 +66,7 @@ ifdef MAPFILE
# Add LD options to restrict exported symbols to those in the map file # Add LD options to restrict exported symbols to those in the map file
endif endif
# Change PROCESS to put the mapfile in the correct format for this platform # Change PROCESS to put the mapfile in the correct format for this platform
PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ PROCESS_MAP_FILE = cp $< $@
# #

View File

@ -71,7 +71,7 @@ ifdef MAPFILE
# Add LD options to restrict exported symbols to those in the map file # Add LD options to restrict exported symbols to those in the map file
endif endif
# Change PROCESS to put the mapfile in the correct format for this platform # Change PROCESS to put the mapfile in the correct format for this platform
PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ PROCESS_MAP_FILE = cp $< $@
NOSUCHFILE = /sni-rm-f-sucks NOSUCHFILE = /sni-rm-f-sucks
ODD_CFLAGS += -DSVR4 -DSNI -DRELIANTUNIX ODD_CFLAGS += -DSVR4 -DSNI -DRELIANTUNIX

View File

@ -79,7 +79,7 @@ ifdef MAPFILE
# Add LD options to restrict exported symbols to those in the map file # Add LD options to restrict exported symbols to those in the map file
endif endif
# Change PROCESS to put the mapfile in the correct format for this platform # Change PROCESS to put the mapfile in the correct format for this platform
PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ PROCESS_MAP_FILE = cp $< $@
# #
# These defines are for building unix plugins # These defines are for building unix plugins

View File

@ -150,7 +150,7 @@ else
MKSHLIB += -M $(MAPFILE) MKSHLIB += -M $(MAPFILE)
endif endif
endif endif
PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \ PROCESS_MAP_FILE = grep -v ';-' $< | \
sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@

View File

@ -57,5 +57,5 @@ ifdef MAPFILE
# Add LD options to restrict exported symbols to those in the map file # Add LD options to restrict exported symbols to those in the map file
endif endif
# Change PROCESS to put the mapfile in the correct format for this platform # Change PROCESS to put the mapfile in the correct format for this platform
PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ PROCESS_MAP_FILE = cp $< $@

View File

@ -117,7 +117,7 @@ ifdef MAPFILE
# Add LD options to restrict exported symbols to those in the map file # Add LD options to restrict exported symbols to those in the map file
endif endif
# Change PROCESS to put the mapfile in the correct format for this platform # Change PROCESS to put the mapfile in the correct format for this platform
PROCESS_MAP_FILE = copy $(LIBRARY_NAME).def $@ PROCESS_MAP_FILE = copy $< $@
# #

View File

@ -157,7 +157,7 @@ DLLFLAGS += -DEF:$(MAPFILE)
endif endif
endif endif
# Change PROCESS to put the mapfile in the correct format for this platform # Change PROCESS to put the mapfile in the correct format for this platform
PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ PROCESS_MAP_FILE = cp $< $@
# #

View File

@ -111,7 +111,7 @@ ifdef MAPFILE
endif endif
# Change PROCESS to put the mapfile in the correct format for this platform # Change PROCESS to put the mapfile in the correct format for this platform
PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ PROCESS_MAP_FILE = cp $< $@
# #
# The following is NOT needed for the NSPR 2.0 library. # The following is NOT needed for the NSPR 2.0 library.

View File

@ -373,7 +373,7 @@ endif
@echo $(RES) finished @echo $(RES) finished
endif endif
$(MAPFILE): $(LIBRARY_NAME).def $(MAPFILE): $(MAPFILE_SOURCE)
@$(MAKE_OBJDIR) @$(MAKE_OBJDIR)
$(PROCESS_MAP_FILE) $(PROCESS_MAP_FILE)

View File

@ -123,6 +123,9 @@ ifdef LIBRARY_NAME
ifndef SHARED_LIBRARY ifndef SHARED_LIBRARY
SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(JDK_DEBUG_SUFFIX).$(DLL_SUFFIX) SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(JDK_DEBUG_SUFFIX).$(DLL_SUFFIX)
endif endif
ifndef MAPFILE_SOURCE
MAPFILE_SOURCE = $(LIBRARY_NAME).def
endif
endif endif
# #