~ubuntu-branches/ubuntu/wily/luatex/wily

« back to all changes in this revision

Viewing changes to source/texk/web2c/luatexdir/zziplib/docs/Makefile.am

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2010-04-29 00:47:19 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20100429004719-o42etkqe90n97b9e
Tags: 0.60.1-1
* new upstream release, adapt build-script patch
* disable patch: upstream-epstopdf_cc_no_xpdf_patching, included upstream
* disable patch: libpoppler-0.12, not needed anymore

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
AUTOMAKE_OPTIONS = 1.4 foreign
2
 
AUTOTOOL_VERSION=autoconf-2.52 automake-1.5 libtool-1.4.2
3
 
 
4
 
doc_FILES = README.MSVC6 README.SDL COPYING.MPL COPYING.LIB COPYING.ZLIB \
5
 
            zziplib.html
6
 
htm_FILES = zzip-index.htm zzip-zip.htm zzip-file.htm zzip-sdl-rwops.htm \
7
 
            zzip-extio.htm zzip-xor.htm zzip-crypt.htm zzip-cryptoid.htm \
8
 
            zzip-api.htm  zzip-basics.htm zzip-extras.htm zzip-parse.htm \
9
 
            64on32.htm future.htm fseeko.htm mmapped.htm memdisk.htm \
10
 
            configs.htm sfx-make.htm   developer.htm download.htm \
11
 
            history.htm referentials.htm  faq.htm copying.htm
12
 
SDL = @top_srcdir@/SDL
13
 
SDL_RWOPS = $(SDL)/SDL_rwops_zzcat.c \
14
 
            $(SDL)/SDL_rwops_zzip.c $(SDL)/SDL_rwops_zzip.h
15
 
changelog = @top_srcdir@/ChangeLog
16
 
 
17
 
EXTRA_DIST = make-doc.py $(doc_FILES) $(htm_FILES) $(SDL_RWOPS) \
18
 
             make-doc.pl make-dbk.pl   mksite.sh mksite.pl body.htm \
19
 
             manpages.ar zziplib-master.dbk
20
 
CLEANFILES = *.pc *.omf
21
 
DISTCLEANFILES = zziplib.spec manpages.ar htmpages.ar *.html *.xml
22
 
 
23
 
html_FILES = $(htm_FILES:.htm=.html) \
24
 
             $(htm_FILES:.htm=.print.html) \
25
 
             site.html site.print.html
26
 
 
27
 
default : doc
28
 
clean-doc clean-docs : clean-unpack
29
 
        - rm $(DISTCLEANFILES) 
30
 
        - rm $(MAINTAINERCLEANFILES)
31
 
 
32
 
# -------------------------------------------------------------------
33
 
zziplib.spec : @top_srcdir@/$(PACKAGE).spec
34
 
        @ $(LN_S) $? $@ # the two zzip-doc.* will grep thru zziplib.spec
35
 
doc  : $(doc_FILES) site.html
36
 
docs : doc manpages.ar htmpages.ar
37
 
docu : docs
38
 
zziplib0.html : zziplib0.xml
39
 
