* Many files: Added gettext invocations around user-visible

strings.
	* ld.h: Added gettext-related includes and defines.
	* ldmain.c: Call setlocale, bindtextdomain, textdomain.
	* acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY,
	HAVE_LC_MESSAGES): Define.
	* configure.in: Call CY_GNU_GETTEXT.  Create po/Makefile.in and
	po/Makefile.  Use AM_PROG_LEX.
	(TDIRS): AC_SUBST early on, to avoid having value split when it
	happens to cross line 90 of the generated sed script.
	* Makefile.am (SUBDIRS): New macro.
	(POTFILES): Likewise.
	(po/POTFILES.in): New target.
	(ld_new_LDADD): Added INTLLIBS.
	(ld_new_DEPENDENCIES): Added INTLDEPS.
	* po/Make-in, po/POTFILES.in, po/gas.pot: New files.
This commit is contained in:
Tom Tromey 1998-04-22 06:58:37 +00:00
parent b65c61635f
commit 8bc8f4bc00
13 changed files with 2852 additions and 448 deletions

View File

@ -1,3 +1,22 @@
Tue Apr 21 23:12:40 1998 Tom Tromey <tromey@scribbles.cygnus.com>
* Many files: Added gettext invocations around user-visible
strings.
* ld.h: Added gettext-related includes and defines.
* ldmain.c: Call setlocale, bindtextdomain, textdomain.
* acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY,
HAVE_LC_MESSAGES): Define.
* configure.in: Call CY_GNU_GETTEXT. Create po/Makefile.in and
po/Makefile. Use AM_PROG_LEX.
(TDIRS): AC_SUBST early on, to avoid having value split when it
happens to cross line 90 of the generated sed script.
* Makefile.am (SUBDIRS): New macro.
(POTFILES): Likewise.
(po/POTFILES.in): New target.
(ld_new_LDADD): Added INTLLIBS.
(ld_new_DEPENDENCIES): Added INTLDEPS.
* po/Make-in, po/POTFILES.in, po/gas.pot: New files.
Tue Apr 21 23:07:07 1998 Ian Lance Taylor <ian@cygnus.com>
* ld.texinfo (Simple Example): Rewrite a few things as suggested

View File

@ -1,7 +1,12 @@
## Process this file with automake to generate Makefile.in
## FIXME: work around apparent automake bug.
INTLLIBS = @INTLLIBS@
AUTOMAKE_OPTIONS = cygnus dejagnu
SUBDIRS = po
tooldir = $(exec_prefix)/$(target_alias)
YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
@ -84,7 +89,7 @@ info_TEXINFOS = ld.texinfo
noinst_TEXINFOS = ldint.texinfo
man_MANS = ld.1
INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) $(HDEFINES) $(CFLAGS)
INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(prefix)/share/locale\""
BFDLIB = ../bfd/libbfd.la
LIBIBERTY = ../libiberty/libiberty.a
@ -216,6 +221,11 @@ OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
STAGESTUFF = *.o ldscripts/* e*.c
POTFILES = $(CFILES) $(HFILES)
po/POTFILES.in: @MAINT@ Makefile
for file in $(POTFILES); do echo $$file; done | sort > tmp \
&& mv tmp $(srcdir)/po/POTFILES.in
ldmain.o: ldmain.c config.status
$(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' -DTARGET='"@target@"' $(srcdir)/ldmain.c
@ -567,8 +577,8 @@ ez8002.c: $(srcdir)/emulparams/z8002.sh \
ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c
ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY)
ld_new_LDADD = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY)
ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLDEPS)
ld_new_LDADD = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
# The generated emulation files mostly have the same dependencies.
$(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
@ -576,7 +586,7 @@ $(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
ldctor.h ldexp.h ldlang.h ldgram.h
# This is the real libbfd.a created by libtool.
TESTBFDLIB = ../bfd/.libs/libbfd.a
TESTBFDLIB = @TESTBFDLIB@
check-DEJAGNU: site.exp
srcroot=`cd $(srcdir) && pwd`; export srcroot; \
@ -662,6 +672,9 @@ configdoc.texi: ${DOCVER}-doc.texi
|| ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
|| cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
ld.info: $(srcdir)/ld.texinfo configdoc.texi bfdsumm.texi
ld.dvi: $(srcdir)/ld.texinfo configdoc.texi bfdsumm.texi
ld.info: $(srcdir)/ld.texinfo configdoc.texi
@rm -f $@ $@-[0-9] $@-[0-9][0-9]
$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo

View File

@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.2e from Makefile.am
# Makefile.in generated automatically by automake 1.3 from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@ -32,6 +32,8 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DISTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@ -62,21 +64,20 @@ host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
CC = @CC@
CC_FOR_BUILD = @CC_FOR_BUILD@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
HDEFINES = @HDEFINES@
LD = @LD@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
NATIVE_LIB_DIRS = @NATIVE_LIB_DIRS@
NM = @NM@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
INTLLIBS = @INTLLIBS@
AUTOMAKE_OPTIONS = cygnus dejagnu
SUBDIRS = po
tooldir = $(exec_prefix)/$(target_alias)
YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
@ -159,7 +160,7 @@ info_TEXINFOS = ld.texinfo
noinst_TEXINFOS = ldint.texinfo
man_MANS = ld.1
INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) $(HDEFINES) $(CFLAGS)
INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(prefix)/share/locale\""
BFDLIB = ../bfd/libbfd.la
LIBIBERTY = ../libiberty/libiberty.a
@ -291,6 +292,8 @@ OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
STAGESTUFF = *.o ldscripts/* e*.c
POTFILES = $(CFILES) $(HFILES)
# These all start with e so 'make clean' can find them.
GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ ${EMUL} "@NATIVE_LIB_DIRS@"
@ -298,11 +301,11 @@ GEN_DEPENDS = $(srcdir)/genscripts.sh $(srcdir)/emultempl/stringify.sed
ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c
ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY)
ld_new_LDADD = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY)
ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLDEPS)
ld_new_LDADD = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
# This is the real libbfd.a created by libtool.
TESTBFDLIB = ../bfd/.libs/libbfd.a
TESTBFDLIB = @TESTBFDLIB@
MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
@ -334,12 +337,14 @@ CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
MAKEINFO = `if test -f $(top_builddir)/../texinfo/makeinfo/makeinfo; then echo $(top_builddir)/../texinfo/makeinfo/makeinfo; else echo makeinfo; fi`
TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi`
TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
INFO_DEPS = ld.info
DVIS = ld.dvi
TEXINFOS = ld.texinfo
MANS = ld.1
man1dir = $(mandir)/man1
MANS = $(man_MANS)
NROFF = nroff
DIST_COMMON = README ChangeLog Makefile.am Makefile.in NEWS TODO \
@ -347,6 +352,9 @@ acconfig.h acinclude.m4 aclocal.m4 config.in configure configure.in \
ldgram.c ldlex.c stamp-h.in
PACKAGE = @PACKAGE@
VERSION = @VERSION@
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
@ -354,14 +362,14 @@ GZIP = --best
SOURCES = $(ld_new_SOURCES)
OBJECTS = $(ld_new_OBJECTS)
default: all
all: all-recursive-am all-am
.SUFFIXES:
.SUFFIXES: .S .c .dvi .info .l .lo .o .ps .s .texi .texinfo .y
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
.SUFFIXES: .S .c .dvi .info .l .lo .o .ps .s .texi .texinfo .txi .y
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
@ -483,26 +491,38 @@ DVIPS = dvips
.texinfo.dvi:
TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
.txi.info:
@rm -f $@ $@-[0-9] $@-[0-9][0-9]
$(MAKEINFO) -I $(srcdir) $<
.txi.dvi:
TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
.txi:
@rm -f $@ $@-[0-9] $@-[0-9][0-9]
$(MAKEINFO) -I $(srcdir) $<
.dvi.ps:
$(DVIPS) $< -o $@
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(infodir)
$(mkinstalldirs) $(DESTDIR)$(infodir)
@for file in $(INFO_DEPS); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
if test -f $$d/$$ifile; then \
echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \
$(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \
echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
$(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
else : ; fi; \
done; \
done
@$(POST_INSTALL)
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
for file in $(INFO_DEPS); do \
echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
install-info --info-dir=$(infodir) $(infodir)/$$file || :;\
echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
done; \
else : ; fi
@ -513,11 +533,11 @@ uninstall-info:
else ii=; fi; \
for file in $(INFO_DEPS); do \
test -z "$ii" \
|| install-info --info-dir=$(infodir) --remove $$file; \
|| install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
done
$(NORMAL_UNINSTALL)
@$(NORMAL_UNINSTALL)
for file in $(INFO_DEPS); do \
(cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
(cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
done
dist-info: $(INFO_DEPS)
@ -547,21 +567,82 @@ maintainer-clean-aminfo:
fi; \
done
clean-info: mostlyclean-aminfo
install-man1:
$(mkinstalldirs) $(DESTDIR)$(man1dir)
@list='$(man1_MANS)'; \
l2='$(man_MANS)'; for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
$(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
done
uninstall-man1:
@list='$(man1_MANS)'; \
l2='$(man_MANS)'; for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
rm -f $(DESTDIR)$(man1dir)/$$inst; \
done
install-man: $(MANS)
$(NORMAL_INSTALL)
$(mkinstalldirs) $(mandir)/man1
@sect=1; \
inst=`echo "ld" | sed '$(transform)'`.1; \
if test -f $(srcdir)/ld.1; then file=$(srcdir)/ld.1; \
else file=ld.1; fi; \
echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
$(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
@$(NORMAL_INSTALL)
$(MAKE) install-man1
uninstall-man:
$(NORMAL_UNINSTALL)
-inst=`echo "ld" | sed '$(transform)'`.1; \
rm -f $(mandir)/man1/$$inst
@$(NORMAL_UNINSTALL)
$(MAKE) uninstall-man1
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
@SET_MAKE@
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
list='$(SUBDIRS)'; for subdir in $$list; do \
target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) $$target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
done; \
for subdir in $$rev; do \
target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) $$target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
(cd $$subdir && $(MAKE) tags); \
done
tags: TAGS
@ -569,9 +650,12 @@ ID: $(HEADERS) $(SOURCES) $(LISP)
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
TAGS: $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
done; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
@ -630,6 +714,14 @@ distdir: $(DISTFILES)
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
done
for subdir in $(SUBDIRS); do \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
chmod 777 $(distdir)/$$subdir; \
(cd $$subdir && $(MAKE) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
|| exit 1; \
done
$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
DEJATOOL = $(PACKAGE)
@ -654,29 +746,38 @@ site.exp: Makefile
-@sed '1,/^## All variables above are.*##/ d' site.bak >> $@-t
-@mv site.exp site.bak
@mv $@-t site.exp
info: $(INFO_DEPS)
dvi: $(DVIS)
info: $(INFO_DEPS) info-recursive
dvi: $(DVIS) dvi-recursive
check:
$(MAKE) check-DEJAGNU
installcheck:
install-info: install-info-am
install-exec: install-exec-local
$(MAKE) check-recursive check-DEJAGNU
installcheck: installcheck-recursive
install-info: install-info-am install-info-recursive
all-recursive-am: config.h
$(MAKE) all-recursive
all-am: Makefile $(PROGRAMS) $(MANS) config.h
install-exec-am: install-exec-local
install-data-am: install-man install-data-local
uninstall-am: uninstall-man
install-exec: install-exec-recursive install-exec-am
@$(NORMAL_INSTALL)
install-data: install-man install-data-local
install-data: install-data-recursive install-data-am
@$(NORMAL_INSTALL)
install: install-exec install-data all
install: install-recursive install-exec-am install-data-am
@:
uninstall: uninstall-man
all: Makefile $(PROGRAMS) $(MANS) config.h
uninstall: uninstall-recursive uninstall-am
install-strip:
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs:
$(mkinstalldirs) $(mandir)/man1
installdirs: installdirs-recursive
$(mkinstalldirs) $(DESTDIR)$(mandir)/man1
mostlyclean-generic:
@ -693,42 +794,60 @@ distclean-generic:
maintainer-clean-generic:
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean: mostlyclean-hdr mostlyclean-noinstPROGRAMS \
mostlyclean-am: mostlyclean-hdr mostlyclean-noinstPROGRAMS \
mostlyclean-compile mostlyclean-libtool \
mostlyclean-aminfo mostlyclean-tags mostlyclean-generic \
mostlyclean-local
mostlyclean-aminfo mostlyclean-tags mostlyclean-generic
clean: clean-hdr clean-noinstPROGRAMS clean-compile clean-libtool \
clean-aminfo clean-tags clean-generic mostlyclean
clean-am: clean-hdr clean-noinstPROGRAMS clean-compile clean-libtool \
clean-aminfo clean-tags clean-generic mostlyclean-am
distclean: distclean-hdr distclean-noinstPROGRAMS distclean-compile \
distclean-am: distclean-hdr distclean-noinstPROGRAMS distclean-compile \
distclean-libtool distclean-aminfo distclean-tags \
distclean-generic clean distclean-local
distclean-generic clean-am
maintainer-clean-am: maintainer-clean-hdr \
maintainer-clean-noinstPROGRAMS \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-aminfo maintainer-clean-tags \
maintainer-clean-generic distclean-am
mostlyclean: mostlyclean-recursive mostlyclean-am mostlyclean-local
clean: clean-recursive clean-am
distclean: distclean-recursive distclean-am distclean-local
-rm -f config.status
-rm -f libtool
maintainer-clean: maintainer-clean-hdr maintainer-clean-noinstPROGRAMS \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-aminfo maintainer-clean-tags \
maintainer-clean-generic distclean
maintainer-clean: maintainer-clean-recursive maintainer-clean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
-rm -f config.status
.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \
maintainer-clean-hdr mostlyclean-noinstPROGRAMS \
distclean-noinstPROGRAMS clean-noinstPROGRAMS \
maintainer-clean-noinstPROGRAMS mostlyclean-compile distclean-compile \
clean-compile maintainer-clean-compile mostlyclean-libtool \
distclean-libtool clean-libtool maintainer-clean-libtool \
install-info-am uninstall-info mostlyclean-aminfo distclean-aminfo \
clean-aminfo maintainer-clean-aminfo install-man uninstall-man tags \
mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
distdir check-DEJAGNU info dvi installcheck install-info install-exec \
install-data install uninstall all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile mostlyclean-libtool distclean-libtool \
clean-libtool maintainer-clean-libtool install-info-am uninstall-info \
mostlyclean-aminfo distclean-aminfo clean-aminfo \
maintainer-clean-aminfo install-man1 uninstall-man1 install-man \
uninstall-man install-data-recursive uninstall-data-recursive \
install-exec-recursive uninstall-exec-recursive installdirs-recursive \
uninstalldirs-recursive all-recursive check-recursive \
installcheck-recursive info-recursive dvi-recursive \
mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir check-DEJAGNU \
info dvi installcheck install-info all-recursive-am all-am \
install-exec-am install-data-am uninstall-am install-exec install-data \
install uninstall all installdirs mostlyclean-generic distclean-generic \
clean-generic maintainer-clean-generic clean mostlyclean distclean \
maintainer-clean
po/POTFILES.in: @MAINT@ Makefile
for file in $(POTFILES); do echo $$file; done | sort > tmp \
&& mv tmp $(srcdir)/po/POTFILES.in
ldmain.o: ldmain.c config.status
$(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' -DTARGET='"@target@"' $(srcdir)/ldmain.c
@ -1163,6 +1282,9 @@ configdoc.texi: ${DOCVER}-doc.texi
|| ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
|| cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
ld.info: $(srcdir)/ld.texinfo configdoc.texi bfdsumm.texi
ld.dvi: $(srcdir)/ld.texinfo configdoc.texi bfdsumm.texi
ld.info: $(srcdir)/ld.texinfo configdoc.texi
@rm -f $@ $@-[0-9] $@-[0-9][0-9]
$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo

View File

@ -20,3 +20,18 @@
/* Do we need to use the b modifier when opening binary files? */
#undef USE_BINARY_FOPEN
/* Define to 1 if NLS is requested. */
#undef ENABLE_NLS
/* Define as 1 if you have catgets and don't want to use GNU gettext. */
#undef HAVE_CATGETS
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
#undef HAVE_GETTEXT
/* Define as 1 if you have the stpcpy function. */
#undef HAVE_STPCPY
/* Define if your locale.h file contains LC_MESSAGES. */
#undef HAVE_LC_MESSAGES

