1# $Id: Makefile.in,v 1.9 1999/10/25 21:18:21 MRO Exp $ 2# Makefile for LaTeX2HTML. 3# Copyright (C) 1997 Marek Rouchal <marek@saftsack.fs.uni-bayreuth.de> 4 5# @configure_input@ 6 7# This program is free software; you can redistribute it and/or modify 8# it under the terms of the GNU General Public License as published by 9# the Free Software Foundation; either version 2, or (at your option) 10# any later version. 11 12# This program is distributed in the hope that it will be useful, 13# but WITHOUT ANY WARRANTY; without even the implied warranty of 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15# GNU General Public License for more details. 16 17# You should have received a copy of the GNU General Public License 18# along with this program; if not, write to the Free Software 19# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20# 02111-1307, USA. 21 22#### Start of system configuration section. #### 23 24DISTVER = @distver@ 25srcdir = @srcdir@ 26 27PERL = @PERL@ 28PLAT = @plat@ 29AUTOCONF = autoconf 30 31# All programs 32SCRIPTS = latex2html texexpand pstoimg 33 34# Modules 35MODULES = l2hconf.pm 36 37# for dependencies 38wrappers = wrapper/dos.pin wrapper/macos.pin wrapper/os2.pin \ 39 wrapper/unix.pin wrapper/win32.pin 40 41# Switch for Perl Warnings; should always be on 42# temporary solution until latexhtml is cleaned up 43PERLW =# -w 44 45#### End of system configuration section. #### 46 47# Placeholder for additional arguments 48ARGS=# 49 50SHELL = /bin/sh 51 52# Files that can be generated, but should be up to date for a distribution. 53DISTDEP = configure Makefile MANIFEST 54 55buildcmd = config/build.pl 56BUILDOPT=# nothing special, but -devel is a good idea! 57TESTCASE=l2htest# can be overridden on the command line 58installcmd = config/install.pl 59cfgfile = cfgcache.pm 60 61all: ${SCRIPTS} ${MODULES} 62 63devel: 64 ${MAKE} all BUILDOPT=-devel 65 66# .SUFFIXES: 67 68pstoimg: ${cfgfile} ${srcdir}/${buildcmd} pstoimg.pin ${wrappers} 69 ${PERL} ${srcdir}/${buildcmd} -x ${BUILDOPT} $@ 70 touch pstoimg 71 72latex2html: ${cfgfile} ${srcdir}/${buildcmd} latex2html.pin ${wrappers} 73 ${PERL} ${srcdir}/${buildcmd} -x ${BUILDOPT} $@ 74 touch latex2html 75 76texexpand: ${cfgfile} ${srcdir}/${buildcmd} texexpand.pin ${wrappers} 77 ${PERL} ${srcdir}/${buildcmd} -x ${BUILDOPT} $@ 78 touch texexpand 79 80${cfgfile}: config.status 81 82l2hconf.pm: ${cfgfile} ${srcdir}/${buildcmd} l2hconf.pin 83 ${PERL} ${srcdir}/${buildcmd} ${BUILDOPT} $@ 84 touch l2hconf.pm 85 86test: all 87 LATEX2HTMLDIR=${srcdir}; export LATEX2HTMLDIR ; \ 88 latex2html='' ; \ 89 for file in latex2html bin/latex2html* bin/${PLAT}/latex2html*; do \ 90 test -s $$file && latex2html=$$file break ; \ 91 done ; \ 92 if test -n "$$latex2html"; then \ 93 echo "*** Running test on $$latex2html"; \ 94 cd tests ; ${PERL} ../$$latex2html -test_mode ${ARGS} ${TESTCASE} ; \ 95 fi 96 97test_clean: 98 cd tests ; \ 99 for i in *.tex ; do \ 100 dir=`basename $$i .tex` ; \ 101 rm -rf $$dir ; \ 102 done ; \ 103 rm -f *.aux *.dvi *.log 104 105test_pstoimg: pstoimg 106 @LATEX2HTMLDIR=${srcdir}; export LATEX2HTMLDIR ; \ 107 pstoimg='' ; \ 108 for file in pstoimg bin/pstoimg* bin/${PLAT}/pstoimg*; do \ 109 test -s $$file && pstoimg=$$file break ; \ 110 done ; \ 111 if test -n "$$pstoimg"; then \ 112 echo "*** Running test: $$pstoimg ${ARGS}"; \ 113 ${PERL} $$pstoimg ${ARGS} ; \ 114 fi 115 116texlive: texlive.pm 117 cp texlive.pm ${cfgfile} 118 ${MAKE} all 119 120check: all 121 LATEX2HTMLDIR=${srcdir}; export LATEX2HTMLDIR ; \ 122 for file in versions/*.pl styles/*.perl; do \ 123 ${PERL} ${PERLW} -c $$file || exit 1; \ 124 done ; \ 125 for file in ${SCRIPTS} ${MODULES}; do \ 126 test -s $$file && ( ${PERL} ${PERLW} -c $$file || exit 1 ); \ 127 test -s $$file.pl && ( ${PERL} ${PERLW} -c $$file.pl || exit 1 ); \ 128 done ; \ 129 exit 0 130 131install: all 132 ${PERL} ${installcmd} 133 134# Don't cd, to avoid breaking install-sh references. 135 136${srcdir}/configure: 137 cd ${srcdir} && \ 138 ${AUTOCONF} 139 140Makefile: Makefile.in config.status 141 ./config.status 142 143config.status: ${srcdir}/configure config/config.pl 144 ./config.status --recheck 145 146clean mostlyclean distclean:: test_clean 147 rm -f ${SCRIPTS} ${MODULES} *.tmp *.bak *.pl 148 rm -fr bin 149 150distclean:: 151 rm -f Makefile config.status config.cache config.log ${cfgfile} 152 rm -f test.bat install.bat 153 154MANIFEST: 155 ${PERL} make_manifest \ 156 -x configure.in \ 157 -x make_manifest \ 158 > MANIFEST 159 160# Create a distribution based on the MANIFEST file 161dist: ${DISTDEP} 162 distname=latex2html-${DISTVER} ; \ 163 rm -fr $$distname; \ 164 mkdir $$distname; \ 165 for item in `cat MANIFEST`; do \ 166 test -d $$item && mkdir $$distname/$$item; \ 167 test -f $$item && ( \ 168 ln $$item $$distname/$$item || \ 169 { echo copying $$item instead; cp -p $$item $$distname/$$item;}; \ 170 ) ; \ 171 done; \ 172 chmod -R u+rw,go-w+rX $$distname; \ 173 tar -chz -f $$distname.tar.gz $$distname; \ 174 rm -fr $$distname 175 176# Create a zipped dist 177zipdist: ${DISTDEP} 178 distname=latex2html-${DISTVER} ; \ 179 rm -fr $$distname; \ 180 mkdir $$distname; \ 181 for item in `cat MANIFEST`; do \ 182 test -d $$item && mkdir $$distname/$$item; \ 183 test -f $$item && ( \ 184 ln $$item $$distname/$$item || \ 185 { echo copying $$item instead; cp -p $$item $$distname/$$item;}; \ 186 ) ; \ 187 done; \ 188 chmod -R u+rw,go-w+rX $$distname; \ 189 zip -r -y $$distname.zip $$distname; \ 190 rm -fr $$distname 191 192# no comment... 193love: 194 @echo "...not war!" 195 196