2004-11-13 Kelley Cook <kcook@gcc.gnu.org>
[official-gcc.git] / fastjar / Makefile.am
blob822baa9e1cba375aff6e08dc09fd9a50c8c43b42
1 # Process this with automake to create Makefile.in
3 ## We definitely don't want dependency tracking when using automake 1.4.
4 AUTOMAKE_OPTIONS = no-dependencies
5 ACLOCAL_AMFLAGS = -I ../config
7 # Work around what appears to be a GNU make bug handling MAKEFLAGS
8 # values defined in terms of make variables, as is the case for CC and
9 # friends when we are called from the top level Makefile.
10 AM_MAKEFLAGS = \
11         "AR_FLAGS=$(AR_FLAGS)" \
12         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
13         "CFLAGS=$(CFLAGS)" \
14         "CXXFLAGS=$(CXXFLAGS)" \
15         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
16         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
17         "INSTALL=$(INSTALL)" \
18         "INSTALL_DATA=$(INSTALL_DATA)" \
19         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
20         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
21         "JC1FLAGS=$(JC1FLAGS)" \
22         "LDFLAGS=$(LDFLAGS)" \
23         "LIBCFLAGS=$(LIBCFLAGS)" \
24         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
25         "MAKE=$(MAKE)" \
26         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
27         "PICFLAG=$(PICFLAG)" \
28         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
29         "SHELL=$(SHELL)" \
30         "exec_prefix=$(exec_prefix)" \
31         "infodir=$(infodir)" \
32         "libdir=$(libdir)" \
33         "prefix=$(prefix)" \
34         "AR=$(AR)" \
35         "AS=$(AS)" \
36         "CC=$(CC)" \
37         "CXX=$(CXX)" \
38         "LD=$(LD)" \
39         "LIBCFLAGS=$(LIBCFLAGS)" \
40         "NM=$(NM)" \
41         "PICFLAG=$(PICFLAG)" \
42         "RANLIB=$(RANLIB)" \
43         "DESTDIR=$(DESTDIR)"
45 AM_CPPFLAGS = -I. -I$(top_srcdir) $(ZINCS) -I$(top_srcdir)/../include
47 LIBIBERTY = ../libiberty/libiberty.a
49 bin_PROGRAMS = fastjar grepjar
50 fastjar_SOURCES = jartool.c dostime.c compress.c pushback.c shift.c jartool.h \
51 zipfile.h dostime.h compress.h pushback.h shift.h
52 fastjar_LDADD = $(ZLIBS) $(LIBIBERTY)
53 fastjar_DEPENDENCIES = $(ZDEPS) $(LIBIBERTY)
54 fastjar_CPPFLAGS = $(AM_CPPFLAGS) -DWITH_SHIFT_DOWN
56 grepjar_SOURCES = jargrep.c dostime.c compress.c pushback.c jartool.h \
57 zipfile.h dostime.h compress.h pushback.h
58 grepjar_LDADD = $(ZLIBS) $(LIBIBERTY)
59 grepjar_DEPENDENCIES = $(ZDEPS) $(LIBIBERTY)
61 AM_CFLAGS = @fastjar_warn_cflags@
62 AM_MAKEINFOFLAGS = -I $(srcdir)/../gcc/doc/include
64 TEXINFO_TEX = ../gcc/doc/include/texinfo.tex
65 info_TEXINFOS = fastjar.texi
66 fastjar_TEXINFOS = \
67         ../gcc/doc/include/gcc-common.texi \
68         ../gcc/doc/include/gpl.texi
69 man_MANS = fastjar.1 grepjar.1
70 EXTRA_DIST = $(man_MANS)
72 TEXI2POD = perl $(srcdir)/../contrib/texi2pod.pl
73 POD2MAN = pod2man --center="GNU" --release="gcc-@gcc_version@"
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 # GCC LOCAL CHANGE
89 # The following commands allow us to release tarballs with the man pages
90 # and info documentation prebuilt.  This feature is enabled via 
91 # --enable-generated-files-in-srcdir in the configure script.
93 if GENINSRC
94 STAMP_GENINSRC = stamp-geninsrc
95 else
96 STAMP_GENINSRC =
97 endif
99 all-local: $(STAMP_GENINSRC) 
101 stamp-geninsrc: fastjar.1 grepjar.1 fastjar.info
102         -cp -p $(top_builddir)/fastjar.1 $(srcdir)/fastjar.1
103         -cp -p $(top_builddir)/grepjar.1 $(srcdir)/grepjar.1
104         -cp -p $(top_builddir)/fastjar.info $(srcdir)/fastjar.info
105         touch $@
107 CLEANFILES = stamp-geninsrc fastjar.info
108 MAINTAINERCLEANFILES = $(srcdir)/fastjar.1 \
109                        $(srcdir)/grepjar.1 \
110                        $(srcdir)/fastjar.info