2151
ld/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -38,12 +38,15 @@ fi
AC_PROG_CC
AM_PROG_INSTALL
ALL_LINGUAS=
CY_GNU_GETTEXT
AM_CYGWIN32
AM_EXEEXT
AC_PROG_YACC
AC_PROG_LEX
AC_DECL_YYTEXT
AM_PROG_LEX
AM_MAINTAINER_MODE
@ -129,4 +132,12 @@ else
fi
AC_SUBST(EMULATION_OFILES)
AC_OUTPUT(Makefile)
if test x${enable_static} = xno; then
TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so"
else
TESTBFDLIB="../bfd/.libs/libbfd.a"
fi
AC_SUBST(TESTBFDLIB)
AC_OUTPUT(Makefile po/Makefile.in:po/Make-in,
[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])

42
ld/ld.h
View File

@ -1,5 +1,5 @@
/* ld.h -- general linker header file
Copyright (C) 1991, 93, 94, 95, 1996 Free Software Foundation, Inc.
Copyright (C) 1991, 93, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@ -21,6 +21,29 @@
#ifndef LD_H
#define LD_H
#ifdef ENABLE_NLS
#include <libintl.h>
#define _(String) gettext (String)
#ifdef gettext_noop
#define N_(String) gettext_noop (String)
#else
#define N_(String) (String)
#endif
#else
/* Stubs that do something close enough. */
#define textdomain(String) (String)
#define gettext(String) (String)
#define dgettext(Domain,Message) (Message)
#define dcgettext(Domain,Message,Type) (Message)
#define bindtextdomain(Domain,Directory) (Domain)
#define _(String) (String)
#define N_(String) (String)
/* In this case we don't care about the value. */
#ifndef LC_MESSAGES
#define LC_MESSAGES 0
#endif
#endif
/* Look in this environment name for the linker to pretend to be */
#define EMULATION_ENVIRON "LDEMULATION"
/* If in there look for the strings: */
@ -90,6 +113,18 @@ typedef struct
/* If true, generate a cross reference report. */
boolean cref;
/* If true (which is the default), warn about mismatched input
files. */
boolean warn_mismatch;
/* Name of shared object whose symbol table should be filtered with
this shared object. From the --filter option. */
char *filter_shlib;
/* Name of shared object for whose symbol table this shared object
is an auxiliary filter. From the --auxiliary option. */
char **auxiliary_filters;
} args_type;
extern args_type command_line;
@ -121,6 +156,10 @@ typedef struct
only). */
boolean warn_multiple_gp;
/* If true, warn if the starting address of an output section
changes due to the alignment of an input section. */
boolean warn_section_align;
boolean sort_common;
boolean text_read_only;
@ -153,5 +192,6 @@ extern int yyparse PARAMS ((void));
extern void add_cref PARAMS ((const char *, bfd *, asection *, bfd_vma));
extern void output_cref PARAMS ((FILE *));
extern void check_nocrossrefs PARAMS ((void));
#endif

View File

