1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
|
#!/usr/bin/make -f
############################ -*- Mode: Makefile -*- ###########################
## rules ---
## Author : Manoj Srivastava ( srivasta@tiamat.datasync.com )
## Created On : Mon Apr 7 22:14:47 1997
## Created On Node : tiamat.datasync.com
## Last Modified By : Manoj Srivastava
## Last Modified On : Wed Apr 15 15:22:59 1998
## Last Machine Used: tiamat.datasync.com
## Update Count : 123
## Status : Unknown, Use with caution!
## HISTORY :
## Description :
## $Id: rules,v 1.1 1998/07/24 18:15:52 srivasta Exp $
###############################################################################
FILES_TO_CLEAN = debian/files debian/buildinfo debian/substvars \
latex2html.bak foilhtml/foilhtml-96.perl \
foilhtml/foilhtml.cfg foilhtml/foilhtml.drv \
foilhtml/foilhtml.log foilhtml/foilhtml.sty \
foilhtml/foils-97.perl foilhtml/foils.perl \
docs/*.cb docs/*.log docs/*.idx docs/*.aux docs/*.dvi \
docs/*.toc docs/*.lof docs/*.lot latex2html.bak \
../latex2html-98.001 ../latex2html-98.002 \
../latex2html-98.003
STAMPS_TO_CLEAN = stamp-configure stamp-build stamp-binary
DIRS_TO_CLEAN = debian/tmp docs/manual
thisdir =$(shell pwd)
install_file = /usr/bin/install -p -o root -g root -m 644
install_program= /usr/bin/install -p -o root -g root -m 755
install_game = /usr/bin/install -p -o root -g games -m 2755
make_directory = /usr/bin/install -p -d -o root -g root -m 755
package = $(shell grep Source debian/control | sed 's/^Source: //')
DOCDIR := debian/tmp/usr/doc/$(package)
MANDIR := debian/tmp/usr/man/man1
LIBDIR := debian/tmp/usr/lib/$(package)
STYLEDIR := debian/tmp/usr/lib/texmf/tex/latex/$(package)
SHADOW_ICONDIR := debian/tmp/var/www/usr/lib/$(package)/icons
# texinputs are now handled differently
INSTLIBS = icons.gif icons.png styles versions
LATEX2HTMLDIR = $(thisdir)
LATEX2HTMLCONFIG= $(thisdir)/latex2html.config
ICONSERVER = /usr/lib/latex2html/icons
DOCFILES = Changes FAQ README README.dvips TODO readme.hthtml
BINFILES = configure-pstoimg makemap pstoimg pstoimg_nopipes texexpand
LIBFILES = Override.pm
all build: stamp-build
stamp-build:
$(checkdir)
-test -f stamp-configure || $(MAKE) -f debian/rules configure
-if test -f latex2html.bak; then \
mv latex2html.bak latex2html; \
fi
(cd foilhtml; latex foilhtml.ins)
(cd docs; set -e; \
$(MAKE) manual.dvi; $(MAKE) manual.dvi; $(MAKE) manual.dvi;)
(cd docs; set -e; TMP="/tmp/l2hbuild$$$$"; export TMP; mkdir "$$TMP"; \
$(MAKE) html; rm -rf $$TMP; )
dpkg -l gcc perl dpkg 'libc*' binutils ldso make dpkg-dev | \
awk '$$1 == "ii" { printf("%s-%s\n", $$2, $$3) }' > \
debian/buildinfo
touch stamp-build
configure: stamp-configure
stamp-configure:
$(checkdir)
touch stamp-configure
clean:
$(checkdir)
rm -f $(FILES_TO_CLEAN) $(STAMPS_TO_CLEAN)
rm -rf $(DIRS_TO_CLEAN)
-$(MAKE) -C docs clean htmlclean
rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o \
-name '*~' -o -name '*.bak' -o -name '#*#' -o \
-name '.*.orig' -o -name '.*.rej' -o -name '.SUMS' -o \
-size 0 \) -print` TAGS
binary-indep: build stamp-binary
binary-arch: build
stamp-binary:
@test root = "`whoami`" || (echo need root priviledges; exit 1)
$(checkdir)
test -f stamp-build || $(MAKE) -f debian/rules build
-rm -rf debian/tmp
$(make_directory) $(DOCDIR)
$(make_directory) $(DOCDIR)/html
$(make_directory) $(LIBDIR)
$(make_directory) $(MANDIR)
$(make_directory) $(SHADOW_ICONDIR)
$(make_directory) $(STYLEDIR)
$(make_directory) debian/tmp/DEBIAN
$(make_directory) debian/tmp/etc
$(make_directory) debian/tmp/usr/bin
$(make_directory) debian/tmp/usr/sbin
#
$(install_program) configure-pstoimg debian/tmp/usr/sbin/
$(install_program) install-test \
debian/tmp/usr/sbin/configure-latex2html
$(install_program) latex2html debian/tmp/usr/bin
# Handle the conffiles
$(install_file) latex2html.config debian/tmp/etc
(cd $(LIBDIR); ln -s /etc/latex2html.config)
$(install_file) local.pm debian/tmp/etc/l2hpstoimg.cfg
(cd $(LIBDIR); ln -s /etc/l2hpstoimg.cfg local.pm )
(for i in $(LIBFILES) ; do \
$(install_file) $$i $(LIBDIR); \
done)
(for i in $(BINFILES) ; do \
$(install_program) $$i $(LIBDIR); \
done)
(for i in $(DOCFILES) ; do \
$(install_file) $$i $(DOCDIR); \
done)
$(install_file) debian/changelog $(DOCDIR)/changelog.Debian
$(install_file) debian/README.debian $(DOCDIR)/README.debian
$(install_file) debian/buildinfo $(DOCDIR)/buildinfo.Debian
(tar cf - $(INSTLIBS)) | (cd $(LIBDIR); tar xf -)
# Install IndicTeX-HTML perl files
find IndicTeX-HTML -type f -name \*.perl | while read i; do\
$(install_file) $$i $(LIBDIR)/styles; \
done
# Install foilhtml
$(install_file) foilhtml/foils.perl $(LIBDIR)/styles
$(install_file) foilhtml/foilhtml.sty $(STYLEDIR)
$(install_file) foilhtml/foilhtml.cfg debian/tmp/etc
(cd $(STYLEDIR); ln -s /etc/foilhtml.cfg)
$(install_file) foilhtml/foilhtml.dtx $(DOCDIR)
# makeseg
$(install_program) makeseg/makeseg $(LIBDIR)
$(install_file) makeseg/makeseg.tex $(DOCDIR)
# Examples
(tar cf - example) | (cd $(DOCDIR); tar xf -)
$(install_file) dot.latex2html-init $(DOCDIR)/example
mv $(DOCDIR)/example $(DOCDIR)/examples
(cd $(SHADOW_ICONDIR); \
for file in ../../../../../../usr/lib/$(package)/icons.*/* ; do \
dest=`echo $$file | sed s:\.\./\.\./\.\./\.\./\.\./\.\.::`; \
ln -s $$dest; \
done;)
# man pages
$(install_file) latex2html.1 $(MANDIR)
$(install_file) configure-pstoimg.1 $(MANDIR)
$(install_file) configure-latex2html.1 $(MANDIR)
# compress things
gzip -9fqr $(DOCDIR)
gzip -9fqr $(MANDIR)
$(install_file) docs/manual.dvi $(DOCDIR)/
(cd docs; tar cf - psfiles) | (cd $(DOCDIR); tar xpf -)
(cd $(DOCDIR); ln -s Changes.gz changelog.gz;)
$(install_file) debian/copyright $(DOCDIR)/copyright
find texinputs -type f -name \*.sty | while read i; do \
$(install_file) $$i $(STYLEDIR); \
done
(cd docs/manual/; tar cf - *.html *.gif *.css) | \
(cd $(DOCDIR)/html; tar xf -)
# menu
$(make_directory) debian/tmp/usr/lib/menu
$(install_file) debian/menuentry \
debian/tmp/usr/lib/menu/$(package)
$(install_file) debian/conffiles debian/tmp/DEBIAN/conffiles
$(install_program) debian/postinst debian/tmp/DEBIAN/postinst
$(install_program) debian/postrm debian/tmp/DEBIAN/postrm
dpkg-gencontrol
chown -R root.root debian/tmp
chmod -R go=rX debian/tmp
dpkg --build debian/tmp ..
touch stamp-binary
define checkdir
test -f debian/rules -a -f latex2html
endef
# Below here is fairly generic really
binary: binary-indep binary-arch
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
.PHONY: binary binary-arch binary-indep clean checkroot
|