Makefile.am revision 104834
138889Sjdp## Process this file with automake to generate Makefile.in
238889Sjdp
338889SjdpAUTOMAKE_OPTIONS = cygnus
438889Sjdp
538889SjdpDOCFILES = aoutx.texi  archive.texi archures.texi \
638889Sjdp	bfdt.texi  cache.texi coffcode.texi \
738889Sjdp	core.texi elf.texi elfcode.texi  format.texi  libbfd.texi  \
838889Sjdp	opncls.texi  reloc.texi  section.texi  \
989857Sobrien	syms.texi  targets.texi init.texi hash.texi linker.texi \
1089857Sobrien	mmo.texi
1138889Sjdp
1238889SjdpPROTOS = archive.p archures.p bfd.p \
1338889Sjdp	 core.p format.p \
1438889Sjdp	libbfd.p opncls.p reloc.p \
1538889Sjdp	section.p syms.p targets.p  \
1638889Sjdp	format.p  core.p init.p
1738889Sjdp
1838889SjdpIPROTOS = cache.ip libbfd.ip reloc.ip init.ip archures.ip coffcode.ip
1938889Sjdp
2038889Sjdp# SRCDOC, SRCPROT, SRCIPROT only used to sidestep Sun Make bug in interaction 
2138889Sjdp# between VPATH and suffix rules.  If you use GNU Make, perhaps other Makes,
2238889Sjdp# you don't need these three:
2338889SjdpSRCDOC = $(srcdir)/../aoutx.h  $(srcdir)/../archive.c \
2438889Sjdp	$(srcdir)/../archures.c $(srcdir)/../bfd.c \
2538889Sjdp	$(srcdir)/../cache.c $(srcdir)/../coffcode.h \
2638889Sjdp	$(srcdir)/../corefile.c $(srcdir)/../elf.c \
2738889Sjdp	$(srcdir)/../elfcode.h  $(srcdir)/../format.c \
2838889Sjdp	$(srcdir)/../libbfd.c $(srcdir)/../opncls.c \
2938889Sjdp	$(srcdir)/../reloc.c  $(srcdir)/../section.c \
3038889Sjdp	$(srcdir)/../syms.c  $(srcdir)/../targets.c \
3189857Sobrien	$(srcdir)/../hash.c $(srcdir)/../linker.c \
3289857Sobrien	$(srcdir)/../mmo.c
3338889Sjdp
3438889SjdpSRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \
3538889Sjdp	$(srcdir)/../bfd.c $(srcdir)/../coffcode.h $(srcdir)/../corefile.c \
3638889Sjdp	$(srcdir)/../format.c $(srcdir)/../libbfd.c \
3738889Sjdp	$(srcdir)/../opncls.c $(srcdir)/../reloc.c \
3838889Sjdp	$(srcdir)/../section.c $(srcdir)/../syms.c \
3938889Sjdp	$(srcdir)/../targets.c $(srcdir)/../init.c
4038889Sjdp
4138889SjdpSRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.c \
4238889Sjdp	$(srcdir)/../reloc.c $(srcdir)/../cpu-h8300.c \
4338889Sjdp	$(srcdir)/../cpu-i960.c $(srcdir)/../archures.c \
4438889Sjdp	$(srcdir)/../init.c
4538889Sjdp
4638889SjdpTEXIDIR = $(srcdir)/../../texinfo/fsf
4738889Sjdp
4838889Sjdpinfo_TEXINFOS = bfd.texinfo
4938889Sjdp
5038889SjdpMKDOC = chew$(EXEEXT_FOR_BUILD)
5138889Sjdp
5238889Sjdp$(MKDOC): chew.o
5338889Sjdp	$(CC_FOR_BUILD) -o $(MKDOC) chew.o $(LOADLIBES) $(LDFLAGS)
5438889Sjdp
5538889Sjdpchew.o: chew.c
5660484Sobrien	$(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
5738889Sjdp
5838889Sjdpprotos: libbfd.h libcoff.h bfd.h
5938889Sjdp
6038889Sjdpbfd.info bfd.dvi: $(DOCFILES) bfdsumm.texi bfd.texinfo
6138889Sjdp
6238889Sjdp# We can't replace these rules with an implicit rule, because
6338889Sjdp# makes without VPATH support couldn't find the .h files in `..'.
6438889Sjdp
6538889Sjdp# We use s-XXX targets so that we can distribute the info files,
6638889Sjdp# and permit people to rebuild them, without requiring the makeinfo
6738889Sjdp# program.  If somebody tries to rebuild info, but none of the .texi
6838889Sjdp# files have changed, then this Makefile will build chew, and will
6938889Sjdp# build all of the stamp files, but will not actually have to rebuild
7038889Sjdp# bfd.info.
7138889Sjdp
7238889Sjdps-aoutx: $(MKDOC) $(srcdir)/../aoutx.h $(srcdir)/doc.str
7338889Sjdp	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../aoutx.h >aoutx.tmp
7438889Sjdp	$(srcdir)/../../move-if-change aoutx.tmp aoutx.texi
7538889Sjdp	touch s-aoutx
7638889Sjdpaoutx.texi: s-aoutx
7738889Sjdp
7838889Sjdps-archive: $(MKDOC) $(srcdir)/../archive.c $(srcdir)/doc.str
7938889Sjdp	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../archive.c >archive.tmp
8038889Sjdp	$(srcdir)/../../move-if-change archive.tmp archive.texi
8138889Sjdp	touch s-archive
8238889Sjdparchive.texi: s-archive
8338889Sjdp
8438889Sjdps-archures: $(MKDOC) $(srcdir)/../archures.c $(srcdir)/doc.str
8538889Sjdp	./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archures.c >archures.tmp
8638889Sjdp	$(srcdir)/../../move-if-change archures.tmp archures.texi
8738889Sjdp	touch s-archures
8838889Sjdparchures.texi: s-archures
8938889Sjdp
9038889Sjdp# We use bfdt.texi, rather than bfd.texi, to avoid conflicting with
9138889Sjdp# bfd.texinfo on an 8.3 filesystem.
9238889Sjdps-bfd: $(MKDOC) $(srcdir)/../bfd.c $(srcdir)/doc.str
9338889Sjdp	./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfd.c >bfd.tmp
9438889Sjdp	$(srcdir)/../../move-if-change bfd.tmp bfdt.texi
9538889Sjdp	touch s-bfd
9638889Sjdpbfdt.texi: s-bfd
9738889Sjdp
9838889Sjdps-cache: $(MKDOC) $(srcdir)/../cache.c $(srcdir)/doc.str
9938889Sjdp	./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../cache.c >cache.tmp
10038889Sjdp	$(srcdir)/../../move-if-change cache.tmp cache.texi
10138889Sjdp	touch s-cache
10238889Sjdpcache.texi: s-cache
10338889Sjdp
10438889Sjdps-coffcode: $(MKDOC) $(srcdir)/../coffcode.h $(srcdir)/doc.str
10538889Sjdp	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../coffcode.h >coffcode.tmp
10638889Sjdp	$(srcdir)/../../move-if-change coffcode.tmp coffcode.texi
10738889Sjdp	touch s-coffcode
10838889Sjdpcoffcode.texi: s-coffcode
10938889Sjdp
11038889Sjdps-core: $(MKDOC) $(srcdir)/../corefile.c $(srcdir)/doc.str
11138889Sjdp	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../corefile.c >core.tmp
11238889Sjdp	$(srcdir)/../../move-if-change core.tmp core.texi
11338889Sjdp	touch s-core
11438889Sjdpcore.texi: s-core
11538889Sjdp
11638889Sjdps-elf: $(MKDOC) $(srcdir)/../elf.c $(srcdir)/doc.str
11738889Sjdp	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elf.c >elf.tmp
11838889Sjdp	$(srcdir)/../../move-if-change elf.tmp elf.texi
11938889Sjdp	touch s-elf
12038889Sjdpelf.texi: s-elf
12138889Sjdp
12238889Sjdps-elfcode: $(MKDOC) $(srcdir)/../elfcode.h $(srcdir)/doc.str
12338889Sjdp	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elfcode.h >elfcode.tmp
12438889Sjdp	$(srcdir)/../../move-if-change elfcode.tmp elfcode.texi
12538889Sjdp	touch s-elfcode
12638889Sjdpelfcode.texi: s-elfcode
12738889Sjdp
12889857Sobriens-mmo: $(MKDOC) $(srcdir)/../mmo.c $(srcdir)/doc.str
12989857Sobrien	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../mmo.c >mmo.tmp
13089857Sobrien	$(srcdir)/../../move-if-change mmo.tmp mmo.texi
13189857Sobrien	touch s-mmo
13289857Sobrienmmo.texi: s-mmo
13389857Sobrien
13438889Sjdps-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str
13538889Sjdp	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
13638889Sjdp	$(srcdir)/../../move-if-change format.tmp format.texi
13738889Sjdp	touch s-format
13838889Sjdpformat.texi: s-format
13938889Sjdp
14038889Sjdps-libbfd: $(MKDOC) $(srcdir)/../libbfd.c $(srcdir)/doc.str
14138889Sjdp	./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../libbfd.c >libbfd.tmp
14238889Sjdp	$(srcdir)/../../move-if-change libbfd.tmp libbfd.texi
14338889Sjdp	touch s-libbfd
14438889Sjdplibbfd.texi: s-libbfd
14538889Sjdp
14638889Sjdps-opncls: $(MKDOC) $(srcdir)/../opncls.c $(srcdir)/doc.str
14738889Sjdp	./$(MKDOC) -f $(srcdir)/doc.str  <$(srcdir)/../opncls.c >opncls.tmp
14838889Sjdp	$(srcdir)/../../move-if-change opncls.tmp opncls.texi
14938889Sjdp	touch s-opncls
15038889Sjdpopncls.texi: s-opncls
15138889Sjdp
15238889Sjdps-reloc: $(MKDOC) $(srcdir)/../reloc.c $(srcdir)/doc.str
15338889Sjdp	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../reloc.c >reloc.tmp
15438889Sjdp	$(srcdir)/../../move-if-change reloc.tmp reloc.texi
15538889Sjdp	touch s-reloc
15638889Sjdpreloc.texi: s-reloc
15738889Sjdp
15838889Sjdps-section: $(MKDOC) $(srcdir)/../section.c $(srcdir)/doc.str
15938889Sjdp	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../section.c >section.tmp
16038889Sjdp	$(srcdir)/../../move-if-change section.tmp section.texi
16138889Sjdp	touch s-section
16238889Sjdpsection.texi: s-section
16338889Sjdp
16438889Sjdps-syms: $(MKDOC) $(srcdir)/../syms.c $(srcdir)/doc.str
16538889Sjdp	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../syms.c >syms.tmp
16638889Sjdp	$(srcdir)/../../move-if-change syms.tmp syms.texi
16738889Sjdp	touch s-syms
16838889Sjdpsyms.texi: s-syms
16938889Sjdp
17038889Sjdps-targets: $(MKDOC) $(srcdir)/../targets.c $(srcdir)/doc.str
17138889Sjdp	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../targets.c >targets.tmp
17238889Sjdp	$(srcdir)/../../move-if-change targets.tmp targets.texi
17338889Sjdp	touch s-targets
17438889Sjdptargets.texi: s-targets
17538889Sjdp
17638889Sjdps-init: $(MKDOC) $(srcdir)/../init.c $(srcdir)/doc.str
17738889Sjdp	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../init.c >init.tmp
17838889Sjdp	$(srcdir)/../../move-if-change init.tmp init.texi
17938889Sjdp	touch s-init
18038889Sjdpinit.texi: s-init
18138889Sjdp
18238889Sjdps-hash: $(MKDOC) $(srcdir)/../hash.c $(srcdir)/doc.str
18338889Sjdp	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../hash.c >hash.tmp
18438889Sjdp	$(srcdir)/../../move-if-change hash.tmp hash.texi
18538889Sjdp	touch s-hash
18638889Sjdphash.texi: s-hash
18738889Sjdp
18838889Sjdps-linker: $(MKDOC) $(srcdir)/../linker.c $(srcdir)/doc.str
18938889Sjdp	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../linker.c >linker.tmp
19038889Sjdp	$(srcdir)/../../move-if-change linker.tmp linker.texi
19138889Sjdp	touch s-linker
19238889Sjdplinker.texi: s-linker
19338889Sjdp
19489857SobrienLIBBFD_H_DEP = \
19589857Sobrien	$(srcdir)/../libbfd-in.h	\
19638889Sjdp	$(srcdir)/../init.c		\
19738889Sjdp	$(srcdir)/../libbfd.c		\
19838889Sjdp	$(srcdir)/../cache.c		\
19938889Sjdp	$(srcdir)/../reloc.c		\
20038889Sjdp	$(srcdir)/../archures.c		\
20189857Sobrien	$(srcdir)/../elf.c		\
20289857Sobrien	$(srcdir)/header.sed		\
20338889Sjdp	$(srcdir)/proto.str		\
20438889Sjdp	$(MKDOC)
20538889Sjdp
20689857Sobrienlibbfd.h: $(LIBBFD_H_DEP)
20789857Sobrien	echo "$(LIBBFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
20889857Sobrien	for file in $(LIBBFD_H_DEP); do \
20989857Sobrien	  case $$file in \
21089857Sobrien	    *-in.h) cat $$file >> $@ ;; \
21189857Sobrien	    */header.sed) break ;; \
212104834Sobrien	    *)	echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
213104834Sobrien				-e 's,$$,.  */,' >> $@ ; \
214104834Sobrien		./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
21589857Sobrien	  esac; \
21689857Sobrien	done
21789857Sobrien
21889857SobrienLIBCOFF_H_DEP = \
21989857Sobrien	$(srcdir)/../libcoff-in.h	\
22038889Sjdp	$(srcdir)/../coffcode.h		\
22189857Sobrien	$(srcdir)/header.sed		\
22238889Sjdp	$(srcdir)/proto.str		\
22338889Sjdp	$(MKDOC)
22438889Sjdp
22589857Sobrienlibcoff.h: $(LIBCOFF_H_DEP)
22689857Sobrien	echo "$(LIBCOFF_H_DEP)" | sed -f $(srcdir)/header.sed > $@
22789857Sobrien	for file in $(LIBCOFF_H_DEP); do \
22889857Sobrien	  case $$file in \
22989857Sobrien	    *-in.h) cat $$file >> $@ ;; \
23089857Sobrien	    */header.sed) break ;; \
231104834Sobrien	    *)	echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
232104834Sobrien				-e 's,$$,.  */,' >> $@ ; \
233104834Sobrien		./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
23489857Sobrien	  esac; \
23589857Sobrien	done
23689857Sobrien
23789857SobrienBFD_H_DEP = \
23889857Sobrien	$(srcdir)/../bfd-in.h 		\
23938889Sjdp	$(srcdir)/../init.c 		\
24038889Sjdp	$(srcdir)/../opncls.c 		\
24138889Sjdp	$(srcdir)/../libbfd.c 		\
24238889Sjdp	$(srcdir)/../section.c 		\
24338889Sjdp	$(srcdir)/../archures.c		\
24438889Sjdp	$(srcdir)/../reloc.c		\
24538889Sjdp	$(srcdir)/../syms.c		\
24638889Sjdp	$(srcdir)/../bfd.c		\
24738889Sjdp	$(srcdir)/../archive.c		\
24838889Sjdp	$(srcdir)/../corefile.c		\
24938889Sjdp	$(srcdir)/../targets.c		\
25038889Sjdp	$(srcdir)/../format.c		\
25189857Sobrien	$(srcdir)/header.sed		\
25238889Sjdp	$(srcdir)/proto.str		\
25389857Sobrien	$(srcdir)/../version.h		\
25438889Sjdp	$(MKDOC)
25538889Sjdp
25689857Sobrienbfd.h: $(BFD_H_DEP)
25789857Sobrien	echo "$(BFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
25889857Sobrien	for file in $(BFD_H_DEP); do \
25989857Sobrien	  case $$file in \
26089857Sobrien	    *-in.h) cat $$file >> $@ ;; \
26189857Sobrien	    */header.sed) break ;; \
262104834Sobrien	    *)	echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
263104834Sobrien				-e 's,$$,.  */,' >> $@ ; \
264104834Sobrien		./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \
26589857Sobrien	  esac; \
26689857Sobrien	done
26789857Sobrien	echo "#ifdef __cplusplus" >> $@
26889857Sobrien	echo "}" >> $@
26989857Sobrien	echo "#endif" >> $@
27089857Sobrien	echo "#endif" >> $@
27189857Sobrien
27260484Sobriennoinst_TEXINFOS = bfdint.texi
27360484Sobrien
27438889SjdpMOSTLYCLEANFILES = $(MKDOC) *.o
27538889Sjdp
27638889SjdpCLEANFILES = s-* *.p *.ip
27738889Sjdp
27838889SjdpDISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
27938889Sjdp
28038889SjdpMAINTAINERCLEANFILES = $(DOCFILES)
28191041Sobrien
28291041Sobrien# We want install to imply install-info as per GNU standards, despite the
28391041Sobrien# cygnus option.
28491041Sobrieninstall: install-info
285