Debian Codegraph @

Makefile

raw symbols ◀ ▶ SCIP
2 Debian patches touch this file
1 #
2 # rcsid $Header: /usr/cvsroot/magic-8.0/Makefile,v 1.1.1.1 2008/02/03 20:43:49 tim Exp $
3 #
4
5 MAGICDIR = .
6 PROGRAMS = magic
7 TECH = scmos
8 LIBRARIES = database utils extflat
9 MODULES = bplane cmwind commands database dbwind debug drc extflat \
10 extract graphics netmenu plow resis select sim textio tiles \
11 utils windows wiring
12
13 MAKEFLAGS =
14 INSTALL_CAD_DIRS = windows doc ${TECH}
15
16 -include defs.mak
17
18 all: $(ALL_TARGET)
19
20 standard:
•21 ${MAKE} mains
22
23 tcl:
•24 ${MAKE} tcllibrary
25
26 force: clean all
27
28 defs.mak:
29 @echo No \"defs.mak\" file found. Run "configure" to make one.
30
31 config:
32 ${MAGICDIR}/configure
33
34 tcllibrary: database/database.h modules
35 @echo --- making Tcl shared libraries
36 for dir in ${PROGRAMS}; do \
•37 ${MAKE} -C $$dir tcl-main || exit 1 ; done
38
39 mains: database/database.h modules libs
40 @echo --- making main programs
41 for dir in ${PROGRAMS}; do \
•42 ${MAKE} -C $$dir main || exit 1 ; done
43
44 database/database.h: database/database.h.in
45 @echo --- making header file database/database.h
46 ${SCRIPTS}/makedbh database/database.h.in database/database.h
47
48 modules: database/database.h depend
49 @echo --- making modules
50 for dir in ${MODULES} ${PROGRAMS}; do \
•51 ${MAKE} -C $$dir module || exit 1 ; done
52
53 libs:
54 @echo --- making libraries
55 for dir in ${LIBRARIES}; do \
•56 ${MAKE} -C $$dir lib || exit 1 ; done
57
58 depend: database/database.h
59 @echo --- making dependencies
60 ${RM} */Depend
61 for dir in ${MODULES} ${UNUSED_MODULES} ${PROGRAMS}; do \
•62 ${MAKE} -C $$dir depend || exit 1 ; done
63
64 install: $(INSTALL_TARGET)
65
66 install-magic:
67 @echo --- installing executable to $(DESTDIR)${INSTALL_BINDIR}
68 @echo --- installing runtime files to $(DESTDIR)${INSTALL_LIBDIR}
69 @${MAKE} install-real 2>&1 >> install.log
70
71 install-real: install-dirs
72 for dir in ${INSTALL_CAD_DIRS}; do \
•73 ${MAKE} -C $$dir install || exit 1 ; done
74 for dir in ${PROGRAMS}; do \
•75 ${MAKE} -C $$dir install || exit 1 ; done
76
77 install-tcl-dirs:
78 ${MAGICDIR}/scripts/mkdirs $(DESTDIR)${INSTALL_BINDIR} \
79 $(DESTDIR)${INSTALL_MANDIR} $(DESTDIR)${INSTALL_SYSDIR} \
•80 $(DESTDIR)${INSTALL_TCLDIR}
81
82 install-dirs:
83 ${MAGICDIR}/scripts/mkdirs $(DESTDIR)${INSTALL_BINDIR} \
84 $(DESTDIR)${INSTALL_MANDIR} $(DESTDIR)${INSTALL_SYSDIR} \
85 $(DESTDIR)${INSTALL_SCMDIR}
86
87 install-tcl:
88 @echo --- installing executable to $(DESTDIR)${INSTALL_BINDIR}
89 @echo --- installing runtime files to $(DESTDIR)${INSTALL_LIBDIR}
90 @${MAKE} install-tcl-real 2>&1 >> install.log
91
92 install-tcl-real: install-tcl-dirs
93 for dir in ${INSTALL_CAD_DIRS} ${PROGRAMS}; do \
•94 ${MAKE} -C $$dir install-tcl || exit 1 ; done
95
96 clean:
97 for dir in ${MODULES} ${PROGRAMS} ${TECH} ${UNUSED_MODULES}; do \
98 (cd $$dir && ${MAKE} clean); done
99 ${RM} *.tmp */*.tmp *.sav */*.sav *.log TAGS tags
100
101 distclean:
102 touch defs.mak
103 @${MAKE} clean
104 ${RM} defs.mak old.defs.mak ${MAGICDIR}/scripts/defs.mak
105 ${RM} ${MAGICDIR}/scripts/default.conf
106 ${RM} ${MAGICDIR}/scripts/config.log ${MAGICDIR}/scripts/config.status
107 ${RM} scripts/magic.spec magic-`cat VERSION` magic-`cat VERSION`.tgz
108 ${RM} *.log */Depend
109
110 dist:
111 ${RM} scripts/magic.spec magic-`cat VERSION` magic-`cat VERSION`.tgz
112 sed -e /@VERSION@/s%@VERSION@%`cat VERSION`% \
113 scripts/magic.spec.in > scripts/magic.spec
114 ln -nsf . magic-`cat VERSION`
115 tar zchvf magic-`cat VERSION`.tgz --exclude CVS \
116 --exclude magic-`cat VERSION`/magic-`cat VERSION` \
117 --exclude magic-`cat VERSION`/magic-`cat VERSION`.tgz \
118 magic-`cat VERSION`
119
120 clean-mains:
121 for dir in ${PROGRAMS}; do \
122 (cd $$dir && ${RM} $$dir); done
123
124 tags:
125 ${RM} tags
126 find . ${MODULES} ${PROGRAMS} -name "*.[ch]" -maxdepth 1 | xargs ctags -o tags
127
128 TAGS:
129 ${RM} TAGS
130 find . ${MODULES} ${PROGRAMS} -name "*.[ch]" -maxdepth 1 | xargs etags -o TAGS
131
132 setup-git:
133 git config --local include.path ../.gitconfig
134 git stash save
135 rm .git/index
136 git checkout HEAD -- "$$(git rev-parse --show-toplevel)"
137 git stash pop