| 1 |
# Makefile -- install mcite |
| 2 |
# Copyright (C) 1994 [email protected] |
| 3 |
# |
| 4 |
# Mcite 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 |
# Mcite 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 |
# $Header: /home/sources/ohl/tex/thotex/mcite/Makefile,v 1.4 1996/01/01 23:52:29 ohl Exp $ |
| 19 |
# |
| 20 |
######################################################################## |
| 21 |
|
| 22 |
# The name of the game |
| 23 |
PROJECT = mcite |
| 24 |
|
| 25 |
# foo.sty, foo.cls, or foo.tex ??? |
| 26 |
STY = sty |
| 27 |
|
| 28 |
VERSION = 0 |
| 29 |
RELEASE = 4 |
| 30 |
STATUS = beta |
| 31 |
|
| 32 |
######################################################################## |
| 33 |
|
| 34 |
# Directories |
| 35 |
prefix = $(HOME) |
| 36 |
texdir = $(prefix)/tex/inputs |
| 37 |
mfdir = $(prefix)/mf/inputs |
| 38 |
docdir = $(texdir)/doc |
| 39 |
|
| 40 |
# Commands |
| 41 |
INSTALL_DATA = install -c -m 644 |
| 42 |
# INSTALL_DATA = cp |
| 43 |
|
| 44 |
# This has to be the new LaTeX |
| 45 |
LATEX = latex |
| 46 |
MAKEINDEX = makeindex |
| 47 |
BIBTEX = bibtex |
| 48 |
|
| 49 |
######################################################################## |
| 50 |
# No user serviceable parts below: |
| 51 |
######################################################################## |
| 52 |
|
| 53 |
all: $(PROJECT).$(STY) $(PROJECT).drv |
| 54 |
|
| 55 |
dvi: $(PROJECT).dvi |
| 56 |
|
| 57 |
install: all |
| 58 |
$(INSTALL_DATA) $(PROJECT).$(STY) $(texdir) |
| 59 |
|
| 60 |
install.doc: all |
| 61 |
$(INSTALL_DATA) $(PROJECT).dtx $(PROJECT).drv $(docdir) |
| 62 |
|
| 63 |
uninstall: |
| 64 |
rm -f $(texdir)/$(PROJECT).$(STY) |
| 65 |
|
| 66 |
uninstall.doc: |
| 67 |
rm -f $(docdir)/$(PROJECT).dtx |
| 68 |
rm -f $(docdir)/$(PROJECT).drv |
| 69 |
|
| 70 |
$(PROJECT).$(STY): $(PROJECT).dtx $(PROJECT).ins |
| 71 |
$(LATEX) $(PROJECT).ins |
| 72 |
|
| 73 |
$(PROJECT).drv htex.drv hyperbasics.tex: $(PROJECT).$(STY) |
| 74 |
|
| 75 |
$(PROJECT).dvi: $(PROJECT).dtx $(PROJECT).drv \ |
| 76 |
$(PROJECT).$(STY) hyperbasics.tex |
| 77 |
-$(LATEX) $(PROJECT).drv |
| 78 |
$(BIBTEX) $(PROJECT) |
| 79 |
$(MAKEINDEX) -s gind.ist -o $(PROJECT).ind $(PROJECT).idx |
| 80 |
$(MAKEINDEX) -s gglo.ist -o $(PROJECT).gls $(PROJECT).glo |
| 81 |
$(LATEX) $(PROJECT).drv |
| 82 |
while grep 'Rerun to get cross-references right\.' $(PROJECT).log; \ |
| 83 |
do \ |
| 84 |
$(LATEX) $(PROJECT).drv; \ |
| 85 |
done |
| 86 |
|
| 87 |
clean: |
| 88 |
rm -f *.log *.ps *.dv[ij] *.aux *.toc *.lof *.lot \ |
| 89 |
*.[bi]lg *.glo *.gls *.idx *.ind *.bbl \ |
| 90 |
*.hrf '#*#' *~ .*~ |
| 91 |
|
| 92 |
realclean: clean |
| 93 |
rm -f $(PROJECT).$(STY) $(PROJECT).drv |
| 94 |
|
| 95 |
distclean: realclean |
| 96 |
|
| 97 |
######################################################################## |
| 98 |
# Maintenance: |
| 99 |
|
| 100 |
DISTFILES = /usr/local/etc/COPYING README Makefile \ |
| 101 |
$(PROJECT).dtx $(PROJECT).ins $(PROJECT).bib |
| 102 |
|
| 103 |
distdir = $(PROJECT)-$(VERSION).$(RELEASE)$(STATUS) |
| 104 |
CVSTAG = $(PROJECT)_$(VERSION)_$(RELEASE)$(STATUS) |
| 105 |
M = |
| 106 |
|
| 107 |
commit: |
| 108 |
@if test -n "$(M)"; then \ |
| 109 |
echo "cvs commit -m '$(M)'"; cvs commit -m '$(M)'; \ |
| 110 |
echo "cvs tag $(CVSTAG)"; cvs tag $(CVSTAG); \ |
| 111 |
echo "cvs tag -b $(CVSTAG)_"; cvs tag -b $(CVSTAG)_; \ |
| 112 |
else \ |
| 113 |
echo "usage: make commit M='<message>'" 1>&2; \ |
| 114 |
fi |
| 115 |
|
| 116 |
dist: $(distdir).tar.gz |
| 117 |
snap: $(PROJECT)-current.tar.gz |
| 118 |
|
| 119 |
$(distdir).tar.gz: |
| 120 |
rm -fr $(distdir) $(distdir).tmp |
| 121 |
cvs export -r $(CVSTAG) -d $(distdir).tmp $(PROJECT) |
| 122 |
mkdir $(distdir) |
| 123 |
(cd ./$(distdir).tmp; cp $(DISTFILES) ../$(distdir)) |
| 124 |
tar cf - $(distdir) | gzip > $@ |
| 125 |
rm -fr $(distdir) $(distdir).tmp |
| 126 |
|
| 127 |
$(PROJECT)-current.tar.gz: $(DISTFILES) |
| 128 |
rm -fr $(PROJECT)-current |
| 129 |
mkdir $(PROJECT)-current |
| 130 |
cp $(DISTFILES) $(PROJECT)-current |
| 131 |
tar cf - $(PROJECT)-current | gzip > $@ |
| 132 |
rm -fr $(PROJECT)-current |
| 133 |
|
| 134 |
######################################################################## |
| 135 |
# Local Variables: |
| 136 |
# mode:text |
| 137 |
# End: |