Guess the byte order of old-format locate databases
[findutils.git] / doc / Makefile.am
blobec70e4fa42854310e383848e42ec2b08ef4284a9
1 info_TEXINFOS = find.texi
2 find_TEXINFOS = perm.texi getdate.texi regexprops.texi
3 MOSTLYCLEANFILES = find.cps 
4 CLEANFILES = find.txt find_mono.html findutils.texi_html_node.tar.gz
6 # To build regexprops.texi, we need to build the regexprops program and 
7 # run it on the host.  If we are cross compiling, we may not have a native
8 # binary.  When this is the case, we use a workaround; don't delete the 
9 # file for 'make clean'.  This fixes Savannah bug #19658.
10 if !CROSS_COMPILING
11 CLEANFILES += regexprops.texi
12 endif
14 MAKEINFOTXT = $(MAKEINFO) --plaintext
16 find.txt: find.texi $(srcdir)/version.texi $(find_TEXINFOS)
18 # find.txt is a file which we need to know how to build 
19 # because it gets put on the www.gnu.org website.
20 # This rule is derived from the .texi.html rule.
21 .texi.txt:
22         rm -rf $(@:.txt=.tmp)
23         if $(MAKEINFOTXT) $(AM_MAKEINFOTXTFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
24          -o $(@:.txt=.tmp) $<; \
25         then \
26           rm -rf $@; \
27           if test ! -d $(@:.txt=.tmp) && test -d $(@:.txt=); then \
28             mv $(@:.txt=) $@; else mv $(@:.txt=.tmp) $@; fi; \
29         else \
30           if test ! -d $(@:.txt=.tmp) && test -d $(@:.txt=); then \
31             rm -rf $(@:.txt=); else rm -Rf $(@:.txt=.tmp) $@; fi; \
32           exit 1; \
33         fi
36 # find_mono.html is a file which we need to know how to build 
37 # because it gets put on the www.gnu.org website.
38 # This rule is derived from the generic .texi.html rule.
39 find_mono.html: find.texi
40         rm -rf $(@:.html=.htp)
41         if $(MAKEINFOHTML) --no-split $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
42          -o $(@:.html=.htp) $<; \
43         then \
44           rm -rf $@; \
45           if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
46             mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
47         else \
48           if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
49             rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
50           exit 1; \
51         fi
54 # findutils.texi_html_node.tar.gz is a file which we need to know
55 # how to build because it gets put on the www.gnu.org website.
56 # This rule depends on GNU tar, but it's principally used 
57 # by the maintainer, and we don't need to build the file 
58 # for "make all" or "make install" (or even "make check").
59 findutils.texi_html_node.tar.gz: find.html
60         tar zcf $@ $<
62 if CROSS_COMPILING
63 regexprops.texi: ../gnulib/lib/regex.h
64         echo "WARNING: $? is newer than $@ but $@ cannot be rebuilt because we are cross-compiling.   Continuing anyway." >&2
65 else
66 regexprops.texi: ../gnulib/lib/regex.h
67         cd ../lib && $(MAKE) $(AM_MAKEFLAGS) regexprops$(EXEEXT)
68         ../lib/regexprops$(EXEEXT) "Regular Expressions" > $@
69         rm ../lib/regexprops$(EXEEXT)
70 endif