summaryrefslogtreecommitdiff
path: root/sys/src/cmd/python/Python/mkfile
blob: bab94765b891ee3df058963233f651e16108e93f (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
</$cputype/mkfile
cpuO=$O
APE=/sys/src/ape
<$APE/config

LIB=/$objtype/lib/ape/libpython.a

OFILES=\
	Python-ast.$O\
	asdl.$O\
	ast.$O\
	bltinmodule.$O\
	ceval.$O\
	codecs.$O\
	compile.$O\
	dynload_stub.$O\
	errors.$O\
#	fmod.$O\
	frozen.$O\
	frozenmain.$O\
	future.$O\
	getargs.$O\
	getcompiler.$O\
	getcopyright.$O\
	getmtime.$O\
	getopt.$O\
	getplatform.$O\
	getversion.$O\
	import.$O\
	importdl.$O\
	marshal.$O\
	modsupport.$O\
	mysnprintf.$O\
	mystrtoul.$O\
	pyarena.$O\
	pyfpe.$O\
	pystate.$O\
	pystrtod.$O\
	pythonrun.$O\
#	sigcheck.$O\
	structmember.$O\
	symtable.$O\
	sysmodule.$O\
	thread.$O\
	traceback.$O\
	graminit.$O\

</sys/src/cmd/mksyslib

CFLAGS=-c -I.. -I../Include -DT$objtype -DPy_BUILD_CORE -DNDEBUG

graminit.c ../Include/graminit.h:V: ../Parser/$cpuO.pgen
	../Parser/$cpuO.pgen ../Grammar/Grammar graminit.h graminit.c
	mv graminit.h ../Include


# when cputype!=objtype, $PGENO causes unnecessary object files to be created.
# but when cputype==objtype, it keeps this mkfile from fighting with mkfile.pgen
# over creating some of these.
../Parser/$cpuO.pgen:V: $PGENO
	@{
		cd ../Parser
		objtype=$cputype mk $cpuO.pgen
	}