PR preprocessor/25717
[official-gcc.git] / fastjar / Makefile.am
blob099656a34e24ff404e40ced7250a211273e1cac0
1 # Process this with automake to create Makefile.in
3 # Work around what appears to be a GNU make bug handling MAKEFLAGS
4 # values defined in terms of make variables, as is the case for CC and
5 # friends when we are called from the top level Makefile.
6 AM_MAKEFLAGS = \
7         "AR_FLAGS=$(AR_FLAGS)" \
8         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
9         "CFLAGS=$(CFLAGS)" \
10         "CXXFLAGS=$(CXXFLAGS)" \
11         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
12         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
13         "INSTALL=$(INSTALL)" \
14         "INSTALL_DATA=$(INSTALL_DATA)" \
15         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
16         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
17         "JC1FLAGS=$(JC1FLAGS)" \
18         "LDFLAGS=$(LDFLAGS)" \
19         "LIBCFLAGS=$(LIBCFLAGS)" \
20         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
21         "MAKE=$(MAKE)" \
22         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
23         "PICFLAG=$(PICFLAG)" \
24         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
25         "SHELL=$(SHELL)" \
26         "exec_prefix=$(exec_prefix)" \
27         "infodir=$(infodir)" \
28         "libdir=$(libdir)" \
29         "prefix=$(prefix)" \
30         "AR=$(AR)" \
31         "AS=$(AS)" \
32         "CC=$(CC)" \
33         "CXX=$(CXX)" \
34         "LD=$(LD)" \
35         "LIBCFLAGS=$(LIBCFLAGS)" \
36         "NM=$(NM)" \
37         "PICFLAG=$(PICFLAG)" \
38         "RANLIB=$(RANLIB)" \
39         "DESTDIR=$(DESTDIR)"
41 AM_CPPFLAGS = -I. -I$(top_srcdir) $(ZINCS) -I$(top_srcdir)/../include
43 LIBIBERTY = ../libiberty/libiberty.a
45 bin_PROGRAMS = fastjar grepjar
46 fastjar_SOURCES = jartool.c dostime.c compress.c pushback.c shift.c jartool.h \
47 zipfile.h dostime.h compress.h pushback.h shift.h
48 fastjar_LDADD = $(ZLIBS) $(LIBIBERTY)
49 fastjar_DEPENDENCIES = $(ZDEPS) $(LIBIBERTY)
50 fastjar_CPPFLAGS = $(AM_CPPFLAGS) -DWITH_SHIFT_DOWN
52 grepjar_SOURCES = jargrep.c dostime.c compress.c pushback.c jartool.h \
53 zipfile.h dostime.h compress.h pushback.h
54 grepjar_LDADD = $(ZLIBS) $(LIBIBERTY)
55 grepjar_DEPENDENCIES = $(ZDEPS) $(LIBIBERTY)
57 AM_CFLAGS = @fastjar_warn_cflags@
58 AM_MAKEINFOFLAGS = -I $(srcdir)/../gcc/doc/include
60 TEXINFO_TEX = ../gcc/doc/include/texinfo.tex
61 info_TEXINFOS = fastjar.texi
62 fastjar_TEXINFOS = \
63         ../gcc/doc/include/gcc-common.texi \
64         ../gcc/doc/include/gpl.texi \
65         gcc-vers.texi
66 man_MANS = fastjar.1 grepjar.1
67 EXTRA_DIST = $(man_MANS)
69 BASEVER = $(srcdir)/../gcc/BASE-VER
70 DEVPHASE = $(srcdir)/../gcc/DEV-PHASE
72 TEXI2POD = perl $(srcdir)/../contrib/texi2pod.pl
73 POD2MAN = pod2man --center="GNU" --release="gcc-$(shell cat $(BASEVER))"
75 .pod.1:
76         -($(POD2MAN) --section=1 $< > $(@).T$$$$ && \
77                 mv -f $(@).T$$$$ $@) || \
78                 (rm -f $(@).T$$$$ && exit 1)
80 .INTERMEDIATE: fastjar.pod grepjar.pod
82 fastjar.pod: $(srcdir)/fastjar.texi
83         -$(TEXI2POD) -D fastjar $< > $@
85 grepjar.pod: $(srcdir)/fastjar.texi
86         -$(TEXI2POD) -D grepjar $< > $@
88 fastjar.1 grepjar.1: $(BASEVER)
90 # gcc-vers.texi is generated from the version files.
91 gcc-vers.texi: $(BASEVER) $(DEVPHASE)
92         (echo "@set version-GCC $(shell cat $(BASEVER))"; \
93          if [ "$(shell cat $(DEVPHASE))" = "experimental" ]; \
94          then echo "@set DEVELOPMENT"; \
95          else echo "@clear DEVELOPMENT"; \
96          fi) > $@T
97         mv -f $@T $@
99 # GCC LOCAL CHANGE
100 # The following commands allow us to release tarballs with the man pages
101 # and info documentation prebuilt.  This feature is enabled via 
102 # --enable-generated-files-in-srcdir in the configure script.
104 if GENINSRC
105 STAMP_GENINSRC = stamp-geninsrc
106 else
107 STAMP_GENINSRC =
108 endif
110 all-local: $(STAMP_GENINSRC) 
112 stamp-geninsrc: fastjar.1 grepjar.1 fastjar.info
113         -cp -p $(top_builddir)/fastjar.1 $(srcdir)/fastjar.1
114         -cp -p $(top_builddir)/grepjar.1 $(srcdir)/grepjar.1
115         -cp -p $(top_builddir)/fastjar.info $(srcdir)/fastjar.info
116         touch $@
118 CLEANFILES = stamp-geninsrc fastjar.info
119 MAINTAINERCLEANFILES = $(srcdir)/fastjar.1 \
120                        $(srcdir)/grepjar.1 \
121                        $(srcdir)/fastjar.info