ifup is now a standalone script
[openwrt.git] / obsolete-buildroot / make / python.mk
1 #############################################################
2 #
3 # python
4 #
5 #############################################################
6 PYTHON_VERSION=2.3.2
7 PYTHON_SOURCE:=Python-$(PYTHON_VERSION).tgz
8 PYTHON_SITE:=http://python.org/ftp/python/$(PYTHON_VERSION)
9 PYTHON_DIR:=$(BUILD_DIR)/Python-$(PYTHON_VERSION)
10 PYTHON_CAT:=zcat
11 PYTHON_BINARY:=python
12 PYTHON_INSTALL_DIR:=$(BUILD_DIR)/python_install
13 PYTHON_TARGET_BINARY:=$(PYTHON_INSTALL_DIR)/bin/python
14
15
16 $(DL_DIR)/$(PYTHON_SOURCE):
17 $(WGET) -P $(DL_DIR) $(PYTHON_SITE)/$(PYTHON_SOURCE)
18
19 python-source: $(DL_DIR)/$(PYTHON_SOURCE)
20
21 $(PYTHON_DIR)/.unpacked: $(DL_DIR)/$(PYTHON_SOURCE)
22 $(PYTHON_CAT) $(DL_DIR)/$(PYTHON_SOURCE) | tar -C $(BUILD_DIR) -xvf -
23 touch $(PYTHON_DIR)/.unpacked
24
25 $(PYTHON_DIR)/.configured: $(PYTHON_DIR)/.unpacked
26 (cd $(PYTHON_DIR); rm -rf config.cache; \
27 $(TARGET_CONFIGURE_OPTS) \
28 ./configure \
29 --target=$(GNU_TARGET_NAME) \
30 --host=$(GNU_TARGET_NAME) \
31 --build=$(GNU_HOST_NAME) \
32 --prefix=/usr \
33 --sysconfdir=/etc \
34 $(DISABLE_NLS) \
35 );
36 touch $(PYTHON_DIR)/.configured
37
38 $(PYTHON_DIR)/$(PYTHON_BINARY): $(PYTHON_DIR)/.configured
39 LD_LIBRARY_PATH=$(STAGING_DIR)/lib
40 $(MAKE) CC=$(TARGET_CC) -C $(PYTHON_DIR)
41
42 $(TARGET_DIR)/$(PYTHON_TARGET_BINARY): $(PYTHON_DIR)/$(PYTHON_BINARY)
43
44 python: uclibc $(TARGET_DIR)/$(PYTHON_TARGET_BINARY)
45 $(MAKE) CC=$(TARGET_CC) -C $(PYTHON_DIR) install
46 rm $(PYTHON_INSTALL_DIR)/bin/idle
47 rm $(PYTHON_INSTALL_DIR)/bin/pydoc
48 rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
49 $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
50
51 python-clean:
52 -$(MAKE) -C $(PYTHON_DIR) distclean
53 rm $(PYTHON_DIR)/.configured
54
55 python-dirclean:
56 rm -rf $(PYTHON_DIR)
57
This page took 0.044692 seconds and 5 git commands to generate.