@ -1,5 +1,5 @@
/* Main program of GNU linker.
Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
Copyright (C) 1991, 92, 93, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
This file is part of GLD, the Gnu Linker.
@ -86,6 +86,7 @@ args_type command_line;
ld_config_type config;
static void remove_output PARAMS ((void));
static boolean check_for_scripts_dir PARAMS ((char *dir));
static boolean add_archive_element PARAMS ((struct bfd_link_info *, bfd *,
const char *));
@ -161,6 +162,10 @@ main (argc, argv)
char *emulation;
long start_time = get_run_time ();
setlocale (LC_MESSAGES, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
program_name = argv[0];
xmalloc_set_program_name (program_name);
@ -178,7 +183,7 @@ main (argc, argv)
a different target. The macro TARGET is defined by Makefile. */
if (! bfd_set_default_target (TARGET))
{
einfo ("%X%P: can't set BFD default target to `%s': %E\n", TARGET);
einfo (_("%X%P: can't set BFD default target to `%s': %E\n"), TARGET);
xexit (1);
}
@ -190,6 +195,7 @@ main (argc, argv)
command_line.force_common_definition = false;
command_line.interpreter = NULL;
command_line.rpath = NULL;
command_line.warn_mismatch = true;
link_info.callbacks = &link_callbacks;
link_info.relocateable = false;
@ -229,9 +235,9 @@ main (argc, argv)
if (link_info.relocateable)
{
if (command_line.relax)
einfo ("%P%F: -relax and -r may not be used together\n");
einfo (_("%P%F: -relax and -r may not be used together\n"));
if (link_info.shared)
einfo ("%P%F: -r and -shared may not be used together\n");
einfo (_("%P%F: -r and -shared may not be used together\n"));
}
/* Treat ld -r -s as ld -r -S -x (i.e., strip all local symbols). I
@ -260,7 +266,7 @@ main (argc, argv)
{
if (trace_file_tries)
{
info_msg ("using internal linker script:\n");
info_msg (_("using internal linker script:\n"));
info_msg ("==================================================\n");
info_msg (s);
info_msg ("\n==================================================\n");
@ -279,12 +285,12 @@ main (argc, argv)
{
if (version_printed)
xexit (0);
einfo ("%P%F: no input files\n");
einfo (_("%P%F: no input files\n"));
}
if (trace_files)
{
info_msg ("%P: mode %s\n", emulation);
info_msg (_("%P: mode %s\n"), emulation);
}
ldemul_after_parse ();
@ -302,7 +308,7 @@ main (argc, argv)
if (config.map_file == (FILE *) NULL)
{
bfd_set_error (bfd_error_system_call);
einfo ("%P%F: cannot open map file %s: %E\n",
einfo (_("%P%F: cannot open map file %s: %E\n"),
config.map_filename);
}
}
@ -348,7 +354,7 @@ main (argc, argv)
{
if (trace_files == true)
{
einfo ("%P: link errors found, deleting executable `%s'\n",
einfo (_("%P: link errors found, deleting executable `%s'\n"),
output_filename);
}
@ -359,7 +365,7 @@ main (argc, argv)
else
{
if (! bfd_close (output_bfd))
einfo ("%F%B: final close failed: %E\n", output_bfd);
einfo (_("%F%B: final close failed: %E\n"), output_bfd);
/* If the --force-exe-suffix is enabled, and we're making an
executable file and it doesn't end in .exe, copy it to one which does. */
@ -383,21 +389,21 @@ main (argc, argv)
dst = fopen (dst_name, FOPEN_WB);
if (!src)
einfo ("%X%P: unable to open for source of copy `%s'\n", output_filename);
einfo (_("%X%P: unable to open for source of copy `%s'\n"), output_filename);
if (!dst)
einfo ("%X%P: unable to open for destination of copy `%s'\n", dst_name);
einfo (_("%X%P: unable to open for destination of copy `%s'\n"), dst_name);
while ((l = fread (buf, 1, bsize, src)) > 0)
{
int done = fwrite (buf, 1, l, dst);
if (done != l)
{
einfo ("%P: Error writing file `%s'\n", dst_name);
einfo (_("%P: Error writing file `%s'\n"), dst_name);
}
}
fclose (src);
if (!fclose (dst))
if (fclose (dst) == EOF)
{
einfo ("%P: Error closing file `%s'\n", dst_name);
einfo (_("%P: Error closing file `%s'\n"), dst_name);
}
free (dst_name);
free (buf);
@ -415,10 +421,10 @@ main (argc, argv)
#endif
long run_time = get_run_time () - start_time;
fprintf (stderr, "%s: total time in link: %ld.%06ld\n",
fprintf (stderr, _("%s: total time in link: %ld.%06ld\n"),
program_name, run_time / 1000000, run_time % 1000000);
#ifdef HAVE_SBRK
fprintf (stderr, "%s: data size %ld\n", program_name,
fprintf (stderr, _("%s: data size %ld\n"), program_name,
(long) (lim - (char *) &environ));
#endif
}
@ -459,7 +465,7 @@ get_emulation (argc, argv)
}
else
{
einfo("%P%F: missing argument to -m\n");
einfo(_("%P%F: missing argument to -m\n"));
}
}
else if (strcmp (argv[i], "-mips1") == 0
@ -573,12 +579,12 @@ add_ysym (name)
if (! bfd_hash_table_init_n (link_info.notice_hash,
bfd_hash_newfunc,
61))
einfo ("%P%F: bfd_hash_table_init failed: %E\n");
einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
}
if (bfd_hash_lookup (link_info.notice_hash, name, true, true)
== (struct bfd_hash_entry *) NULL)
einfo ("%P%F: bfd_hash_lookup failed: %E\n");
einfo (_("%P%F: bfd_hash_lookup failed: %E\n"));
}
/* Record a symbol to be wrapped, from the --wrap option. */
@ -594,10 +600,10 @@ add_wrap (name)
if (! bfd_hash_table_init_n (link_info.wrap_hash,
bfd_hash_newfunc,
61))
einfo ("%P%F: bfd_hash_table_init failed: %E\n");
einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
}
if (bfd_hash_lookup (link_info.wrap_hash, name, true, true) == NULL)
einfo ("%P%F: bfd_hash_lookup failed: %E\n");
einfo (_("%P%F: bfd_hash_lookup failed: %E\n"));
}
/* Handle the -retain-symbols-file option. */
@ -612,7 +618,7 @@ add_keepsyms_file (filename)
int c;
if (link_info.strip == strip_some)
einfo ("%X%P: error: duplicate retain-symbols-file\n");
einfo (_("%X%P: error: duplicate retain-symbols-file\n"));
file = fopen (filename, "r");
if (file == (FILE *) NULL)
@ -625,7 +631,7 @@ add_keepsyms_file (filename)
link_info.keep_hash = ((struct bfd_hash_table *)
xmalloc (sizeof (struct bfd_hash_table)));
if (! bfd_hash_table_init (link_info.keep_hash, bfd_hash_newfunc))
einfo ("%P%F: bfd_hash_table_init failed: %E\n");
einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
bufsize = 100;
buf = (char *) xmalloc (bufsize);
@ -656,12 +662,12 @@ add_keepsyms_file (filename)
if (bfd_hash_lookup (link_info.keep_hash, buf, true, true)
== (struct bfd_hash_entry *) NULL)
einfo ("%P%F: bfd_hash_lookup for insertion failed: %E\n");
einfo (_("%P%F: bfd_hash_lookup for insertion failed: %E\n"));
}
}
if (link_info.strip != strip_none)
einfo ("%P: `-retain-symbols-file' overrides `-s' and `-S'\n");
einfo (_("%P: `-retain-symbols-file' overrides `-s' and `-S'\n"));
link_info.strip = strip_some;
}
@ -738,8 +744,8 @@ add_archive_element (info, abfd, name)
{
char buf[100];
sprintf (buf, "%-29s %s\n\n", "Archive member included",
"because of file (symbol)");
sprintf (buf, "%-29s %s\n\n", _("Archive member included"),
_("because of file (symbol)"));
minfo ("%s", buf);
header_printed = true;
}
@ -811,10 +817,10 @@ multiple_definition (info, name, obfd, osec, oval, nbfd, nsec, nval)
&& bfd_is_abs_section (nsec->output_section)))
return true;
einfo ("%X%C: multiple definition of `%T'\n",
einfo (_("%X%C: multiple definition of `%T'\n"),
nbfd, nsec, nval, name);
if (obfd != (bfd *) NULL)
einfo ("%D: first defined here\n", obfd, osec, oval);
einfo (_("%D: first defined here\n"), obfd, osec, oval);
return true;
}
@ -843,43 +849,43 @@ multiple_common (info, name, obfd, otype, osize, nbfd, ntype, nsize)
|| ntype == bfd_link_hash_indirect)
{
ASSERT (otype == bfd_link_hash_common);
einfo ("%B: warning: definition of `%T' overriding common\n",
einfo (_("%B: warning: definition of `%T' overriding common\n"),
nbfd, name);
if (obfd != NULL)
einfo ("%B: warning: common is here\n", obfd);
einfo (_("%B: warning: common is here\n"), obfd);
}
else if (otype == bfd_link_hash_defined
|| otype == bfd_link_hash_defweak
|| otype == bfd_link_hash_indirect)
{
ASSERT (ntype == bfd_link_hash_common);
einfo ("%B: warning: common of `%T' overridden by definition\n",
einfo (_("%B: warning: common of `%T' overridden by definition\n"),
nbfd, name);
if (obfd != NULL)
einfo ("%B: warning: defined here\n", obfd);
einfo (_("%B: warning: defined here\n"), obfd);
}
else
{
ASSERT (otype == bfd_link_hash_common && ntype == bfd_link_hash_common);
if (osize > nsize)
{
einfo ("%B: warning: common of `%T' overridden by larger common\n",
einfo (_("%B: warning: common of `%T' overridden by larger common\n"),
nbfd, name);
if (obfd != NULL)
einfo ("%B: warning: larger common is here\n", obfd);
einfo (_("%B: warning: larger common is here\n"), obfd);
}
else if (nsize > osize)
{
einfo ("%B: warning: common of `%T' overriding smaller common\n",
einfo (_("%B: warning: common of `%T' overriding smaller common\n"),
nbfd, name);
if (obfd != NULL)
einfo ("%B: warning: smaller common is here\n", obfd);
einfo (_("%B: warning: smaller common is here\n"), obfd);
}
else
{
einfo ("%B: warning: multiple common of `%T'\n", nbfd, name);
einfo (_("%B: warning: multiple common of `%T'\n"), nbfd, name);
if (obfd != NULL)
einfo ("%B: warning: previous common is here\n", obfd);
einfo (_("%B: warning: previous common is here\n"), obfd);
}
}
@ -901,7 +907,7 @@ add_to_set (info, h, reloc, abfd, section, value)
bfd_vma value;
{
if (config.warn_constructors)
einfo ("%P: warning: global constructor %s used\n",
einfo (_("%P: warning: global constructor %s used\n"),
h->root.string);
if (! config.build_constructors)
@ -940,7 +946,7 @@ constructor_callback (info, constructor, name, abfd, section, value)
char set_name[1 + sizeof "__CTOR_LIST__"];
if (config.warn_constructors)
einfo ("%P: warning: global constructor %s used\n", name);
einfo (_("%P: warning: global constructor %s used\n"), name);
if (! config.build_constructors)
return true;
@ -950,7 +956,7 @@ constructor_callback (info, constructor, name, abfd, section, value)
if (bfd_reloc_type_lookup (output_bfd, BFD_RELOC_CTOR) == NULL
&& (link_info.relocateable
|| bfd_reloc_type_lookup (abfd, BFD_RELOC_CTOR) == NULL))
einfo ("%P%F: BFD backend error: BFD_RELOC_CTOR unsupported\n");
einfo (_("%P%F: BFD backend error: BFD_RELOC_CTOR unsupported\n"));
s = set_name;
if (bfd_get_symbol_leading_char (abfd) != '\0')
@ -962,7 +968,7 @@ constructor_callback (info, constructor, name, abfd, section, value)
h = bfd_link_hash_lookup (info->hash, set_name, true, true, true);
if (h == (struct bfd_link_hash_entry *) NULL)
einfo ("%P%F: bfd_link_hash_lookup failed: %E\n");
einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n"));
if (h->type == bfd_link_hash_new)
{
h->type = bfd_link_hash_undefined;
@ -1030,11 +1036,11 @@ warning_callback (info, warning, symbol, abfd, section, address)
symsize = bfd_get_symtab_upper_bound (abfd);
if (symsize < 0)
einfo ("%B%F: could not read symbols: %E\n", abfd);
einfo (_("%B%F: could not read symbols: %E\n"), abfd);
asymbols = (asymbol **) xmalloc (symsize);
symbol_count = bfd_canonicalize_symtab (abfd, asymbols);
if (symbol_count < 0)
einfo ("%B%F: could not read symbols: %E\n", abfd);
einfo (_("%B%F: could not read symbols: %E\n"), abfd);
if (entry != NULL)
{
entry->asymbols = asymbols;
@ -1080,14 +1086,14 @@ warning_find_reloc (abfd, sec, iarg)
relsize = bfd_get_reloc_upper_bound (abfd, sec);
if (relsize < 0)
einfo ("%B%F: could not read relocs: %E\n", abfd);
einfo (_("%B%F: could not read relocs: %E\n"), abfd);
if (relsize == 0)
return;
relpp = (arelent **) xmalloc (relsize);
relcount = bfd_canonicalize_reloc (abfd, sec, relpp, info->asymbols);
if (relcount < 0)
einfo ("%B%F: could not read relocs: %E\n", abfd);
einfo (_("%B%F: could not read relocs: %E\n"), abfd);
p = relpp;
pend = p + relcount;
@ -1136,14 +1142,14 @@ undefined_symbol (info, name, abfd, section, address)
hash = ((struct bfd_hash_table *)
xmalloc (sizeof (struct bfd_hash_table)));
if (! bfd_hash_table_init (hash, bfd_hash_newfunc))
einfo ("%F%P: bfd_hash_table_init failed: %E\n");
einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
}
if (bfd_hash_lookup (hash, name, false, false) != NULL)
return true;
if (bfd_hash_lookup (hash, name, true, true) == NULL)
einfo ("%F%P: bfd_hash_lookup failed: %E\n");
einfo (_("%F%P: bfd_hash_lookup failed: %E\n"));
}
/* We never print more than a reasonable number of errors in a row
@ -1162,19 +1168,19 @@ undefined_symbol (info, name, abfd, section, address)
if (section != NULL)
{
if (error_count < MAX_ERRORS_IN_A_ROW)
einfo ("%X%C: undefined reference to `%T'\n",
einfo (_("%X%C: undefined reference to `%T'\n"),
abfd, section, address, name);
else if (error_count == MAX_ERRORS_IN_A_ROW)
einfo ("%D: more undefined references to `%T' follow\n",
einfo (_("%D: more undefined references to `%T' follow\n"),
abfd, section, address, name);
}
else
{
if (error_count < MAX_ERRORS_IN_A_ROW)
einfo ("%X%B: undefined reference to `%T'\n",
einfo (_("%X%B: undefined reference to `%T'\n"),
abfd, name);
else if (error_count == MAX_ERRORS_IN_A_ROW)
einfo ("%B: more undefined references to `%T' follow\n",
einfo (_("%B: more undefined references to `%T' follow\n"),
abfd, name);
}
@ -1195,10 +1201,10 @@ reloc_overflow (info, name, reloc_name, addend, abfd, section, address)
bfd_vma address;
{
if (abfd == (bfd *) NULL)
einfo ("%P%X: generated");
einfo (_("%P%X: generated"));
else
einfo ("%X%C:", abfd, section, address);
einfo (" relocation truncated to fit: %s %T", reloc_name, name);
einfo (_(" relocation truncated to fit: %s %T"), reloc_name, name);
if (addend != 0)
einfo ("+%v", addend);
einfo ("\n");
@ -1217,10 +1223,10 @@ reloc_dangerous (info, message, abfd, section, address)
bfd_vma address;
{
if (abfd == (bfd *) NULL)
einfo ("%P%X: generated");
einfo (_("%P%X: generated"));
else
einfo ("%X%C:", abfd, section, address);
einfo ("dangerous relocation: %s\n", message);
einfo (_("dangerous relocation: %s\n"), message);
return true;
}
@ -1237,10 +1243,10 @@ unattached_reloc (info, name, abfd, section, address)
bfd_vma address;
{
if (abfd == (bfd *) NULL)
einfo ("%P%X: generated");
einfo (_("%P%X: generated"));
else
einfo ("%X%C:", abfd, section, address);
einfo (" reloc refers to symbol `%T' which is not being output\n", name);
einfo (_(" reloc refers to symbol `%T' which is not being output\n"), name);
return true;
}
@ -1259,9 +1265,12 @@ notice (info, name, abfd, section, value)
if (! info->notice_all
|| (info->notice_hash != NULL
&& bfd_hash_lookup (info->notice_hash, name, false, false) != NULL))
einfo ("%B: %s %s\n", abfd,
bfd_is_und_section (section) ? "reference to" : "definition of",
name);
{
if (bfd_is_und_section (section))
einfo ("%B: reference to %s\n", abfd, name);
else
einfo ("%B: definition of %s\n", abfd, name);
}
if (command_line.cref || nocrossref_list != NULL)
add_cref (name, abfd, section, value);

View File

@ -1,5 +1,6 @@
/* Parse options for the GNU linker.
Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@ -14,8 +15,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
along with GLD; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
@ -36,6 +38,14 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307
#include "ldver.h"
#include "ldemul.h"
#ifndef PATH_SEPARATOR
#if defined (__MSDOS__) || (defined (_WIN32) && ! defined (__CYGWIN32__))
#define PATH_SEPARATOR ';'
#else
#define PATH_SEPARATOR ':'
#endif
#endif
/* Somewhere above, sys/stat.h got included . . . . */
#if !defined(S_ISDIR) && defined(S_IFDIR)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
@ -68,7 +78,8 @@ int parsing_defsym = 0;
#define OPTION_IGNORE (OPTION_HELP + 1)
#define OPTION_MAP (OPTION_IGNORE + 1)
#define OPTION_NO_KEEP_MEMORY (OPTION_MAP + 1)
#define OPTION_NOINHIBIT_EXEC (OPTION_NO_KEEP_MEMORY + 1)
#define OPTION_NO_WARN_MISMATCH (OPTION_NO_KEEP_MEMORY + 1)
#define OPTION_NOINHIBIT_EXEC (OPTION_NO_WARN_MISMATCH + 1)
#define OPTION_NON_SHARED (OPTION_NOINHIBIT_EXEC + 1)
#define OPTION_NO_WHOLE_ARCHIVE (OPTION_NON_SHARED + 1)
#define OPTION_OFORMAT (OPTION_NO_WHOLE_ARCHIVE + 1)
@ -81,18 +92,21 @@ int parsing_defsym = 0;
#define OPTION_SORT_COMMON (OPTION_SONAME + 1)
#define OPTION_STATS (OPTION_SORT_COMMON + 1)
#define OPTION_SYMBOLIC (OPTION_STATS + 1)
#define OPTION_TBSS (OPTION_SYMBOLIC + 1)
#define OPTION_TASK_LINK (OPTION_SYMBOLIC + 1)
#define OPTION_TBSS (OPTION_TASK_LINK + 1)
#define OPTION_TDATA (OPTION_TBSS + 1)
#define OPTION_TTEXT (OPTION_TDATA + 1)
#define OPTION_TRADITIONAL_FORMAT (OPTION_TTEXT + 1)
#define OPTION_UR (OPTION_TRADITIONAL_FORMAT + 1)
#define OPTION_VERBOSE (OPTION_UR + 1)
#define OPTION_VERSION (OPTION_VERBOSE + 1)
#define OPTION_WARN_COMMON (OPTION_VERSION + 1)
#define OPTION_VERSION_SCRIPT (OPTION_VERSION + 1)
#define OPTION_WARN_COMMON (OPTION_VERSION_SCRIPT + 1)
#define OPTION_WARN_CONSTRUCTORS (OPTION_WARN_COMMON + 1)
#define OPTION_WARN_MULTIPLE_GP (OPTION_WARN_CONSTRUCTORS + 1)
#define OPTION_WARN_ONCE (OPTION_WARN_MULTIPLE_GP + 1)
#define OPTION_SPLIT_BY_RELOC (OPTION_WARN_ONCE + 1)
#define OPTION_WARN_SECTION_ALIGN (OPTION_WARN_ONCE + 1)
#define OPTION_SPLIT_BY_RELOC (OPTION_WARN_SECTION_ALIGN + 1)
#define OPTION_SPLIT_BY_FILE (OPTION_SPLIT_BY_RELOC + 1)
#define OPTION_WHOLE_ARCHIVE (OPTION_SPLIT_BY_FILE + 1)
#define OPTION_WRAP (OPTION_WHOLE_ARCHIVE + 1)
@ -126,93 +140,96 @@ struct ld_option
static const struct ld_option ld_options[] =
{
{ {NULL, required_argument, NULL, '\0'},
'a', "KEYWORD", "Shared library control for HP/UX compatibility",
'a', N_("KEYWORD"), N_("Shared library control for HP/UX compatibility"),
ONE_DASH },
{ {"architecture", required_argument, NULL, 'A'},
'A', "ARCH", "Set architecture" , TWO_DASHES },
'A', N_("ARCH"), N_("Set architecture") , TWO_DASHES },
{ {"format", required_argument, NULL, 'b'},
'b', "TARGET", "Specify target for following input files", TWO_DASHES },
'b', N_("TARGET"), N_("Specify target for following input files"), TWO_DASHES },
{ {"mri-script", required_argument, NULL, 'c'},
'c', "FILE", "Read MRI format linker script", TWO_DASHES },
'c', N_("FILE"), N_("Read MRI format linker script"), TWO_DASHES },
{ {"dc", no_argument, NULL, 'd'},
'd', NULL, "Force common symbols to be defined", ONE_DASH },
'd', NULL, N_("Force common symbols to be defined"), ONE_DASH },
{ {"dp", no_argument, NULL, 'd'},
'\0', NULL, NULL, ONE_DASH },
{ {"entry", required_argument, NULL, 'e'},
'e', "ADDRESS", "Set start address", TWO_DASHES },
'e', N_("ADDRESS"), N_("Set start address"), TWO_DASHES },
{ {"export-dynamic", no_argument, NULL, OPTION_EXPORT_DYNAMIC},
'E', NULL, "Export all dynamic symbols", TWO_DASHES },
{ {NULL, optional_argument, NULL, '\0'},
'F', "[FORMAT]", "Ignored", ONE_DASH },
'E', NULL, N_("Export all dynamic symbols"), TWO_DASHES },
{ {"auxiliary", required_argument, NULL, 'f'},
'f', N_("SHLIB"), N_("Auxiliary filter for shared object symbol table"),
TWO_DASHES },
{ {"filter", required_argument, NULL, 'F'},
'F', N_("SHLIB"), N_("Filter for shared object symbol table"), TWO_DASHES },
{ {NULL, no_argument, NULL, '\0'},
'g', NULL, "Ignored", ONE_DASH },
'g', NULL, N_("Ignored"), ONE_DASH },
{ {"gpsize", required_argument, NULL, 'G'},
'G', "SIZE", "Small data size (if no size, same as --shared)",
'G', N_("SIZE"), N_("Small data size (if no size, same as --shared)"),
TWO_DASHES },
{ {"soname", required_argument, NULL, OPTION_SONAME},
'h', "FILENAME", "Set internal name of shared library", ONE_DASH },
'h', N_("FILENAME"), N_("Set internal name of shared library"), ONE_DASH },
{ {"library", required_argument, NULL, 'l'},
'l', "LIBNAME", "Search for library LIBNAME", TWO_DASHES },
'l', N_("LIBNAME"), N_("Search for library LIBNAME"), TWO_DASHES },
{ {"library-path", required_argument, NULL, 'L'},
'L', "DIRECTORY", "Add DIRECTORY to library search path", TWO_DASHES },
'L', N_("DIRECTORY"), N_("Add DIRECTORY to library search path"), TWO_DASHES },
{ {NULL, required_argument, NULL, '\0'},
'm', "EMULATION", "Set emulation", ONE_DASH },
'm', N_("EMULATION"), N_("Set emulation"), ONE_DASH },
{ {"print-map", no_argument, NULL, 'M'},
'M', NULL, "Print map file on standard output", TWO_DASHES },
'M', NULL, N_("Print map file on standard output"), TWO_DASHES },
{ {"nmagic", no_argument, NULL, 'n'},
'n', NULL, "Do not page align data", TWO_DASHES },
'n', NULL, N_("Do not page align data"), TWO_DASHES },
{ {"omagic", no_argument, NULL, 'N'},
'N', NULL, "Do not page align data, do not make text readonly",
'N', NULL, N_("Do not page align data, do not make text readonly"),
TWO_DASHES },
{ {"output", required_argument, NULL, 'o'},
'o', "FILE", "Set output file name", TWO_DASHES },
'o', N_("FILE"), N_("Set output file name"), TWO_DASHES },
{ {NULL, required_argument, NULL, '\0'},
'O', NULL, "Ignored", ONE_DASH },
'O', NULL, N_("Ignored"), ONE_DASH },
{ {"relocateable", no_argument, NULL, 'r'},
'r', NULL, "Generate relocateable output", TWO_DASHES },
'r', NULL, N_("Generate relocateable output"), TWO_DASHES },
{ {NULL, no_argument, NULL, '\0'},
'i', NULL, NULL, ONE_DASH },
{ {"just-symbols", required_argument, NULL, 'R'},
'R', "FILE", "Just link symbols (if directory, same as --rpath)",
'R', N_("FILE"), N_("Just link symbols (if directory, same as --rpath)"),
TWO_DASHES },
{ {"strip-all", no_argument, NULL, 's'},
's', NULL, "Strip all symbols", TWO_DASHES },
's', NULL, N_("Strip all symbols"), TWO_DASHES },
{ {"strip-debug", no_argument, NULL, 'S'},
'S', NULL, "Strip debugging symbols", TWO_DASHES },
'S', NULL, N_("Strip debugging symbols"), TWO_DASHES },
{ {"trace", no_argument, NULL, 't'},
't', NULL, "Trace file opens", TWO_DASHES },
't', NULL, N_("Trace file opens"), TWO_DASHES },
{ {"script", required_argument, NULL, 'T'},
'T', "FILE", "Read linker script", TWO_DASHES },
'T', N_("FILE"), N_("Read linker script"), TWO_DASHES },
{ {"undefined", required_argument, NULL, 'u'},
'u', "SYMBOL", "Start with undefined reference to SYMBOL", TWO_DASHES },
'u', N_("SYMBOL"), N_("Start with undefined reference to SYMBOL"), TWO_DASHES },
{ {"version", no_argument, NULL, OPTION_VERSION},
'v', NULL, "Print version information", TWO_DASHES },
'v', NULL, N_("Print version information"), TWO_DASHES },
{ {NULL, no_argument, NULL, '\0'},
'V', NULL, "Print version and emulation information", ONE_DASH },
'V', NULL, N_("Print version and emulation information"), ONE_DASH },
{ {"discard-all", no_argument, NULL, 'x'},
'x', NULL, "Discard all local symbols", TWO_DASHES },
'x', NULL, N_("Discard all local symbols"), TWO_DASHES },
{ {"discard-locals", no_argument, NULL, 'X'},
'X', NULL, "Discard temporary local symbols", TWO_DASHES },
'X', NULL, N_("Discard temporary local symbols"), TWO_DASHES },
{ {"trace-symbol", required_argument, NULL, 'y'},
'y', "SYMBOL", "Trace mentions of SYMBOL", TWO_DASHES },
'y', N_("SYMBOL"), N_("Trace mentions of SYMBOL"), TWO_DASHES },
{ {NULL, required_argument, NULL, '\0'},
'Y', "PATH", "Default search path for Solaris compatibility", ONE_DASH },
'Y', N_("PATH"), N_("Default search path for Solaris compatibility"), ONE_DASH },
{ {NULL, required_argument, NULL, '\0'},
'z', "KEYWORD", "Ignored for Solaris compatibility", ONE_DASH },
'z', N_("KEYWORD"), N_("Ignored for Solaris compatibility"), ONE_DASH },
{ {"start-group", no_argument, NULL, '('},
'(', NULL, "Start a group", TWO_DASHES },
'(', NULL, N_("Start a group"), TWO_DASHES },
{ {"end-group", no_argument, NULL, ')'},
')', NULL, "End a group", TWO_DASHES },
')', NULL, N_("End a group"), TWO_DASHES },
{ {"assert", required_argument, NULL, OPTION_ASSERT},
'\0', "KEYWORD", "Ignored for SunOS compatibility", ONE_DASH },
'\0', N_("KEYWORD"), N_("Ignored for SunOS compatibility"), ONE_DASH },
{ {"Bdynamic", no_argument, NULL, OPTION_CALL_SHARED},
'\0', NULL, "Link against shared libraries", ONE_DASH },
'\0', NULL, N_("Link against shared libraries"), ONE_DASH },
{ {"dy", no_argument, NULL, OPTION_CALL_SHARED},
'\0', NULL, NULL, ONE_DASH },
{ {"call_shared", no_argument, NULL, OPTION_CALL_SHARED},
'\0', NULL, NULL, ONE_DASH },
{ {"Bstatic", no_argument, NULL, OPTION_NON_SHARED},
'\0', NULL, "Do not link against shared libraries", ONE_DASH },
'\0', NULL, N_("Do not link against shared libraries"), ONE_DASH },
{ {"dn", no_argument, NULL, OPTION_NON_SHARED},
'\0', NULL, NULL, ONE_DASH },
{ {"non_shared", no_argument, NULL, OPTION_NON_SHARED},
@ -220,92 +237,101 @@ static const struct ld_option ld_options[] =
{ {"static", no_argument, NULL, OPTION_NON_SHARED},
'\0', NULL, NULL, ONE_DASH },
{ {"Bsymbolic", no_argument, NULL, OPTION_SYMBOLIC},
'\0', NULL, "Bind global references locally", ONE_DASH },
'\0', NULL, N_("Bind global references locally"), ONE_DASH },
{ {"cref", no_argument, NULL, OPTION_CREF},
'\0', NULL, "Output cross reference table", TWO_DASHES },
'\0', NULL, N_("Output cross reference table"), TWO_DASHES },
{ {"defsym", required_argument, NULL, OPTION_DEFSYM},
'\0', "SYMBOL=EXPRESSION", "Define a symbol", TWO_DASHES },
'\0', N_("SYMBOL=EXPRESSION"), N_("Define a symbol"), TWO_DASHES },
{ {"dynamic-linker", required_argument, NULL, OPTION_DYNAMIC_LINKER},
'\0', "PROGRAM", "Set the dynamic linker to use", TWO_DASHES },
'\0', N_("PROGRAM"), N_("Set the dynamic linker to use"), TWO_DASHES },
{ {"EB", no_argument, NULL, OPTION_EB},
'\0', NULL, "Link big-endian objects", ONE_DASH },
'\0', NULL, N_("Link big-endian objects"), ONE_DASH },
{ {"EL", no_argument, NULL, OPTION_EL},
'\0', NULL, "Link little-endian objects", ONE_DASH },
'\0', NULL, N_("Link little-endian objects"), ONE_DASH },
{ {"embedded-relocs", no_argument, NULL, OPTION_EMBEDDED_RELOCS},
'\0', NULL, "Generate embedded relocs", TWO_DASHES},
'\0', NULL, N_("Generate embedded relocs"), TWO_DASHES},
{ {"force-exe-suffix", no_argument, NULL, OPTION_FORCE_EXE_SUFFIX},
'\0', NULL, "Force generation of file with .exe suffix", TWO_DASHES},
'\0', NULL, N_("Force generation of file with .exe suffix"), TWO_DASHES},
{ {"help", no_argument, NULL, OPTION_HELP},
'\0', NULL, "Print option help", TWO_DASHES },
'\0', NULL, N_("Print option help"), TWO_DASHES },
{ {"Map", required_argument, NULL, OPTION_MAP},
'\0', "FILE", "Write a map file", ONE_DASH },
'\0', N_("FILE"), N_("Write a map file"), ONE_DASH },
{ {"no-keep-memory", no_argument, NULL, OPTION_NO_KEEP_MEMORY},
'\0', NULL, "Use less memory and more disk I/O", TWO_DASHES },
'\0', NULL, N_("Use less memory and more disk I/O"), TWO_DASHES },
{ {"no-warn-mismatch", no_argument, NULL, OPTION_NO_WARN_MISMATCH},
'\0', NULL, N_("Don't warn about mismatched input files"), TWO_DASHES},
{ {"no-whole-archive", no_argument, NULL, OPTION_NO_WHOLE_ARCHIVE},
'\0', NULL, "Turn off --whole-archive", TWO_DASHES },
'\0', NULL, N_("Turn off --whole-archive"), TWO_DASHES },
{ {"noinhibit-exec", no_argument, NULL, OPTION_NOINHIBIT_EXEC},
'\0', NULL, "Create an output file even if errors occur", TWO_DASHES },
'\0', NULL, N_("Create an output file even if errors occur"), TWO_DASHES },
{ {"noinhibit_exec", no_argument, NULL, OPTION_NOINHIBIT_EXEC},
'\0', NULL, NULL, NO_HELP },
{ {"oformat", required_argument, NULL, OPTION_OFORMAT},
'\0', "TARGET", "Specify target of output file", TWO_DASHES },
'\0', N_("TARGET"), N_("Specify target of output file"), TWO_DASHES },
{ {"qmagic", no_argument, NULL, OPTION_IGNORE},
'\0', NULL, "Ignored for Linux compatibility", ONE_DASH },
'\0', NULL, N_("Ignored for Linux compatibility"), ONE_DASH },
{ {"Qy", no_argument, NULL, OPTION_IGNORE},
'\0', NULL, "Ignored for SVR4 compatibility", ONE_DASH },
'\0', NULL, N_("Ignored for SVR4 compatibility"), ONE_DASH },
{ {"relax", no_argument, NULL, OPTION_RELAX},
'\0', NULL, "Relax branches on certain targets", TWO_DASHES },
'\0', NULL, N_("Relax branches on certain targets"), TWO_DASHES },
{ {"retain-symbols-file", required_argument, NULL,
OPTION_RETAIN_SYMBOLS_FILE},
'\0', "FILE", "Keep only symbols listed in FILE", TWO_DASHES },
'\0', N_("FILE"), N_("Keep only symbols listed in FILE"), TWO_DASHES },
{ {"rpath", required_argument, NULL, OPTION_RPATH},
'\0', "PATH", "Set runtime shared library search path", ONE_DASH },
'\0', N_("PATH"), N_("Set runtime shared library search path"), ONE_DASH },
{ {"rpath-link", required_argument, NULL, OPTION_RPATH_LINK},
'\0', "PATH", "Set link time shared library search path", ONE_DASH },
'\0', N_("PATH"), N_("Set link time shared library search path"), ONE_DASH },
{ {"shared", no_argument, NULL, OPTION_SHARED},
'\0', NULL, "Create a shared library", ONE_DASH },
'\0', NULL, N_("Create a shared library"), ONE_DASH },
{ {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD. */
'\0', NULL, NULL, ONE_DASH },
{ {"sort-common", no_argument, NULL, OPTION_SORT_COMMON},
'\0', NULL, "Sort common symbols by size", TWO_DASHES },
'\0', NULL, N_("Sort common symbols by size"), TWO_DASHES },
{ {"sort_common", no_argument, NULL, OPTION_SORT_COMMON},
'\0', NULL, NULL, NO_HELP },
{ {"split-by-file", no_argument, NULL, OPTION_SPLIT_BY_FILE},
'\0', NULL, "Split output sections for each file", TWO_DASHES },
'\0', NULL, N_("Split output sections for each file"), TWO_DASHES },
{ {"split-by-reloc", required_argument, NULL, OPTION_SPLIT_BY_RELOC},
'\0', "COUNT", "Split output sections every COUNT relocs", TWO_DASHES },
'\0', N_("COUNT"), N_("Split output sections every COUNT relocs"), TWO_DASHES },
{ {"stats", no_argument, NULL, OPTION_STATS},
'\0', NULL, "Print memory usage statistics", TWO_DASHES },
'\0', NULL, N_("Print memory usage statistics"), TWO_DASHES },
{ {"task-link", required_argument, NULL, OPTION_TASK_LINK},
'\0', N_("SYMBOL"), N_("Do task level linking"), TWO_DASHES },
{ {"traditional-format", no_argument, NULL, OPTION_TRADITIONAL_FORMAT},
'\0', NULL, "Use same format as native linker", TWO_DASHES },
'\0', NULL, N_("Use same format as native linker"), TWO_DASHES },
{ {"Tbss", required_argument, NULL, OPTION_TBSS},
'\0', "ADDRESS", "Set address of .bss section", ONE_DASH },
'\0', N_("ADDRESS"), N_("Set address of .bss section"), ONE_DASH },
{ {"Tdata", required_argument, NULL, OPTION_TDATA},
'\0', "ADDRESS", "Set address of .data section", ONE_DASH },
'\0', N_("ADDRESS"), N_("Set address of .data section"), ONE_DASH },
{ {"Ttext", required_argument, NULL, OPTION_TTEXT},
'\0', "ADDRESS", "Set address of .text section", ONE_DASH },
'\0', N_("ADDRESS"), N_("Set address of .text section"), ONE_DASH },
{ {"Ur", no_argument, NULL, OPTION_UR},
'\0', NULL, "Build global constructor/destructor tables", ONE_DASH },
'\0', NULL, N_("Build global constructor/destructor tables"), ONE_DASH },
{ {"verbose", no_argument, NULL, OPTION_VERBOSE},
'\0', NULL, "Output lots of information during link", TWO_DASHES },
'\0', NULL, N_("Output lots of information during link"), TWO_DASHES },
{ {"dll-verbose", no_argument, NULL, OPTION_VERBOSE}, /* Linux. */
'\0', NULL, NULL, NO_HELP },
{ {"version-script", required_argument, NULL, OPTION_VERSION_SCRIPT },
'\0', N_("FILE"), N_("Read version information script"), TWO_DASHES },
{ {"warn-common", no_argument, NULL, OPTION_WARN_COMMON},
'\0', NULL, "Warn about duplicate common symbols", TWO_DASHES },
'\0', NULL, N_("Warn about duplicate common symbols"), TWO_DASHES },
{ {"warn-constructors", no_argument, NULL, OPTION_WARN_CONSTRUCTORS},
'\0', NULL, "Warn if global constructors/destructors are seen",
'\0', NULL, N_("Warn if global constructors/destructors are seen"),
TWO_DASHES },
{ {"warn-multiple-gp", no_argument, NULL, OPTION_WARN_MULTIPLE_GP},
'\0', NULL, "Warn if the multiple GP values are used", TWO_DASHES },
'\0', NULL, N_("Warn if the multiple GP values are used"), TWO_DASHES },
{ {"warn-once", no_argument, NULL, OPTION_WARN_ONCE},
'\0', NULL, "Warn only once per undefined symbol", TWO_DASHES },
'\0', NULL, N_("Warn only once per undefined symbol"), TWO_DASHES },
{ {"warn-section-align", no_argument, NULL, OPTION_WARN_SECTION_ALIGN},
'\0', NULL, N_("Warn if start of section changes due to alignment"),
TWO_DASHES },
{ {"whole-archive", no_argument, NULL, OPTION_WHOLE_ARCHIVE},
'\0', NULL, "Include all objects from following archives", TWO_DASHES },
'\0', NULL, N_("Include all objects from following archives"), TWO_DASHES },
{ {"wrap", required_argument, NULL, OPTION_WRAP},
'\0', "SYMBOL", "Use wrapper functions for SYMBOL", TWO_DASHES }
'\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES }
};
#define OPTION_COUNT (sizeof ld_options / sizeof ld_options[0])
#define OPTION_COUNT ((int) (sizeof ld_options / sizeof ld_options[0]))
void
parse_args (argc, argv)
@ -317,6 +343,7 @@ parse_args (argc, argv)
char *default_dirlist = NULL;
char shortopts[OPTION_COUNT * 3 + 2];
struct option longopts[OPTION_COUNT + 1];
int last_optind;
/* Starting the short option string with '-' is for programs that
expect options and other ARGV-elements in any order and that care about
@ -366,9 +393,10 @@ parse_args (argc, argv)
for (i = 1; i < argc; i++)
if (strcmp (argv[i], "-G") == 0
&& (i + 1 >= argc
|| ! isdigit (argv[i + 1][0])))
|| ! isdigit ((unsigned char) argv[i + 1][0])))
argv[i] = (char *) "--shared";
last_optind = -1;
while (1)
{
/* getopt_long_only is like getopt_long, but '-' as well as '--' can
@ -376,8 +404,18 @@ parse_args (argc, argv)
int longind;
int optc;
if (ldemul_parse_args (argc, argv))
continue;
/* Using last_optind lets us avoid calling ldemul_parse_args
multiple times on a single option, which would lead to
confusion in the internal static variables maintained by
getopt. This could otherwise happen for an argument like
-nx, in which the -n is parsed as a single option, and we
loop around to pick up the -x. */
if (optind != last_optind)
{
if (ldemul_parse_args (argc, argv))
continue;
last_optind = optind;
}
optc = getopt_long_only (argc, argv, shortopts, longopts, &longind);
@ -404,7 +442,7 @@ parse_args (argc, argv)
|| strcmp (optarg, "default") == 0)
config.dynamic_link = true;
else
einfo ("%P%F: unrecognized -a option `%s'\n", optarg);
einfo (_("%P%F: unrecognized -a option `%s'\n"), optarg);
break;
case OPTION_ASSERT:
/* FIXME: We just ignore these, but we should handle them. */
@ -417,7 +455,7 @@ parse_args (argc, argv)
else if (strcmp (optarg, "pure-text") == 0)
;
else
einfo ("%P%F: unrecognized -assert option `%s'\n", optarg);
einfo (_("%P%F: unrecognized -assert option `%s'\n"), optarg);
break;
case 'A':
ldfile_add_arch (optarg);
@ -471,8 +509,31 @@ parse_args (argc, argv)
case 'e':
lang_add_entry (optarg, true);
break;
case 'f':
if (command_line.auxiliary_filters == NULL)
{
command_line.auxiliary_filters =
(char **) xmalloc (2 * sizeof (char *));
command_line.auxiliary_filters[0] = optarg;
command_line.auxiliary_filters[1] = NULL;
}
else
{
int c;
char **p;
c = 0;
for (p = command_line.auxiliary_filters; *p != NULL; p++)
++c;
command_line.auxiliary_filters =
(char **) xrealloc (command_line.auxiliary_filters,
(c + 2) * sizeof (char *));
command_line.auxiliary_filters[c] = optarg;
command_line.auxiliary_filters[c + 1] = NULL;
}
break;
case 'F':
/* Ignore. */
command_line.filter_shlib = optarg;
break;
case OPTION_FORCE_EXE_SUFFIX:
command_line.force_exe_suffix = true;
@ -482,7 +543,7 @@ parse_args (argc, argv)
char *end;
g_switch_value = strtoul (optarg, &end, 0);
if (*end)
einfo ("%P%F: invalid number `%s'\n", optarg);
einfo (_("%P%F: invalid number `%s'\n"), optarg);
}
break;
case 'g':
@ -520,6 +581,9 @@ parse_args (argc, argv)
case OPTION_NO_KEEP_MEMORY:
link_info.keep_memory = false;
break;
case OPTION_NO_WARN_MISMATCH:
command_line.warn_mismatch = false;
break;
case OPTION_NOINHIBIT_EXEC:
force_make_executable = true;
break;
@ -646,6 +710,9 @@ parse_args (argc, argv)
case OPTION_TRADITIONAL_FORMAT:
link_info.traditional_format = true;
break;
case OPTION_TASK_LINK:
link_info.task_link = true;
/* Fall through - do an implied -r option. */
case OPTION_UR:
link_info.relocateable = true;
config.build_constructors = true;
@ -672,14 +739,14 @@ parse_args (argc, argv)
case OPTION_VERSION:
/* This output is intended to follow the GNU standards document. */
printf ("GNU ld %s\n", ld_program_version);
printf ("Copyright 1996 Free Software Foundation, Inc.\n");
printf ("\
printf (_("Copyright 1997 Free Software Foundation, Inc.\n"));
printf (_("\
This program is free software; you may redistribute it under the terms of\n\
the GNU General Public License. This program has absolutely no warranty.\n");
the GNU General Public License. This program has absolutely no warranty.\n"));
{
ld_emulation_xfer_type **ptr = ld_emulations;
printf (" Supported emulations:\n");
printf (_(" Supported emulations:\n"));
while (*ptr)
{
printf (" %s\n", (*ptr)->emulation_name);
@ -688,6 +755,20 @@ the GNU General Public License. This program has absolutely no warranty.\n");
}
xexit (0);
break;
case OPTION_VERSION_SCRIPT:
/* This option indicates a small script that only specifies
version information. Read it, but don't assume that
we've seen a linker script. */
{
boolean hold_had_script;
hold_had_script = had_script;
ldfile_open_command_file (optarg);
had_script = hold_had_script;
parser_input = input_version_script;
yyparse ();
}
break;
case OPTION_WARN_COMMON:
config.warn_common = true;
break;
@ -700,6 +781,9 @@ the GNU General Public License. This program has absolutely no warranty.\n");
case OPTION_WARN_ONCE:
config.warn_once = true;
break;
case OPTION_WARN_SECTION_ALIGN:
config.warn_section_align = true;
break;
case OPTION_WHOLE_ARCHIVE:
whole_archive = true;
break;
@ -735,7 +819,7 @@ the GNU General Public License. This program has absolutely no warranty.\n");
if (ingroup)
{
fprintf (stderr,
"%s: may not nest groups (--help for usage)\n",
_("%s: may not nest groups (--help for usage)\n"),
program_name);
xexit (1);
}
@ -746,7 +830,7 @@ the GNU General Public License. This program has absolutely no warranty.\n");
if (! ingroup)
{
fprintf (stderr,
"%s: group ended before it began (--help for usage)\n",
_("%s: group ended before it began (--help for usage)\n"),
program_name);
xexit (1);
}
@ -776,7 +860,7 @@ set_default_dirlist (dirlist_ptr)
while (1)
{
p = strchr (dirlist_ptr, ':');
p = strchr (dirlist_ptr, PATH_SEPARATOR);
if (p != NULL)
*p = '\0';
if (*dirlist_ptr != '\0')
@ -794,7 +878,7 @@ set_section_start (sect, valstr)
char *end;
unsigned long val = strtoul (valstr, &end, 16);
if (*end)
einfo ("%P%F: invalid hex number `%s'\n", valstr);
einfo (_("%P%F: invalid hex number `%s'\n"), valstr);
lang_section_start (sect, exp_intop (val));
}
@ -806,9 +890,9 @@ help ()
int i;
const char **targets, **pp;
printf ("Usage: %s [options] file...\n", program_name);
printf (_("Usage: %s [options] file...\n"), program_name);
printf ("Options:\n");
printf (_("Options:\n"));
for (i = 0; i < OPTION_COUNT; i++)
{
if (ld_options[i].doc != NULL)
@ -837,8 +921,8 @@ help ()
printf (" ");
++len;
}
printf ("%s", ld_options[j].arg);
len += strlen (ld_options[j].arg);
printf ("%s", _(ld_options[j].arg));
len += strlen (_(ld_options[j].arg));
}
comma = true;
}
@ -862,8 +946,8 @@ help ()
+ strlen (ld_options[j].opt.name));
if (ld_options[j].arg != NULL)
{
printf (" %s", ld_options[j].arg);
len += 1 + strlen (ld_options[j].arg);
printf (" %s", _(ld_options[j].arg));
len += 1 + strlen (_(ld_options[j].arg));
}
comma = true;
}
@ -880,19 +964,19 @@ help ()
for (; len < 30; len++)
putchar (' ');
printf ("%s\n", ld_options[i].doc);
printf ("%s\n", _(ld_options[i].doc));
}
}
printf ("%s: supported targets:", program_name);
printf (_("%s: supported targets:"), program_name);
targets = bfd_target_list ();
for (pp = targets; *pp != NULL; pp++)
printf (" %s", *pp);
free (targets);
printf ("\n");
printf ("%s: supported emulations: ", program_name);
printf (_("%s: supported emulations: "), program_name);
ldemul_list_emulations (stdout);
printf ("\n");
printf ("\nReport bugs to bug-gnu-utils@prep.ai.mit.edu\n");
printf (_("\nReport bugs to bug-gnu-utils@gnu.org\n"));
}

