diff options
author | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2004-05-25 04:32:27 +0000 |
---|---|---|
committer | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2004-05-25 04:32:27 +0000 |
commit | 3ac1acb9ea70080aaaf49ae211835f057e60eefa (patch) | |
tree | a2e08d2be3224409a033d25af8861d9853e72de7 /obsolete-buildroot/make/python.mk | |
parent | 1eb1b593980fdc06ab92f8e354129b0aadc4f1b0 (diff) |
Initial revision
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'obsolete-buildroot/make/python.mk')
-rw-r--r-- | obsolete-buildroot/make/python.mk | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/obsolete-buildroot/make/python.mk b/obsolete-buildroot/make/python.mk new file mode 100644 index 000000000..0be3a74a9 --- /dev/null +++ b/obsolete-buildroot/make/python.mk @@ -0,0 +1,57 @@ +############################################################# +# +# python +# +############################################################# +PYTHON_VERSION=2.3.2 +PYTHON_SOURCE:=Python-$(PYTHON_VERSION).tgz +PYTHON_SITE:=http://python.org/ftp/python/$(PYTHON_VERSION) +PYTHON_DIR:=$(BUILD_DIR)/Python-$(PYTHON_VERSION) +PYTHON_CAT:=zcat +PYTHON_BINARY:=python +PYTHON_INSTALL_DIR:=$(BUILD_DIR)/python_install +PYTHON_TARGET_BINARY:=$(PYTHON_INSTALL_DIR)/bin/python + + +$(DL_DIR)/$(PYTHON_SOURCE): + $(WGET) -P $(DL_DIR) $(PYTHON_SITE)/$(PYTHON_SOURCE) + +python-source: $(DL_DIR)/$(PYTHON_SOURCE) + +$(PYTHON_DIR)/.unpacked: $(DL_DIR)/$(PYTHON_SOURCE) + $(PYTHON_CAT) $(DL_DIR)/$(PYTHON_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(PYTHON_DIR)/.unpacked + +$(PYTHON_DIR)/.configured: $(PYTHON_DIR)/.unpacked + (cd $(PYTHON_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --sysconfdir=/etc \ + $(DISABLE_NLS) \ + ); + touch $(PYTHON_DIR)/.configured + +$(PYTHON_DIR)/$(PYTHON_BINARY): $(PYTHON_DIR)/.configured + LD_LIBRARY_PATH=$(STAGING_DIR)/lib + $(MAKE) CC=$(TARGET_CC) -C $(PYTHON_DIR) + +$(TARGET_DIR)/$(PYTHON_TARGET_BINARY): $(PYTHON_DIR)/$(PYTHON_BINARY) + +python: uclibc $(TARGET_DIR)/$(PYTHON_TARGET_BINARY) + $(MAKE) CC=$(TARGET_CC) -C $(PYTHON_DIR) install + rm $(PYTHON_INSTALL_DIR)/bin/idle + rm $(PYTHON_INSTALL_DIR)/bin/pydoc + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +python-clean: + -$(MAKE) -C $(PYTHON_DIR) distclean + rm $(PYTHON_DIR)/.configured + +python-dirclean: + rm -rf $(PYTHON_DIR) + |