summaryrefslogtreecommitdiffstats
path: root/rules/xchain-python.make
blob: c45aeee8f6f9ed90da0f23d98b8d38e0c0cef9ac (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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# -*-makefile-*-
# $Id: xchain-python.make,v 1.2 2003/10/23 15:01:19 mkl Exp $
#
# Copyright (C) 2003 by David R Bacon
#             Marc Kleine-Budde <kleine-budde@gmx.de>
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
ifdef PTXCONF_KAFFE
XCHAIN += xchain-python
endif

#
# Paths and names
#
XCHAIN_PYTHON_BUILDDIR	= $(BUILDDIR)/xchain-$(PYTHON)-build

# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------

xchain-python_get: $(STATEDIR)/xchain-python.get

$(STATEDIR)/xchain-python.get: $(STATEDIR)/python.get
	@$(call targetinfo, $@)
	touch $@

# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------

xchain-python_extract: $(STATEDIR)/xchain-python.extract

$(STATEDIR)/xchain-python.extract: $(STATEDIR)/python.extract
	@$(call targetinfo, $@)
	touch $@

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

xchain-python_prepare: $(STATEDIR)/xchain-python.prepare

#
# dependencies
#
xchain-python_prepare_deps = \
	$(STATEDIR)/xchain-python.extract

XCHAIN_PYTHON_ENV	= $(HOSTCC_ENV)
XCHAIN_PYTHON_AUTOCONF	= --prefix=$(PTXCONF_PREFIX)

$(STATEDIR)/xchain-python.prepare: $(xchain-python_prepare_deps)
	@$(call targetinfo, $@)
	@$(call clean, $(XCHAIN_PYTHON_BUILDDIR))
	mkdir -p $(XCHAIN_PYTHON_BUILDDIR)
	cd $(XCHAIN_PYTHON_BUILDDIR) && \
		$(XCHAIN_PYTHON_ENV) \
		$(PYTHON_DIR)/configure $(XCHAIN_PYTHON_AUTOCONF)
	touch $@

# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------

xchain-python_compile: $(STATEDIR)/xchain-python.compile

$(STATEDIR)/xchain-python.compile: $(STATEDIR)/xchain-python.prepare
	@$(call targetinfo, $@)
	make -C $(XCHAIN_PYTHON_BUILDDIR) python
	make -C $(XCHAIN_PYTHON_BUILDDIR) Parser/pgen
	touch $@

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

xchain-python_install: $(STATEDIR)/xchain-python.install

$(STATEDIR)/xchain-python.install: $(STATEDIR)/xchain-python.compile
	@$(call targetinfo, $@)
# 	make -C $(XCHAIN_PYTHON_BUILDDIR) bininstall
# 	install $(XCHAIN_PYTHON_BUILDDIR)/Parser/pgen $(PTXCONF_PREFIX)/bin/pgen
	touch $@

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

xchain-python_targetinstall: $(STATEDIR)/xchain-python.targetinstall

$(STATEDIR)/xchain-python.targetinstall:
	@$(call targetinfo, $@)
	touch $@

# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------

xchain-python_clean: 
	rm -rf $(STATEDIR)/xchain-python*
	rm -rf $(STATEDIR)/python.extract
	rm -rf $(STATEDIR)/python.prepare
	rm -rf $(STATEDIR)/python.compile
	rm -rf $(XCHAIN_PYTHON_BUILDDIR)
	rm -rf $(PYTHON_BUILDDIR)
	rm -rf $(PYTHON_DIR)

# vim: syntax=make