| 1 |
# Makefile -- install emp. |
| 2 |
# Copyright (C) 1997 [email protected] |
| 3 |
# |
| 4 |
# Emp is free software; you can redistribute it and/or modify it |
| 5 |
# under the terms of the GNU General Public License as published by |
| 6 |
# the Free Software Foundation; either version 2, or (at your option) |
| 7 |
# any later version. |
| 8 |
# |
| 9 |
# Emp is distributed in the hope that it will be useful, but |
| 10 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
# GNU General Public License for more details. |
| 13 |
# |
| 14 |
# You should have received a copy of the GNU General Public License |
| 15 |
# along with this program; if not, write to the Free Software |
| 16 |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 17 |
# |
| 18 |
# $Id: Makefile,v 1.6 1997/11/12 21:14:41 ohl Exp $ |
| 19 |
# |
| 20 |
######################################################################## |
| 21 |
|
| 22 |
VERSION = 1 |
| 23 |
RELEASE = 00 |
| 24 |
STATUS = |
| 25 |
|
| 26 |
######################################################################## |
| 27 |
|
| 28 |
# Directories |
| 29 |
prefix = $(HOME) |
| 30 |
texdir = $(prefix)/tex/inputs |
| 31 |
docdir = $(texdir)/doc |
| 32 |
|
| 33 |
# Commands |
| 34 |
INSTALL = install -c -m 755 |
| 35 |
INSTALL_DATA = install -c -m 644 |
| 36 |
# INSTALL = cp |
| 37 |
# INSTALL_DATA = cp |
| 38 |
|
| 39 |
LATEX = latex |
| 40 |
MP = TEX=$(LATEX) mpost |
| 41 |
MAKEINDEX = makeindex |
| 42 |
DVIPS = dvips |
| 43 |
DFLAGS = |
| 44 |
|
| 45 |
######################################################################## |
| 46 |
# No user serviceable parts below: |
| 47 |
######################################################################## |
| 48 |
|
| 49 |
RESOLVE_XREF = \ |
| 50 |
$(LATEX) $*.drv && \ |
| 51 |
while grep 'Rerun to get cross-references right\.' $*.log; \ |
| 52 |
do \ |
| 53 |
$(LATEX) $*.drv; \ |
| 54 |
done |
| 55 |
|
| 56 |
RUN_MAKEINDEX = \ |
| 57 |
$(MAKEINDEX) -s gind.ist -o $*.ind $*.idx && \ |
| 58 |
$(MAKEINDEX) -s gglo.ist -o $*.gls $*.glo |
| 59 |
|
| 60 |
all: emp.sty emp.drv |
| 61 |
|
| 62 |
man: empman.dvi |
| 63 |
|
| 64 |
ps: emp.ps |
| 65 |
|
| 66 |
dvi: emp.dvi |
| 67 |
|
| 68 |
install: all |
| 69 |
$(INSTALL_DATA) emp.sty $(texdir) |
| 70 |
|
| 71 |
install.doc: all |
| 72 |
$(INSTALL_DATA) emp.dtx $(docdir) |
| 73 |
$(INSTALL_DATA) emp.drv $(docdir) |
| 74 |
$(INSTALL_DATA) empman.drv $(docdir) |
| 75 |
|
| 76 |
uninstall: |
| 77 |
rm -f $(texdir)/emp.sty |
| 78 |
|
| 79 |
uninstall.doc: |
| 80 |
rm -f $(docdir)/emp.dtx |
| 81 |
rm -f $(docdir)/emp.drv |
| 82 |
rm -f $(docdir)/empman.drv |
| 83 |
|
| 84 |
emp.sty: emp.dtx emp.ins |
| 85 |
$(LATEX) emp.ins |
| 86 |
|
| 87 |
emp.drv empman.drv: emp.sty |
| 88 |
|
| 89 |
emp.dvi: emp.dtx emp.drv emp.sty |
| 90 |
-$(LATEX) $*.drv |
| 91 |
$(MP) $* |
| 92 |
-$(LATEX) $*.drv |
| 93 |
$(RUN_MAKEINDEX) |
| 94 |
$(RESOLVE_XREF) |
| 95 |
|
| 96 |
empman.dvi: emp.dtx empman.drv emp.sty |
| 97 |
-$(LATEX) $*.drv |
| 98 |
$(MP) $* |
| 99 |
-$(LATEX) $*.drv |
| 100 |
$(RUN_MAKEINDEX) |
| 101 |
$(RESOLVE_XREF) |
| 102 |
|
| 103 |
manual.ps.gz: manual.ps |
| 104 |
gzip < $< > $@ |
| 105 |
|
| 106 |
manual.ps: empman.dvi $(MANPICS) |
| 107 |
$(DVIPS) $(DFLAGS) -o $@ $< |
| 108 |
|
| 109 |
emp.ps: emp.dvi $(MANPICS) |
| 110 |
$(DVIPS) $(DFLAGS) -o $@ $< |
| 111 |
|
| 112 |
clean: |
| 113 |
rm -f *.mp *.rawmp *.[0-9]* \ |
| 114 |
*.log *.dvi *.aux *.toc *.ilg *.glo *.gls *.idx *.ind \ |
| 115 |
*.ps *.mpx '#*#' *~ .*~ |
| 116 |
|
| 117 |
realclean: clean |
| 118 |
rm -f emp.sty emp.drv empman* |
| 119 |
|
| 120 |
distclean: realclean |
| 121 |
|
| 122 |
######################################################################## |
| 123 |
# Maintenance: |
| 124 |
|
| 125 |
DISTFILES = /usr/local/etc/COPYING README Makefile emp.dtx emp.ins |
| 126 |
|
| 127 |
distdir = emp-$(VERSION).$(RELEASE)$(STATUS) |
| 128 |
CVSTAG = EMP_$(VERSION)_$(RELEASE)$(STATUS) |
| 129 |
TEXTAG = v$(VERSION).$(RELEASE) |
| 130 |
M = |
| 131 |
|
| 132 |
fileversion: |
| 133 |
perl -pe \ |
| 134 |
's/^\\def\\fileversion\{.*\}/\\def\\fileversion{$(TEXTAG)}/;' \ |
| 135 |
emp.dtx > emp.vtmp |
| 136 |
if cmp -s emp.dtx emp.vtmp; then \ |
| 137 |
rm -f emp.vtmp; \ |
| 138 |
else \ |
| 139 |
mv emp.vtmp emp.dtx; \ |
| 140 |
fi |
| 141 |
|
| 142 |
commit: fileversion |
| 143 |
@if test -n "$(M)"; then \ |
| 144 |
echo "cvs commit -m '$(M)'"; cvs commit -m '$(M)'; \ |
| 145 |
echo "cvs tag $(CVSTAG)"; cvs tag $(CVSTAG); \ |
| 146 |
echo "cvs tag -b $(CVSTAG)_"; cvs tag -b $(CVSTAG)_; \ |
| 147 |
else \ |
| 148 |
echo "usage: make commit M='<message>'" 1>&2; \ |
| 149 |
fi |
| 150 |
|
| 151 |
dist: $(distdir).tar.gz |
| 152 |
snap: emp-current.tar.gz |
| 153 |
|
| 154 |
$(distdir).tar.gz: |
| 155 |
rm -fr $(distdir) $(distdir).tmp |
| 156 |
cvs export -r $(CVSTAG) -d $(distdir).tmp emp |
| 157 |
mkdir $(distdir) |
| 158 |
(cd ./$(distdir).tmp && \ |
| 159 |
make $(DISTFILES) && \ |
| 160 |
cp $(DISTFILES) ../$(distdir)) |
| 161 |
tar cf - $(distdir) | gzip > $@ |
| 162 |
rm -fr $(distdir) $(distdir).tmp |
| 163 |
|
| 164 |
emp-current.tar.gz: $(DISTFILES) fileversion |
| 165 |
rm -fr emp-current |
| 166 |
mkdir emp-current |
| 167 |
touch emp-current/1_THIS_IS_A_SNAPSHOT_OF_ |
| 168 |
touch emp-current/2_WORK_IN_PROGRESS_AND__ |
| 169 |
touch emp-current/3_NOT_YET_RELEASED_CODE_ |
| 170 |
cp $(DISTFILES) emp-current |
| 171 |
# perl -pe \ |
| 172 |
# 's/\[\\filedate/[(UNRELEASED and UNSUPPORTED snapshot)/;' \ |
| 173 |
emp.dtx > emp-current/emp.dtx |
| 174 |
tar cf - emp-current | gzip > $@ |
| 175 |
rm -fr emp-current |
| 176 |
|
| 177 |
######################################################################## |
| 178 |
# Local Variables: |
| 179 |
# mode:text |
| 180 |
# End: |