fix xgettext invocation
[deliverable/binutils-gdb.git] / ld / Makefile.am
index aad4d2977baca428436cb78cac7624ab14383441..a2ef39fc80fc6d44babb2223bf1bcf8cc6830244 100644 (file)
@@ -1,6 +1,11 @@
 ## Process this file with automake to generate Makefile.in
 
-AUTOMAKE_OPTIONS = dejagnu
+## FIXME: work around apparent automake bug.
+INTLLIBS = @INTLLIBS@
+
+AUTOMAKE_OPTIONS = cygnus dejagnu
+
+SUBDIRS = po
 
 tooldir = $(exec_prefix)/$(target_alias)
 
@@ -59,7 +64,7 @@ CC_FOR_TARGET = ` \
     if [ "@host@" = "@target@" ] ; then \
       echo $(CC); \
     else \
-      echo gcc | sed '$(program_transform_name)'; \
+      echo gcc | sed '$(transform)'; \
     fi; \
   fi`
 
@@ -75,7 +80,7 @@ CXX_FOR_TARGET = ` \
     if [ "@host@" = "@target@" ] ; then \
       echo $(CXX); \
     else \
-      echo gcc | sed '$(program_transform_name)'; \
+      echo gcc | sed '$(transform)'; \
     fi; \
   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
@@ -94,11 +99,18 @@ ALL_EMULATIONS = \
        eaixppc.o \
        eaixrs6.o \
        ealpha.o \
+       earcelf.o \
        earmaoutb.o \
        earmaoutl.o \
        earmcoff.o \
        earmpe.o \
        ecoff_sparc.o \
+       ed10velf.o \
+       $(start-sanitize-d30v) \
+       ed30velf.o \
+       ed30v_e.o \
+       ed30v_o.o \
+       $(end-sanitize-d30v) \
        edelta68.o \
        eebmon29k.o \
        eelf32_sparc.o \
@@ -107,10 +119,12 @@ ALL_EMULATIONS = \
        eelf32ebmip.o \
        eelf32elmip.o \
        eelf32l4300.o \
+       $(start-sanitize-r5900) \
+       eelf32l5900.o \
+       $(end-sanitize-r5900) \
        eelf32lmip.o \
        eelf32lppc.o \
        eelf32ppc.o \
-       eelf64_sparc.o \
        eelf_i386.o \
        egld960.o \
        egld960coff.o \
@@ -174,6 +188,11 @@ ALL_EMULATIONS = \
        est2000.o \
        esun3.o \
        esun4.o \
+       etic30aout.o \
+       etic30coff.o \
+       $(start-sanitize-tic80) \
+       etic80coff.o \
+       $(end-sanitize-tic80) \
        evanilla.o \
        evax.o \
        evsta.o \
@@ -182,6 +201,7 @@ ALL_EMULATIONS = \
        ez8002.o
 
 ALL_64_EMULATIONS = \
+       eelf64_sparc.o \
        eelf64alpha.o
 
 CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
@@ -201,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
 
@@ -237,11 +262,9 @@ eaixrs6.c: $(srcdir)/emulparams/aixrs6.sh \
 ealpha.c: $(srcdir)/emulparams/alpha.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/alpha.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} alpha "$(tdir_alpha)"
-start-sanitize-arc:
 earcelf.c: $(srcdir)/emulparams/arcelf.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} arcelf "$(tdir_arcelf)"
-end-sanitize-arc:
 earmaoutb.c:   $(srcdir)/emulparams/armaoutb.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
@@ -264,6 +287,12 @@ start-sanitize-d30v:
 ed30velf.c: $(srcdir)/emulparams/d30velf.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} d30velf "$(tdir_d30v)"
+ed30v_o.c: $(srcdir)/emulparams/d30v_o.sh \
+  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} d30v_o "$(tdir_d30v)"
+ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
+  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} d30v_e "$(tdir_d30v)"
 end-sanitize-d30v:
 edelta68.c: $(srcdir)/emulparams/delta68.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
@@ -283,6 +312,9 @@ eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
 eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
+eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
+  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
 eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
@@ -292,12 +324,20 @@ eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
 eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
+start-sanitize-r5900:
+eelf32l5900.c: $(srcdir)/emulparams/elf32l5900.sh \
+  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf32l5900 "$(tdir_elf32l5900)"
+end-sanitize-r5900:
 eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
 eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
+eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
+  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
 eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
@@ -305,7 +345,7 @@ eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
 eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
 eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@@ -502,6 +542,12 @@ esun3.c: $(srcdir)/emulparams/sun3.sh \
 esun4.c: $(srcdir)/emulparams/sun4.sh \
   $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} sun4 "$(tdir_sun4)"
+etic30aout.c: $(srcdir)/emulparams/tic30aout.sh \
+  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30aout.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} tic30aout "$(tdir_tic30aout)"
+etic30coff.c: $(srcdir)/emulparams/tic30coff.sh \
+  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} tic30coff "$(tdir_tic30coff)"
 start-sanitize-tic80:
 etic80coff.c: $(srcdir)/emulparams/tic80coff.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic80coff.sc ${GEN_DEPENDS}
@@ -516,11 +562,9 @@ evax.c: $(srcdir)/emulparams/vax.sh \
 evsta.c: $(srcdir)/emulparams/vsta.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} vsta "$(tdir_vsta)"
-start-sanitize-v850:
 ev850.c: $(srcdir)/emulparams/v850.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/v850.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} v850 "$(tdir_v850)"
-end-sanitize-v850:
 ew65.c: $(srcdir)/emulparams/w65.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/w65.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} w65 "$(tdir_w65)"
@@ -533,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) @LEXLIB@
-ld_new_LDADD = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY) @LEXLIB@
+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 \
@@ -542,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; \
@@ -628,13 +672,22 @@ 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 $(BFDDIR)/doc/bfdsumm.texi
-ld.dvi: $(srcdir)/ld.texinfo configdoc.texi $(BFDDIR)/doc/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
+
+ld.dvi: $(srcdir)/ld.texinfo configdoc.texi
+       TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+         MAKEINFO='$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc' $(TEXI2DVI) $(srcdir)/ld.texinfo
 
-MOSTCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
-       ldemul-list.h tmpdir crtbegin.o crtend.o
+# We want to reconfigure if configure.host or configure.tgt changes.
+Makefile: configure.host configure.tgt
+
+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
-DISTCLEANFILES = ldscripts
 
 .PHONY: install-exec-local install-data-local
 
@@ -648,8 +701,10 @@ install-exec-local: ld-new$(EXEEXT)
        done
        rm -f $(tooldir)/bin/ld$(EXEEXT)
        n=`echo ld | sed '$(transform)'`; \
-       ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
-         || $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT)
+       if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \
+         ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
+         || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT); \
+       fi
 
 install-data-local:
        $(mkinstalldirs) $(scriptdir)
@@ -657,6 +712,15 @@ install-data-local:
          $(INSTALL_DATA) $$f $(scriptdir)/$$f ; \
        done
 
+# Stuff that should be included in a distribution.  The diststuff
+# target is run by the taz target in ../Makefile.in.
+LDDISTSTUFF = ldgram.c ldgram.h ldlex.c
+diststuff: $(LDDISTSTUFF) info
+
+DISTCLEANFILES = tdirs site.exp site.bak
+distclean-local:
+       rm -rf ldscripts
+
 # Targets to rebuild dependencies in this Makefile.
 # Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
 .dep: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
This page took 0.026678 seconds and 4 git commands to generate.