]> git.lizzy.rs Git - plan9front.git/blob - sys/src/cmd/python/mkfile
python: remove /$objtype/lib/ape/libpython.a, track graminit.h dependencies, remove...
[plan9front.git] / sys / src / cmd / python / mkfile
1 APE=/sys/src/ape
2 <$APE/config
3
4 CFLAGS=-FVwN
5 BIN=/$objtype/bin
6
7 TARG=\
8         python\
9
10 OFILES=\
11         config.$O\
12         plan9.$O\
13         libpython.a$O\
14         libextra.a$O\
15
16 LIBDIRS=Python Parser Modules Objects Extra
17
18 </sys/src/cmd/mkone
19
20 CFLAGS=-c -I. -IInclude -DT$objtype -DPy_BUILD_CORE -DNDEBUG
21
22 libpython.a$O libextra.a$O:D:
23         for (i in $LIBDIRS) @{cd $i && mk}
24
25 config.c:D: Modules/config Extra/config mkconfig
26         ./mkconfig Modules/config Extra/config > $target
27
28 Extra/config:D:
29         du -a Extra | awk '/\.c$/{print $2}' | sed 's!.*/!!g; s!\.c$!!g' > $target
30
31 clean nuke:V:
32         for(i in $LIBDIRS) @{cd $i && mk $target}
33         rm -f *.[$OS] [$OS].out y.tab.? y.debug y.output $OFILES
34         rm -f libpython.a[$OS] libextra.a[$OS] /$objtype/lib/ape/libpython.a
35         rm -f config.c Extra/config