summaryrefslogtreecommitdiff
path: root/support/splint/Makefile
blob: e122cfb363137f150949b09770f2bd2b5a852569 (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
# Copyright 2012-2024, Alexander Shibakov
# This file is part of SPLinT
#
# SPLinT 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 3 of the License, or
# (at your option) any later version.
#
# SPLinT 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 SPLinT.  If not, see <http://www.gnu.org/licenses/>.
SPLINT_EXAMPLES_BASE = expression ld
SPLINT_EXAMPLES_EXTRA = symbols xxpression
SPLINT_EXAMPLE_OTHER = $(if $BISON_IS_CRIPPLED,,$SPLINT_EXAMPLES_EXTRA)

SPLINT_EXAMPLES_DIRS = ${SPLINT_EXAMPLES_BASE} ${SPLINT_EXAMPLE_OTHER}
SPLINT_EXAMPLES_DIRS_ALL = ${SPLINT_EXAMPLES_BASE} ${SPLINT_EXAMPLES_EXTRA}

# the install directory; should be replaced by the appropriate local directory
# in makefile.loc
SPLINT_INSTALL_DIR = /tmp

DO_SUBMAKE = for dir in ${SPLINT_EXAMPLES_DIRS}; do cd ${SPLINT_ROOT}examples/$$dir && ${MAKE} $(1); done
CLEAN_SUBMAKE = for dir in ${SPLINT_EXAMPLES_DIRS_ALL}; do cd ${SPLINT_ROOT}examples/$$dir && ${MAKE} $(1); done

include makefile.inc
include makefile.loc

# output a list of all control sequences defined in the package

lists:		tex/*.sty
		perl scripts/cslist.pl $^ > cseqs.lst

manual:		
		cd ${SPLINT_ROOT}cweb && ${MAKE} docs

docs:		
		cd ${SPLINT_ROOT}cweb && ${MAKE} docs
		$(call DO_SUBMAKE,docs)

# install a stand alone version of all the parsers in the package

install:	all
		@cp ${SPLINT_ROOT}tex/*.sty ${SPLINT_INSTALL_DIR}/tex/
		@cp ${SPLINT_ROOT}cweb/*.tok ${SPLINT_INSTALL_DIR}/cweb/
		@cp -a ${SPLINT_ROOT}other/ ${SPLINT_INSTALL_DIR}/other/
		@cp ${SPLINT_XPTABLES} ${SPLINT_INSTALL_DIR}/cweb/
		@cp ${SPLINT_XLTABLES} ${SPLINT_INSTALL_DIR}/cweb/
		@cd ${SPLINT_ROOT}examples/ld && ${MAKE} install

uninstall:
		@cd ${SPLINT_ROOT}examples/ld && ${MAKE} uninstall
		@rm -f ${SPLINT_INSTALL_DIR}/tex/*
		@rm -f ${SPLINT_INSTALL_DIR}/cweb/*
		@rm -rf ${SPLINT_INSTALL_DIR}/other/texmf/

# clean will erase all automatically generated files in the current directory

clean:		clean_core
		-rm -f cseqs.lst

# mostlyclean will leave all the generated table and token equivalence files

mostlyclean:	
		-cd cweb && ${MAKE} clean_temp && rm -f ctablesout b?out ltout smallp_out \
		smalll_out lstabout bo.c np.c
		$(call CLEAN_SUBMAKE,mostlyclean)

# distclean will erase all automatically generated files

distclean:	clean
		rm -f splint.tar.bz2
		cd cweb && ${MAKE} clean
		$(call CLEAN_SUBMAKE,clean)