summaryrefslogtreecommitdiff
path: root/graphics/circuit_macros/Makefile
blob: d1881d4487416a2a097d8f40e51aa03ffedc0b6a (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
# The default postprocessor can be changed automatically as described below.
# This default can be overridden by reading the appropriate configuration file
# as the first file read by m4.

# Some of the steps could be simplified on many systems.

default:
	@echo "Usage:"
	@echo "  make psdefault"
	@echo "  make pgfdefault"
	@echo "  make gpicdefault"
	@echo "  make clean"
	@echo "  make clobber"

SH = sh
# SH = bash

#                                 To set the default postprocessor to
#                                 dpic -p with pstricks, type "make psdefault"
psdefault:
	@sed -e '/m4picprocessor/s/include([a-z][a-z]*\.m4)/include(pstricks.m4)/' \
      libgen.m4 > tmplibgen
	mv tmplibgen libgen.m4; chmod 644 libgen.m4
	@grep 'include.*divert' libgen.m4

#                                 To set the default postprocessor to
#                                 dpic -g with TikZ PGF, type "make pgfdefault"
pgfdefault:
	@sed -e '/m4picprocessor/s/include([a-z][a-z]*\.m4)/include(pgf.m4)/' \
      libgen.m4 > tmplibgen
	mv tmplibgen libgen.m4; chmod 644 libgen.m4
	@grep 'include.*divert' libgen.m4

#                                 To set the default postprocessor to
#                                 gpic -t type "make gpicdefault"
gpicdefault:
	@sed -e '/m4picprocessor/s/include([a-z][a-z]*\.m4)/include(gpic.m4)/' \
      libgen.m4 > tmplibgen
	mv tmplibgen libgen.m4; chmod 644 libgen.m4
	@grep 'include.*divert' libgen.m4

clean:
	rm -f `find . -name \*~ -print` tmplibgen
	(cd doc; make clean)
	(cd examples; make clean)

clobber:
	rm -f `find . -name \*~ -print`
	(cd doc; make clobber)
	(cd examples; make clobber)