components/python/pylxml/Makefile
changeset 1890 5a4ef66c42bf
parent 1434 c782e620dd26
child 1948 2d1537e7942d
--- a/components/python/pylxml/Makefile	Fri May 09 15:56:52 2014 -0700
+++ b/components/python/pylxml/Makefile	Fri May 09 20:59:20 2014 -0700
@@ -18,8 +18,11 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+
 #
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+#
+
 include ../../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		pylxml
@@ -43,14 +46,26 @@
 
 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
 
+# Needed to get around a broken /usr/lib/python2.7/config/Makefile
+# See CR #16837431.
+LD=$(CC)
+LDSHARED=$(CC) -G
+PYTHON_ENV += CC="$(CC)"
+PYTHON_ENV += LDSHARED="$(LDSHARED)"
+PYTHON_ENV += LD="$(LD)"
+PYTHON_ENV += CFLAGS="$(CFLAGS)"
+COMPONENT_INSTALL_ENV += $(PYTHON_ENV)
+
+COMPONENT_TEST_ARGS=	test
+COMPONENT_TEST_CMD=	$(MAKE) -i
+COMPONENT_TEST_DIR=	$(SOURCE_DIR)
+
 # common targets
 build:		$(BUILD_32_and_64)
 
 install:	$(INSTALL_32_and_64)
 
-test:		$(BUILD_32_and_64)
-		cd $(SOURCE_DIR) && $(PYTHON) selftest.py
-		cd $(SOURCE_DIR) && $(PYTHON) selftest2.py
+test:		$(TEST_32_and_64)
 
 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)