]> git.sur5r.net Git - glabels/blob - barcode-0.98/doc/Makefile.in
Imported Upstream version 2.2.8
[glabels] / barcode-0.98 / doc / Makefile.in
1 #
2 # Makefile (now .in) for the documentation directory
3 #
4 # Copyright 1994,2000   rubini@gnu.org (Alessandro Rubini)
5 #
6 #################
7 #
8 # BE CAREFUL in editing:
9 #       due to the large number of index files, and my use of a non standard
10 #       info input file, any file $(TARGET).* is removed by "make clean"
11 #
12 #       I chose to use a prefix for the input file ("doc.$(TARGET)"), to ease
13 #       makeing clean and applying my own rules.
14 #
15 ###################################################################
16 #
17 # First of all, retrieve features of makeinfo, to know if we can do images
18 # and --html. Also, allow MAKEINFO to be specified on the commandline to
19 # allow me testing with various versions.
20
21 # NOTE: it looks like semi-old versions can do images too, so CANDOIMAGES
22 #       is not (yet?) used
23
24
25 MAKEINFO = @MAKEINFO@
26 # According to whether this makeinfo can output html, autoconf define these
27 REMOVEHTMLTAGS = @REMOVEHTMLTAGS@
28 INFOTOHTML = @INFOTOHTML@
29
30 ##############################################
31
32
33 TARGET = barcode
34 ALL    = $(TARGET).ps $(TARGET).info $(TARGET)doc.txt $(TARGET).html \
35                 $(TARGET).pdf 
36
37 all: $(ALL) terse
38
39 info: $(TARGET).info
40
41 $(TARGET)doc.txt: mktxt
42
43 mpage: all
44         mv $(TARGET).ps $(TARGET)1.ps
45         mpage -2A $(TARGET)1.ps > $(TARGET)2.ps && rm $(TARGET)1.ps
46
47 terse:
48         # preserve the pdf copy
49         -mv -f $(TARGET).pdf PDF 2> /dev/null && \
50                 rm -f *~ *.dvi *.log *.aux \
51                       $(TARGET).*.bak $(TARGET).??? $(TARGET).texinfo && \
52                 mv PDF $(TARGET).pdf;
53
54         # preserve the ps copy
55         -mv $(TARGET).ps PS;
56         -rm -f $(TARGET).??;
57         -mv PS $(TARGET).ps;
58
59 clean: terse
60         rm -f $(ALL) $(TARGET)_toc.html
61
62
63 ####################################################
64
65 # These rules used to be expressed as "%.texinfo: doc.%" etc. However, this
66 # is gmake-specific, so I turned every % to $(TARGET), thus loosing generality
67 # but gaining portability. I also had to drop "$^": it worked with gmake
68 # and not pmake, while "$<" worked with pmake and not gmake.
69 # with gmake and not pmake.
70 #    ARub 2000-04-21
71
72 $(TARGET).texinfo: doc.$(TARGET)
73         @rm -f $@ 2> /dev/null
74         sed -f ./infofilter doc.$(TARGET) | $(REMOVEHTMLTAGS) > $@
75         chmod 400 $@
76
77
78 # This rule is somewhat a rewrite of texi2dvi. I like make more than sh :-)
79 # This had to be rewritten too, as "$*" is different in gmake and pmake
80
81 $(TARGET).dvi: $(TARGET).texinfo
82
83 # create a spurious  index file to please silly sh (bash will work anyway)
84         touch $(TARGET).oo
85
86 # get the index list
87         if test "x`ls $(TARGET).?? $(TARGET).aux`" != "x"; then \
88           for i in `ls $(TARGET).?? $(TARGET).aux`; do \
89             cp $$i $$i~; \
90           done; \
91         fi
92         tex $(TARGET).texinfo
93
94 #check the file list, the file and if needed run TeX again
95         old="`ls $(TARGET).??~ $(TARGET).aux~ | sed 's/~//g'`"; \
96         new="`ls $(TARGET).?? $(TARGET).aux`"; \
97         need="n"; \
98         if test "$$old" != "$$new"; then need="y"; \
99         else \
100           for i in  `ls $(TARGET).?? $(TARGET).aux`; do \
101             cmp -s $$i $$i~; if test $$? -ne 0; then need="y" break; fi; \
102           done; \
103         fi; \
104         if test "$$need" = "y"; then \
105           texindex $(TARGET).?? && tex $(TARGET).texinfo; \
106         fi
107
108
109 $(TARGET).ps: $(TARGET).dvi
110         dvips -f $(TARGET).dvi > $@
111
112 $(TARGET).pdf: $(TARGET).ps
113         ps2pdf $(TARGET).ps > $@
114
115 $(TARGET).lj: $(TARGET).dvi
116         dvilj -e- $(TARGET).dvi > $@
117
118 $(TARGET).info: $(TARGET).texinfo
119         makeinfo $(TARGET).texinfo -o $@
120
121 $(TARGET).html: $(TARGET).texinfo
122         $(INFOTOHTML) -o $@ $<
123
124 #$(TARGET).man: doc.$(TARGET)
125 #               manpages are created by the toplevel Makefile
126
127 $(TARGET)doc.txt: $(TARGET).info
128         awk -f ./mktxt $(TARGET).info > $@
129
130
131
132
133
134
135