View File

@ -1,7 +1,7 @@
/* This file is is generated by a shell script. DO NOT EDIT! */
/* 32 bit ELF emulation code for elf32ebmip
Copyright (C) 1991, 93, 94, 95, 1996 Free Software Foundation, Inc.
Copyright (C) 1991, 93, 94, 95, 1996, 1998 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
ELF support by Ian Lance Taylor <ian@cygnus.com>
@ -212,7 +212,7 @@ gldelf32ebmip_after_open ()
if (search != NULL)
continue;
einfo ("%P: warning: %s, needed by %B, not found\n",
einfo (_("%P: warning: %s, needed by %B, not found\n"),
l->name, l->by);
}
}
@ -296,7 +296,7 @@ gldelf32ebmip_try_needed (name)
can only check that using stat. */
if (bfd_stat (abfd, &global_stat) != 0)
einfo ("%F%P:%B: bfd_stat failed: %E\n", abfd);
einfo (_("%F%P:%B: bfd_stat failed: %E\n"), abfd);
global_found = false;
lang_for_each_input_file (gldelf32ebmip_stat_needed);
if (global_found)
@ -312,7 +312,7 @@ gldelf32ebmip_try_needed (name)
/* Add this file into the symbol table. */
if (! bfd_link_add_symbols (abfd, &link_info))
einfo ("%F%B: could not read symbols: %E\n", abfd);
einfo (_("%F%B: could not read symbols: %E\n"), abfd);
return true;
}
@ -381,7 +381,7 @@ gldelf32ebmip_stat_needed (s)
if (bfd_stat (s->the_bfd, &st) != 0)
{
einfo ("%P:%B: bfd_stat failed: %E\n", s->the_bfd);
einfo (_("%P:%B: bfd_stat failed: %E\n"), s->the_bfd);
return;
}
@ -419,7 +419,7 @@ gldelf32ebmip_stat_needed (s)
f = soname;
if (strncmp (f, global_needed->name, suffix - global_needed->name) == 0)
einfo ("%P: warning: %s, needed by %B, may conflict with %s\n",
einfo (_("%P: warning: %s, needed by %B, may conflict with %s\n"),
global_needed->name, global_needed->by, f);
}
@ -448,7 +448,7 @@ gldelf32ebmip_before_allocation ()
command_line.export_dynamic,
&link_info,
&sinterp))
einfo ("%P%F: failed to set dynamic section sizes: %E\n");
einfo (_("%P%F: failed to set dynamic section sizes: %E\n"));
/* Let the user override the dynamic linker we are using. */
if (command_line.interpreter != NULL
@ -481,7 +481,7 @@ gldelf32ebmip_before_allocation ()
sz = bfd_section_size (is->the_bfd, s);
msg = xmalloc ((size_t) sz + 1);
if (! bfd_get_section_contents (is->the_bfd, s, msg, (file_ptr) 0, sz))
einfo ("%F%B: Can't read contents of section .gnu.warning: %E\n",
einfo (_("%F%B: Can't read contents of section .gnu.warning: %E\n"),
is->the_bfd);
msg[sz] = '\0';
ret = link_info.callbacks->warning (&link_info, msg,
@ -573,7 +573,7 @@ gldelf32ebmip_find_exp_assignment (exp)
if (! (bfd_elf32_record_link_assignment
(output_bfd, &link_info, exp->assign.dst,
exp->type.node_class == etree_provide ? true : false)))
einfo ("%P%F: failed to record assignment to %s: %E\n",
einfo (_("%P%F: failed to record assignment to %s: %E\n"),
exp->assign.dst);
}
gldelf32ebmip_find_exp_assignment (exp->assign.src);
@ -678,7 +678,7 @@ gldelf32ebmip_place_orphan (file, s)
place. This shuffling is to make the output file look neater. */
snew = bfd_make_section (output_bfd, secname);
if (snew == NULL)
einfo ("%P%F: output format %s cannot represent section called %s\n",
einfo (_("%P%F: output format %s cannot represent section called %s\n"),
output_bfd->xvec->name, secname);
if (place->bfd_section != NULL)
{

View File

@ -1,7 +1,7 @@
/* This file is is generated by a shell script. DO NOT EDIT! */
/* AIX emulation code for ppcmacos
Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
Copyright (C) 1991, 1993, 1995, 1998 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
AIX support by Ian Lance Taylor <ian@cygnus.com>
@ -229,7 +229,7 @@ gldppcmacos_parse_args (argc, argv)
case 'D':
val = strtol (optarg, &end, 0);
if (*end != '\0')
einfo ("%P: warning: ignoring invalid -D number %s\n", optarg);
einfo (_("%P: warning: ignoring invalid -D number %s\n"), optarg);
else if (val != -1)
lang_section_start (".data", exp_intop (val));
break;
@ -238,7 +238,7 @@ gldppcmacos_parse_args (argc, argv)
val = strtoul (optarg, &end, 0);
if (*end != '\0'
|| (val & (val - 1)) != 0)
einfo ("%P: warning: ignoring invalid -H number %s\n", optarg);
einfo (_("%P: warning: ignoring invalid -H number %s\n"), optarg);
else
file_align = val;
break;
@ -304,7 +304,7 @@ gldppcmacos_parse_args (argc, argv)
case OPTION_MAXDATA:
val = strtoul (optarg, &end, 0);
if (*end != '\0')
einfo ("%P: warning: ignoring invalid -bmaxdata number %s\n",
einfo (_("%P: warning: ignoring invalid -bmaxdata number %s\n"),
optarg);
else
maxdata = val;
@ -313,7 +313,7 @@ gldppcmacos_parse_args (argc, argv)
case OPTION_MAXSTACK:
val = strtoul (optarg, &end, 0);
if (*end != '\0')
einfo ("%P: warning: ignoring invalid -bmaxstack number %s\n",
einfo (_("%P: warning: ignoring invalid -bmaxstack number %s\n"),
optarg);
else
maxstack = val;
@ -326,7 +326,7 @@ gldppcmacos_parse_args (argc, argv)
++optarg;
}
if (*optarg == '\0' || optarg[1] == '\0')
einfo ("%P: warning: ignoring invalid module type %s\n", optarg);
einfo (_("%P: warning: ignoring invalid module type %s\n"), optarg);
else
modtype = (*optarg << 8) | optarg[1];
break;
@ -346,7 +346,7 @@ gldppcmacos_parse_args (argc, argv)
expression. */
val = strtoul (optarg, &end, 0);
if (*end != '\0')
einfo ("%P: warning: ignoring invalid -pD number %s\n", optarg);
einfo (_("%P: warning: ignoring invalid -pD number %s\n"), optarg);
else
{
etree_type *t;
@ -369,7 +369,7 @@ gldppcmacos_parse_args (argc, argv)
within the file. */
val = strtoul (optarg, &end, 0);
if (*end != '\0')
einfo ("%P: warning: ignoring invalid -pT number %s\n", optarg);
einfo (_("%P: warning: ignoring invalid -pT number %s\n"), optarg);
else
{
etree_type *t;
@ -475,7 +475,7 @@ gldppcmacos_after_open ()
size = (p->count + 2) * 4;
if (! bfd_xcoff_link_record_set (output_bfd, &link_info, p->h, size))
einfo ("%F%P: bfd_xcoff_link_record_set failed: %E\n");
einfo (_("%F%P: bfd_xcoff_link_record_set failed: %E\n"));
}
}
@ -500,9 +500,9 @@ gldppcmacos_before_allocation ()
h = bfd_link_hash_lookup (link_info.hash, el->name, false, false, false);
if (h == NULL)
einfo ("%P%F: bfd_link_hash_lookup of export symbol failed: %E\n");
einfo (_("%P%F: bfd_link_hash_lookup of export symbol failed: %E\n"));
if (! bfd_xcoff_export_symbol (output_bfd, &link_info, h, el->syscall))
einfo ("%P%F: bfd_xcoff_export_symbol failed: %E\n");
einfo (_("%P%F: bfd_xcoff_export_symbol failed: %E\n"));
}
/* Track down all relocations called for by the linker script (these
@ -547,7 +547,7 @@ gldppcmacos_before_allocation ()
textro ? true : false,
unix_ld,
special_sections))
einfo ("%P%F: failed to set dynamic section sizes: %E\n");
einfo (_("%P%F: failed to set dynamic section sizes: %E\n"));
/* Look through the special sections, and put them in the right
place in the link ordering. This is especially magic. */
@ -569,7 +569,7 @@ gldppcmacos_before_allocation ()
is = NULL;
os = lang_output_section_find (sec->output_section->name);
if (os == NULL)
einfo ("%P%F: can't find output section %s\n",
einfo (_("%P%F: can't find output section %s\n"),
sec->output_section->name);
for (pls = &os->children.head; *pls != NULL; pls = &(*pls)->next)
{
@ -602,7 +602,7 @@ gldppcmacos_before_allocation ()
}
if (is == NULL)
einfo ("%P%F: can't find %s in output section\n",
einfo (_("%P%F: can't find %s in output section\n"),
bfd_get_section_name (sec->owner, sec));
/* Now figure out where the section should go. */
@ -731,7 +731,7 @@ gldppcmacos_read_file (filename, import)
obstack_free (o, obstack_base (o));
}
else if (*s == '(')
einfo ("%F%s%d: #! ([member]) is not supported in import files\n",
einfo (_("%F%s%d: #! ([member]) is not supported in import files\n"),
filename, lineno);
else
{
@ -771,7 +771,7 @@ gldppcmacos_read_file (filename, import)
{
impmember = "";
if (cs != '\0')
einfo ("%s:%d: warning: syntax error in import file\n",
einfo (_("%s:%d: warning: syntax error in import file\n"),
filename, lineno);
}
else
@ -783,7 +783,7 @@ gldppcmacos_read_file (filename, import)
if (*s == ')')
*s = '\0';
else
einfo ("%s:%d: warning: syntax error in import file\n",
einfo (_("%s:%d: warning: syntax error in import file\n"),
filename, lineno);
}
}
@ -816,7 +816,7 @@ gldppcmacos_read_file (filename, import)
while (isspace ((unsigned char) *se))
++se;
if (*se != '\0')
einfo ("%s%d: warning: syntax error in import/export file\n",
einfo (_("%s%d: warning: syntax error in import/export file\n"),
filename, lineno);
}
@ -829,7 +829,7 @@ gldppcmacos_read_file (filename, import)
address = strtoul (s, &end, 0);
if (*end != '\0')
einfo ("%s:%d: warning: syntax error in import/export file\n",
einfo (_("%s:%d: warning: syntax error in import/export file\n"),
filename, lineno);
}
}
@ -860,7 +860,7 @@ gldppcmacos_read_file (filename, import)
if (! bfd_xcoff_import_symbol (output_bfd, &link_info, h,
address, imppath, impfile,
impmember))
einfo ("%X%s:%d: failed to import symbol %s: %E\n",
einfo (_("%X%s:%d: failed to import symbol %s: %E\n"),
filename, lineno, symname);
}
}
@ -870,7 +870,7 @@ gldppcmacos_read_file (filename, import)
if (obstack_object_size (o) > 0)
{
einfo ("%s:%d: warning: ignoring unterminated last line\n",
einfo (_("%s:%d: warning: ignoring unterminated last line\n"),
filename, lineno);
obstack_free (o, obstack_base (o));
}
@ -905,9 +905,9 @@ gldppcmacos_find_relocs (s)
rs = &s->reloc_statement;
if (rs->name == NULL)
einfo ("%F%P: only relocations against symbols are permitted\n");
einfo (_("%F%P: only relocations against symbols are permitted\n"));
if (! bfd_xcoff_link_count_reloc (output_bfd, &link_info, rs->name))
einfo ("%F%P: bfd_xcoff_link_count_reloc failed: %E\n");
einfo (_("%F%P: bfd_xcoff_link_count_reloc failed: %E\n"));
}
if (s->header.type == lang_assignment_statement_enum)
@ -935,7 +935,7 @@ gldppcmacos_find_exp_assignment (exp)
{
if (! bfd_xcoff_record_link_assignment (output_bfd, &link_info,
exp->assign.dst))
einfo ("%P%F: failed to record assignment to %s: %E\n",
einfo (_("%P%F: failed to record assignment to %s: %E\n"),
exp->assign.dst);
}
gldppcmacos_find_exp_assignment (exp->assign.src);

View File

@ -90,7 +90,7 @@ gldmipsidt_after_open ()
|| ! bfd_set_section_alignment (abfd, relsec, 2)
|| ! bfd_set_section_size (abfd, relsec,
datasec->reloc_count * 4))
einfo ("%F%B: can not create .rel.sdata section: %E\n");
einfo (_("%F%B: can not create .rel.sdata section: %E\n"));
}
/* Double check that all other data sections are empty, as is
@ -111,7 +111,7 @@ check_sections (abfd, sec, sdatasec)
if ((bfd_get_section_flags (abfd, sec) & SEC_CODE) == 0
&& sec != (asection *) sdatasec
&& sec->reloc_count != 0)
einfo ("%F%X: section %s has relocs; can not use --embedded-relocs\n",
einfo (_("%F%X: section %s has relocs; can not use --embedded-relocs\n"),
abfd, bfd_get_section_name (abfd, sec));
}
@ -146,10 +146,10 @@ gldmipsidt_after_allocation ()
&errmsg))
{
if (errmsg == NULL)
einfo ("%B%X: can not create runtime reloc information: %E\n",
einfo (_("%B%X: can not create runtime reloc information: %E\n"),
abfd);
else
einfo ("%X%B: can not create runtime reloc information: %s\n",
einfo (_("%X%B: can not create runtime reloc information: %s\n"),
abfd, errmsg);
}
}

250
ld/po/Make-in Normal file
View File

@ -0,0 +1,250 @@
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = $(prefix)/@DATADIRNAME@
localedir = $(datadir)/locale
gnulocaledir = $(prefix)/share/locale
gettextsrcdir = $(prefix)/share/gettext/po
subdir = po
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
CC = @CC@
GENCAT = @GENCAT@
GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
MSGMERGE = PATH=../src:$$PATH msgmerge
DEFS = @DEFS@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
INCLUDES = -I.. -I$(top_srcdir)/intl
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
SOURCES = cat-id-tbl.c
POFILES = @POFILES@
GMOFILES = @GMOFILES@
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
POTFILES = \
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
INSTOBJEXT = @INSTOBJEXT@
.SUFFIXES:
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
.c.o:
$(COMPILE) $<
.po.pox:
$(MAKE) $(PACKAGE).pot
$(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
.po.mo:
$(MSGFMT) -o $@ $<
.po.gmo:
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
.po.cat:
sed -f ../intl/po2msg.sed < $< > $*.msg \
&& rm -f $@ && $(GENCAT) $@ $*.msg
all: all-@USE_NLS@
all-yes: $(CATALOGS)
all-no:
$(srcdir)/$(PACKAGE).pot: @MAINT@ $(POTFILES)
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
--add-comments --keyword=_ --keyword=N_ \
--files-from=$(srcdir)/POTFILES.in
rm -f $(srcdir)/$(PACKAGE).pot
mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
$(srcdir)/stamp-cat-id: $(PACKAGE).pot
rm -f cat-id-tbl.tmp
sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
| sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
rm cat-id-tbl.tmp; \
else \
echo cat-id-tbl.c changed; \
rm -f $(srcdir)/cat-id-tbl.c; \
mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
fi
cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
install: install-exec install-data
install-exec:
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
if test -r $(MKINSTALLDIRS); then \
$(MKINSTALLDIRS) $(datadir); \
else \
$(top_srcdir)/mkinstalldirs $(datadir); \
fi
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
case "$$cat" in \
*.gmo) destdir=$(gnulocaledir);; \
*) destdir=$(localedir);; \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
dir=$$destdir/$$lang/LC_MESSAGES; \
if test -r $(MKINSTALLDIRS); then \
$(MKINSTALLDIRS) $$dir; \
else \
$(top_srcdir)/mkinstalldirs $$dir; \
fi; \
if test -r $$cat; then \
$(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
else \
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
fi; \
if test -r $$cat.m; then \
$(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
else \
if test -r $(srcdir)/$$cat.m ; then \
$(INSTALL_DATA) $(srcdir)/$$cat.m \
$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
else \
true; \
fi; \
fi; \
done
if test "$(PACKAGE)" = "gettext"; then \
if test -r $(MKINSTALLDIRS); then \
$(MKINSTALLDIRS) $(gettextsrcdir); \
else \
$(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
fi; \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
# Define this as empty until I found a useful application.
installcheck:
uninstall:
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
done
rm -f $(gettextsrcdir)/po-Makefile.in.in
check: all
cat-id-tbl.o: ../intl/libgettext.h
dvi info tags TAGS ID:
mostlyclean:
rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
rm -fr *.o
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f $(GMOFILES)
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir: update-po $(DISTFILES)
dists="$(DISTFILES)"; \
for file in $$dists; do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
done
update-po: Makefile
$(MAKE) $(PACKAGE).pot
PATH=`pwd`/../src:$$PATH; \
cd $(srcdir); \
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
mv $$lang.po $$lang.old.po; \
echo "$$lang:"; \
if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
rm -f $$lang.old.po; \
else \
echo "msgmerge for $$cat failed!"; \
rm -f $$lang.po; \
mv $$lang.old.po $$lang.po; \
fi; \
done
POTFILES: POTFILES.in
( if test 'x$(srcdir)' != 'x.'; then \
posrcprefix='$(top_srcdir)/'; \
else \
posrcprefix="../"; \
fi; \
rm -f $@-t $@ \
&& (sed -e '/^#/d' -e '/^[ ]*$$/d' \
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
| sed -e '$$s/\\$$//') > $@-t \
&& chmod a-w $@-t \
&& mv $@-t $@ )
POTFILES.in: @MAINT@ ../Makefile
cd .. && $(MAKE) po/POTFILES.in
Makefile: Make-in ../config.status POTFILES
cd .. \
&& CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \
CONFIG_HEADERS= $(SHELL) ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: