summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/mcite/Makefile
blob: e569265d2d334c9baf28fca2948ed32a313d2f3a (plain)
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
# Makefile -- install mcite
# Copyright (C) 1994 Thorsten.Ohl@Physik.TH-Darmstadt.de
#
# Mcite is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by 
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# Mcite is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Header: /home/sources/ohl/tex/thotex/mcite/Makefile,v 1.4 1996/01/01 23:52:29 ohl Exp $
#
########################################################################

# The name of the game
PROJECT = mcite

# foo.sty, foo.cls, or foo.tex ???
STY = sty

VERSION = 0
RELEASE = 4
STATUS  = beta

########################################################################

# Directories
prefix = $(HOME)
texdir = $(prefix)/tex/inputs
mfdir = $(prefix)/mf/inputs
docdir = $(texdir)/doc

# Commands
INSTALL_DATA = install -c -m 644
# INSTALL_DATA = cp

# This has to be the new LaTeX
LATEX = latex
MAKEINDEX = makeindex
BIBTEX = bibtex

########################################################################
# No user serviceable parts below:
########################################################################

all: $(PROJECT).$(STY) $(PROJECT).drv

dvi: $(PROJECT).dvi

install: all
	$(INSTALL_DATA) $(PROJECT).$(STY) $(texdir)

install.doc: all
	$(INSTALL_DATA) $(PROJECT).dtx $(PROJECT).drv $(docdir)

uninstall:
	rm -f $(texdir)/$(PROJECT).$(STY)

uninstall.doc:
	rm -f $(docdir)/$(PROJECT).dtx
	rm -f $(docdir)/$(PROJECT).drv

$(PROJECT).$(STY): $(PROJECT).dtx $(PROJECT).ins
	$(LATEX) $(PROJECT).ins

$(PROJECT).drv htex.drv hyperbasics.tex: $(PROJECT).$(STY)

$(PROJECT).dvi: $(PROJECT).dtx $(PROJECT).drv \
		$(PROJECT).$(STY) hyperbasics.tex
	-$(LATEX) $(PROJECT).drv
	$(BIBTEX) $(PROJECT)
	$(MAKEINDEX) -s gind.ist -o $(PROJECT).ind $(PROJECT).idx
	$(MAKEINDEX) -s gglo.ist -o $(PROJECT).gls $(PROJECT).glo
	$(LATEX) $(PROJECT).drv
	while grep 'Rerun to get cross-references right\.' $(PROJECT).log; \
	do \
	  $(LATEX) $(PROJECT).drv; \
	done

clean:
	rm -f *.log *.ps *.dv[ij] *.aux *.toc *.lof *.lot \
	      *.[bi]lg *.glo *.gls *.idx *.ind *.bbl \
	      *.hrf '#*#' *~ .*~

realclean: clean
	rm -f $(PROJECT).$(STY) $(PROJECT).drv

distclean: realclean

########################################################################
# Maintenance:

DISTFILES = /usr/local/etc/COPYING README Makefile \
		$(PROJECT).dtx $(PROJECT).ins $(PROJECT).bib

distdir = $(PROJECT)-$(VERSION).$(RELEASE)$(STATUS)
CVSTAG = $(PROJECT)_$(VERSION)_$(RELEASE)$(STATUS)
M = 

commit:
	@if test -n "$(M)"; then \
	  echo "cvs commit -m '$(M)'"; cvs commit -m '$(M)'; \
	  echo "cvs tag $(CVSTAG)"; cvs tag $(CVSTAG); \
	  echo "cvs tag -b $(CVSTAG)_"; cvs tag -b $(CVSTAG)_; \
	else \
	  echo "usage: make commit M='<message>'" 1>&2; \
	fi

dist: $(distdir).tar.gz
snap: $(PROJECT)-current.tar.gz

$(distdir).tar.gz:
	rm -fr $(distdir) $(distdir).tmp
	cvs export -r $(CVSTAG) -d $(distdir).tmp $(PROJECT)
	mkdir $(distdir)
	(cd ./$(distdir).tmp; cp $(DISTFILES) ../$(distdir))
	tar cf - $(distdir) | gzip > $@
	rm -fr $(distdir) $(distdir).tmp

$(PROJECT)-current.tar.gz: $(DISTFILES)
	rm -fr $(PROJECT)-current
	mkdir $(PROJECT)-current
	cp $(DISTFILES) $(PROJECT)-current
	tar cf - $(PROJECT)-current | gzip > $@
	rm -fr $(PROJECT)-current

########################################################################
# Local Variables:
# mode:text
# End: