* Makefile.am (ldver.texi): New target.
[deliverable/binutils-gdb.git] / ld / Makefile.am
index a6c5706b54e0f8a4f05c19d9e7fcfc35199c341b..f6eb8323d512a301a38fb70a6e9ae537275459a2 100644 (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
@@ -203,7 +208,7 @@ CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
        ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
        mri.c ldcref.c
 
-HFILES = config.h ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
+HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
        ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
        ldwrite.h mri.h
 
@@ -216,6 +221,16 @@ OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
 
 STAGESTUFF = *.o ldscripts/* e*.c
 
+# At the moment this is just a list of those emulation template files
+# that contain internationalised strings.
+EMULATION_FILES = emultempl/pe.em emultempl/armcoff.em
+
+POTFILES = $(CFILES) $(HFILES) $(EMULATION_FILES)
+
+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
 
@@ -262,7 +277,7 @@ earmaoutl.c:        $(srcdir)/emulparams/armaoutl.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} armaoutl "$(tdir_armaoutl)"
 earmcoff.c:    $(srcdir)/emulparams/armcoff.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armcoff.sc ${GEN_DEPENDS}
+  $(srcdir)/emultempl/armcoff.em $(srcdir)/scripttempl/armcoff.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} armcoff "$(tdir_armcoff)"
 earmpe.c: $(srcdir)/emulparams/armpe.sh \
   $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
@@ -567,8 +582,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 +591,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; \
@@ -593,7 +608,8 @@ check-DEJAGNU: site.exp
                CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
                CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
                OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
-               LIBIBERTY="$(LIBIBERTY)" HOSTING_EMU="$(HOSTING_EMU)" \
+               LIBIBERTY="$(LIBIBERTY) $(INTLLIBS)" \
+               HOSTING_EMU="$(HOSTING_EMU)" \
                HOSTING_CRT0="$(HOSTING_CRT0)" HOSTING_LIBS="$(HOSTING_LIBS)" \
                $(RUNTESTFLAGS); \
        else echo "WARNING: could not find \`runtest'" 1>&2; :;\
@@ -662,23 +678,27 @@ 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
+ldver.texi: Makefile
+       rm -f $@
+       echo '@set VERSION $(VERSION)' > $@
+
+ld.info: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
+       @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+       $(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
 
-# We want to include a file from the BFD documentation.  automake
-# doesn't give us a way to set the include directories for makeinfo,
-# so we just create a file locally to include it.
-bfdsumm.texi: Makefile
-       echo @include $(BFDDIR)/doc/bfdsumm.texi > bfdsumm.texi
+ld.dvi: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
+       TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+         MAKEINFO='$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc' $(TEXI2DVI) $(srcdir)/ld.texinfo
 
 # We want to reconfigure if configure.host or configure.tgt changes.
-Makefile: configure.host configure.tgt
+config.status: $(srcdir)/configure $(srcdir)/configure.host $(srcdir)/configure.tgt
+       $(SHELL) ./config.status --recheck
 
 MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
        ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
 mostlyclean-local:
        -rm -rf tmpdir
-CLEANFILES = dep.sed .dep .dep1 bfdsumm.texi
+CLEANFILES = dep.sed .dep .dep1
 
 .PHONY: install-exec-local install-data-local
 
@@ -686,8 +706,8 @@ install-exec-local: ld-new$(EXEEXT)
        $(mkinstalldirs) $(bindir) $(tooldir)/bin
        @list='$(noinst_PROGRAMS)'; for p in $$list; do \
          if test -f $$p; then \
-           echo " $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`"; \
-           $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`; \
+           echo " $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+           $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
          else :; fi; \
        done
        rm -f $(tooldir)/bin/ld$(EXEEXT)
@@ -698,7 +718,7 @@ install-exec-local: ld-new$(EXEEXT)
        fi
 
 install-data-local:
-       $(mkinstalldirs) $(scriptdir)
+       $(mkinstalldirs) $(scriptdir)/ldscripts
        for f in ldscripts/*; do \
          $(INSTALL_DATA) $$f $(scriptdir)/$$f ; \
        done
This page took 0.025653 seconds and 4 git commands to generate.