zziplib0.xml : zziplib.spec @srcdir@/Makefile.am @srcdir@/make-doc.pl \
40
 
                 $(srcdir)/make-doc.pl @top_srcdir@/zzip/*.c
41
 
        - @PERL@ $(srcdir)/make-doc.pl @top_srcdir@/zzip/*.c \
42
 
          "suffix=0" "package=$(PACKAGE)" "version=$(VERSION)" \
43
 
          "mainheader=zzip/zzip.h" "exported=<zzip/zzip.h> // or <zziplib.h>" \
44
 
          "docbookfile=$@" 
45
 
        - test -s $@
46
 
zziplib1.html : zziplib1.xml
47
 
zziplib1.xml : zziplib.spec @srcdir@/Makefile.am @srcdir@/make-doc.py \
48
 
                   $(srcdir)/make-doc.py @top_srcdir@/zzip/*.c
49
 
        - @PYTHON@ $(srcdir)/make-doc.py @top_srcdir@/zzip/*.c suffix=1
50
 
        - test -f zziplib1.docbook && mv zziplib1.docbook $@ ; test -s $@
51
 
zziplib.html :    zziplib1.html zziplib0.html
52
 
        - test -s zziplib0.html && cp zziplib0.html zziplib.html
53
 
        - test -s zziplib1.html && cp zziplib1.html zziplib.html
54
 
        test -s $@
55
 
zziplib.xml :     zziplib1.xml zziplib0.xml
56
 
        - test -s zziplib0.xml && cp zziplib0.xml zziplib.xml
57
 
        - test -s zziplib1.xml && cp zziplib1.xml zziplib.xml
58
 
        test -s $@ || rm $@
59
 
 
60
 
omfdir=${datadir}/omf
61
 
pkgomfdir=${omfdir}/${PACKAGE}
62
 
SFNETDIR=/groups/z/zz/zziplib/htdocs
63
 
SFNETDOC=${datadir}${SFNETDIR}
64
 
pkgdocdir=${datadir}${SFNETDIR}
65
 
bins = @top_srcdir@/bins
66
 
DOCEXAMPLES = $(bins)/zzdir.c $(bins)/zzcat.c \
67
 
              $(bins)/zzobfuscated.c $(bins)/zziptest.c \
68
 
              $(bins)/zzxordir.c $(bins)/zzxorcat.c \
69
 
              $(bins)/zzxorcopy.c        $(SDL_RWOPS)
70
 
 
71
 
install-docu: $(doc_FILES) $(man_FILES) site.html $(PACKAGE)-doc.omf
72
 
        $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)
73
 
        for i in $(html_FILES) ; do cat $$i \
74
 
        | sed -e 's:--START-->:-- :' -e 's:<!--ENDS--: --:' \
75
 
        -e "s:\\(href=\"[^/\"]*\\)[.]html\":\\1.htm\":" \
76
 
        -e "s:\\(href=\"[^/\"]*\\)[.]html\#:\\1.htm\#:" \
77
 
        > $(DESTDIR)$(pkgdocdir)/$$i ; done
78
 
        @ for i in $(doc_FILES) $(DOCEXAMPLES) $(srcdir)/README.* \
79
 
        ; do $(INSTALL_DATA) `test -f $$i || echo $(srcdir)/`$$i  \
80
 
          $(DESTDIR)$(pkgdocdir) ; done
81
 
        (cd $(DESTDIR)$(pkgdocdir) && ln -sf zziplib.html zziplib.htm)
82
 
        $(mkinstalldirs) $(DESTDIR)$(pkgomfdir)
83
 
        $(INSTALL_DATA) $(PACKAGE)-doc.omf $(DESTDIR)$(pkgomfdir)/
84
 
        - test ".$(DESTDIR)" != "." || scrollkeeper-update
85
 
 
86
 
install-sfnet: $(doc_FILES) $(man_FILES) site.html htmpages.ar
87
 
        $(mkinstalldirs) $(DESTDIR)$(SFNETDOC)
88
 
        $(INSTALL_DATA) $(html_FILES) $(DESTDIR)$(SFNETDOC)
89
 
        for i in $(doc_FILES) $(DOCEXAMPLES) $(changelog) $(srcdir)/README.* \
90
 
        ; do $(INSTALL_DATA) `test -f $$i || echo $(srcdir)/`$$i \
91
 
          $(DESTDIR)$(SFNETDOC) ; done
92
 
        (cd $(DESTDIR)$(SFNETDOC) && ln -sf zzip-index.html index.html)
93
 
        $(mkinstalldirs) $(DESTDIR)$(SFNETDOC)/man
94
 
        (test -f htmpages.ar || cd "$srcdir" ; P=`pwd` \
95
 
        ; cd $(DESTDIR)$(SFNETDOC)/man && ar x $$P/htmpages.ar)
96
 
 
97
 
install-doc : install-docu install-sfnet
98
 
 
99
 
# --------------------------------------------------------------------
100
 
man manpages : manpages.ar
101
 
htm htmpages : htmpages.ar
102
 
 
103
 
manpages.ar : zziplib.xml
104
 
        @ if test "$(XMLTO)" = ":" \
105
 
        ; then echo no xmlto found - could not regenerate "$@" - skipped \
106
 
        ; echo just touching the output file "$@" ; touch "$@" \
107
 
        ; else echo going to regenerate "$@" in subdir "'"man"'" \
108
 
        ; echo 'test ! -d man || rm man/* ; test -d man || mkdir man' \
109
 
        ;       test ! -d man || rm man/* ; test -d man || mkdir man  \
110
 
        ; echo '(cd man && xmlto man ../zziplib.xml)' \
111
 
        ;       (cd man && xmlto man ../zziplib.xml)  \
112
 
        ; echo 'test ! -f $@ || mv $@ $@.old' \
113
 
        ;       test ! -f $@ || mv $@ $@.old  \
114
 
        ; echo '(cd man && ar qc ../$@ *.3)' \
115
 
        ;       (cd man && ar qc ../$@ *.3)  \
116
 
        ; echo '(rm man/*.3 ; rmdir man)' \
117
 
        ;       (rm man/*.3 ; rmdir man)  \
118
 
        ; fi ; test -s $@ || mv $@.old $@ \
119
 
        || mv $(srcdir)/$@.old $@ || test -s $@.old >$@
120
 
 
121
 
htmpages.ar : zziplib.xml
122
 
        @ if test "$(XMLTO)" = ":" \
123
 
        ; then echo no xmlto found - could not regenerate "$@" - skipped \
124
 
        ; echo just touching the output file "$@" ; touch "$@" \
125
 
        ; else echo going to regenerate "$@" in subdir "'"man"'" \
126
 
        ; echo 'test ! -d man || rm /* ; test -d man || mkdir man' \
127
 
        ;       test ! -d man || rm man/* ; test -d man || mkdir man  \
128
 
        ; echo '(cd man && xmlto html ../zziplib.xml | tee written.lst)' \
129
 
        ;       (cd man && xmlto html ../zziplib.xml | tee written.lst)  \
130
 
        ; echo 'test ! -f $@ || mv $@ $@.old' \
131
 
        ;       test ! -f $@ || mv $@ $@.old  \
132
 
        ; echo '(cd man && ar qc ../$@ *.*)' \
133
 
        ;       (cd man && ar qc ../$@ *.*)  \
134
 
        ; echo '(rm man/*.* ; rmdir man)' \
135
 
        ;       (rm man/*.* ; rmdir man)  \
136
 
        ; fi ; test -s $@ || mv $@.old $@ \
137
 
        || mv $(srcdir)/$@.old $@ || test -s $@.old >$@
138
 
 
139
 
install-man3 : manpages.ar
140
 
        $(mkinstalldirs) $(DESTDIR)$(mandir)/man3
141
 
        P=`pwd` ; cd $(DESTDIR)$(mandir)/man3 \
142
 
        && ar x $$P/manpages.ar && chmod 664 *
143
 
 
144
 
unpack : manpages.ar htmpages.ar
145
 
        (rm -rf _htm && mkdir _htm && cd _htm && ar x ../htmpages.ar)
146
 
        (rm -rf _man && mkdir _man && cd _man && ar x ../manpages.ar)
147
 
clean-unpack : 
148
 
        rm -rf _htm
149
 
        rm -rf _man
150
 
 
151
 
# -------------------------------------------------------------------
152
 
spec_file=$(top_srcdir)/$(PACKAGE).spec
153
 
DOCSERIES= 775fb73e-1874-11d7-93e9-e18cd7ea3c2e
154
 
FROMSPEC= $(spec_file) | head -1 | sed -e 's,<,\&lt;,g' -e 's,>,\&gt;,g'
155
 
DATESPEC= `date +%Y-%m-%d`
156
 
 
157
 
$(PACKAGE)-doc.omf : $(spec_file) Makefile
158
 
        echo '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' >$@
159
 
        echo '<omf><resource><creator> Guido Draheim </creator>' >>$@
160
 
        grep Packager $(FROMSPEC) | sed -e 's,Packager *: *, <maintainer>,' \
161
 
                                    -e '/<maintainer>/s,$$,</maintainer>,' >>$@
162
 
        grep Summary  $(FROMSPEC) | sed -e 's,Summary *: *, <title>,' \
163
 
                       -e '/<title>/s,$$,</title>,' >>$@
164
 
        echo ' <date>'$(DATESPEC)'</date>' >>$@
165
 
        echo ' <version identifier="$(VERSION)" date="'$(DATESPEC)'"/>' >>$@
166
 
        grep Group  $(FROMSPEC) | sed -e 's,Group *: *, <subject category=",' \
167
 
                        -e 's,/,|,g' -e '/<subject/s,$$," />,' >>$@
168
 
        echo ' <format mime="text/html"/>' >>$@
169
 
        echo ' <identifier url="file:$(pkgdocdir)/zzip-index.htm"/>' >>$@
170
 
        echo ' <language code="C"/>' >>$@
171
 
        echo ' <relation seriesid="$(DOCSERIES)"/>' >>$@
172
 
        echo ' <rights type="GNU LGPL" holder="Guido Draheim"' >>$@
173
 
        echo '         license="$(pkgdocdir)/COPYING.LIB"/>' >>$@
174
 
        echo '</resource></omf>' >>$@
175
 
 
176
 
DOCBOOKDTD= -//OASIS/DTD Docbook V4.1.2//EN
177
 
MANSERIES= a302c642-1888-11d7-86f6-ba4b52ef847d
178
 
$(PACKAGE)-man.omf : $(PACKAGE)-doc.omf $(PACKAGE).xml
179
 
        sed -e 's,"text/html","text/xml" dtd="$(DOCBOOKDTD)",' \
180
 
            -e 's,</title>, (Function Reference)</title>,' \
181
 
            -e 's,/index.html,/manpages.xml,' \
182
 
            -e 's,$(DOCSERIES),$(MANSERIES),' $(PACKAGE)-doc.omf > $@
183
 
        test -s $@ || rm $@
184
 
 
185
 
omf : $(PACKAGE)-doc.omf $(PACKAGE)-man.omf $(PACKAGE).xml
186
 
install-omf : $(PACKAGE)-doc.omf $(PACKAGE)-man.omf $(PACKAGE).xml
187
 
        $(mkinstalldirs) $(DESTDIR)$(pkgomfdir)
188
 
        $(INSTALL_DATA) $(PACKAGE)-doc.omf $(DESTDIR)$(pkgomfdir)/
189
 
        $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)
190
 
        $(INSTALL_DATA) $(PACKAGE).xml $(DESTDIR)$(pkgdocdir)/manpages.xml
191
 
        $(INSTALL_DATA) $(PACKAGE)-man.omf $(DESTDIR)$(pkgomfdir)/
192
 
        - test ".$(DESTDIR)" != "." || scrollkeeper-update -v
193
 
 
194
 
# -------------------------------------------------------------------
195
 
datehead = <hr><table border="0" width="100%"><tr><td> \
196
 
    <a href="mailto:guidod@gmx.de?subject=$(PACKAGE):">guidod@gmx.de</a> \
197
 
    </td><td align="right">
198
 
datetail = </td></tr></table>
199
 
borderhead = <table cellpadding="10"><tr><td>
200
 
bordertail = </td></tr></table>
201
 
 
202
 
site.htm : body.htm
203
 
        cp $(srcdir)/body.htm site.htm
204
 
mksite_sh_args = --VERSION=$(VERSION) --xml --src-dir=$(srcdir)
205
 
site.html : site.htm mksite.sh $(htm_FILES)
206
 
        perl $(srcdir)/mksite.pl $(mksite_sh_args) site.htm || \
207
 
        $(SHELL) $(srcdir)/mksite.sh $(mksite_sh_args) site.htm
208
 
 
209
 
x : $(htm_FILES:.htm=.htmls)
210
 
$(htm_FILES:.htm=.htmls) : body.htm
211
 
%.htmls : %.htm
212
 
        @ title=`grep '<h2>' $< | sed -e 's:</h2>.*::' -e 's:<[^<>]*>::g'` \
213
 
        ; D=$(DATESPEC) ; cat $(srcdir)/body.htm \
214
 
        | sed -e "s/<!--VERSION-->/$(VERSION)/" \
215
 
        | sed -e "s/<!--DATE-->/$$D/" \
216
 
        | sed -e "s:</title>: - $$title</title>:" \
217
 
        | sed -e "/$@.>/s:\\([^<>]*\\)</a>:<b>\\1</b></a>:" \
218
 
        > $@
219
 
        @ echo $< '>>' $@; cat $< | sed -e "s/<!--VERSION-->/$(VERSION)/" \
220
 
        -e "s:</h2>\\(.*\\):</h2></td><td><i>\\1</i></td></tr></table>:" \
221
 
        -e 's:<h2>:<table width="100%"><tr valign="bottom"><td><h2>:' \
222
 
        -e 's:<td><i>:<td align="right"><br> <i>:' \
223
 
        -e 's:<P>:<p class="justify"><span class="justify">:g' \
224
 
        -e 's:</P>:</span></p>:g' \
225
 
        -e 's,<date>,<!--DATE: ,' -e 's,</date>, -->,' \
226
 
        -e 's,<!--border-->,$(borderhead)<!--BORDER-->,' >>$@
227
 
        @ if grep '<!--BORDER-->' $@ >/dev/null ; then : \
228
 
        ; echo "$(bordertail)<!--/BORDER-->" >>$@ ; fi
229
 
        @ D=`grep '<!--DATE:' $@ | sed -e 's,.*<!--DATE: *,,' -e 's, *-->,,'` \
230
 
        ; if test ".$$D" != "." ; then echo '$(datehead)' >>$@ \
231
 
        ; echo "$$D" >> $@ ; echo "$(datetail)" >> $@ ; fi
232
 
        @ echo "</td></tr></table></body></html>" >>$@
233
 
 
234
 
# ----------------------------------------------- create pdf via docbook xml
235
 
zzip.xml : $(htm_FILES) zziplib.xml make-dbk.pl
236
 
        @PERL@ make-dbk.pl $(htm_FILES) zziplib.xml >$@
237
 
        test -s "$@" || rm "$@"
238
 
 
239
 
zzip.html : zzip.xml
240
 
        xmlto html-nochunks zzip.xml
241
 
zzip.pdf  : zzip.xml
242
 
        xmlto pdf zzip.xml
243
 
 
244
 
zziplib.pdf : $(htm_FILES) $(srcdir)/zziplib-master.dbk mksite.pl
245
 
        cp $(srcdir)/zziplib-master.dbk zziplib.docbook
246
 
        xmlto pdf zziplib.docbook ; rm zziplib.docbook
247
 
        test -s zziplib.pdf
248
 
 
249
 
pdf : zziplib.pdf