mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
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:
parent
65241f7ef4
commit
d67071df3f
@ -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
|
||||||
|
@ -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++
|
||||||
|
|
||||||
|
@ -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++
|
||||||
|
@ -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++
|
||||||
|
|
||||||
|
@ -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 $@)
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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,;.*,;,' > $@
|
||||||
|
|
||||||
|
@ -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,;.*,;,' > $@
|
||||||
|
|
||||||
|
@ -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,;.*,;,' > $@
|
||||||
|
|
||||||
|
@ -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,;.*,;,' > $@
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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++
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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 $< $@
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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,;.*,;,' > $@
|
||||||
|
|
||||||
|
|
||||||
|
@ -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 $< $@
|
||||||
|
|
||||||
|
@ -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 $< $@
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -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 $< $@
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -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.
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user