components/python/python27/Makefile
branchs11-update
changeset 3793 7befd73326eb
parent 3789 137fdcb27c8e
child 3795 cfd59dfe98a2
equal deleted inserted replaced
3792:482769b9a31b 3793:7befd73326eb
    16 # fields enclosed by brackets "[]" replaced with your own identifying
    16 # fields enclosed by brackets "[]" replaced with your own identifying
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
    18 #
    18 #
    19 # CDDL HEADER END
    19 # CDDL HEADER END
    20 #
    20 #
    21 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
    21 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
    22 
    22 
    23 #
    23 #
    24 include ../../../make-rules/shared-macros.mk
    24 include ../../../make-rules/shared-macros.mk
    25 
    25 
    26 PATH=/usr/bin:/usr/gnu/bin:/usr/sbin
    26 PATH=/usr/bin:/usr/gnu/bin:/usr/sbin
    91 LDFLAGS += $(LDFLAGS.$(BITS))
    91 LDFLAGS += $(LDFLAGS.$(BITS))
    92 
    92 
    93 # Python puts its header files in a special place.
    93 # Python puts its header files in a special place.
    94 LINT_FLAGS +=	-I$(SOURCE_DIR)/Include
    94 LINT_FLAGS +=	-I$(SOURCE_DIR)/Include
    95 
    95 
       
    96 # PYTHONPATH in the environment can be harmful, but setting it to empty via
       
    97 # _INSTALL_ENV causes problems too, so just ignore the entire environment.
       
    98 # Because of this, we need to specify PATH in multiple places below.
       
    99 ENV +=				-i
       
   100 
       
   101 CONFIGURE_ENV +=		PATH="$(PATH)"
       
   102 
    96 CONFIGURE_OPTIONS  +=		--infodir=$(CONFIGURE_INFODIR)
   103 CONFIGURE_OPTIONS  +=		--infodir=$(CONFIGURE_INFODIR)
    97 CONFIGURE_OPTIONS  +=		--enable-shared
   104 CONFIGURE_OPTIONS  +=		--enable-shared
    98 CONFIGURE_OPTIONS  +=		--with-system-expat
   105 CONFIGURE_OPTIONS  +=		--with-system-expat
    99 CONFIGURE_OPTIONS  +=		--with-system-ffi
   106 CONFIGURE_OPTIONS  +=		--with-system-ffi
   100 CONFIGURE_OPTIONS  +=		--without-gcc
   107 CONFIGURE_OPTIONS  +=		--without-gcc
   103 CONFIGURE_OPTIONS  +=		LDFLAGS="$(LDFLAGS)"
   110 CONFIGURE_OPTIONS  +=		LDFLAGS="$(LDFLAGS)"
   104 CONFIGURE_OPTIONS  +=		CFLAGS="$(CFLAGS)"
   111 CONFIGURE_OPTIONS  +=		CFLAGS="$(CFLAGS)"
   105 CONFIGURE_OPTIONS  +=		DFLAGS="-$(BITS)"
   112 CONFIGURE_OPTIONS  +=		DFLAGS="-$(BITS)"
   106 CONFIGURE_OPTIONS  +=		XPROFILE_DIR="$(XPROFILE_DIR)"
   113 CONFIGURE_OPTIONS  +=		XPROFILE_DIR="$(XPROFILE_DIR)"
   107 
   114 
       
   115 COMPONENT_BUILD_ENV  +=		PATH="$(PATH)"
   108 COMPONENT_BUILD_ENV  +=		DFLAGS="-$(BITS)"
   116 COMPONENT_BUILD_ENV  +=		DFLAGS="-$(BITS)"
   109 COMPONENT_BUILD_ENV  +=		XPROFILE_DIR="$(XPROFILE_DIR)"
   117 COMPONENT_BUILD_ENV  +=		XPROFILE_DIR="$(XPROFILE_DIR)"
   110 
   118 
   111 # 64 bit shared objects need to go in a 64-bit directory
   119 # 64 bit shared objects need to go in a 64-bit directory
   112 COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.7/lib-dynload
   120 COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.7/lib-dynload
   124 # environment, and use -e to tell gmake to pay attention to the environment.
   132 # environment, and use -e to tell gmake to pay attention to the environment.
   125 COMPONENT_INSTALL_ENV +=	CC="$(CC)"
   133 COMPONENT_INSTALL_ENV +=	CC="$(CC)"
   126 COMPONENT_INSTALL_ENV +=	CXX="$(CXX)"
   134 COMPONENT_INSTALL_ENV +=	CXX="$(CXX)"
   127 COMPONENT_INSTALL_ENV +=	CFLAGS="$(CFLAGS)"
   135 COMPONENT_INSTALL_ENV +=	CFLAGS="$(CFLAGS)"
   128 COMPONENT_INSTALL_ENV +=	LDFLAGS="$(LDFLAGS)"
   136 COMPONENT_INSTALL_ENV +=	LDFLAGS="$(LDFLAGS)"
       
   137 COMPONENT_INSTALL_ENV +=	PATH="$(PATH)"
   129 COMPONENT_INSTALL_ARGS +=	-e
   138 COMPONENT_INSTALL_ARGS +=	-e
   130 
   139 
   131 # 1. Setup pyconfig.h file to support 32 & 64 bit.
   140 # 1. Setup pyconfig.h file to support 32 & 64 bit.
   132 # 2. If the /usr/lib/python2.7/lib2to3/*.pickle files are older than the
   141 # 2. If the /usr/lib/python2.7/lib2to3/*.pickle files are older than the
   133 #    related *.txt files in the same directory, it will rebuild them any time
   142 #    related *.txt files in the same directory, it will rebuild them any time
   165 # Note that when a test succeeds, the builds/*/.tested file gets created.  You
   174 # Note that when a test succeeds, the builds/*/.tested file gets created.  You
   166 # may need to remove these files, or run "gmake clobber" or "gmake clean"
   175 # may need to remove these files, or run "gmake clobber" or "gmake clean"
   167 # between tests.
   176 # between tests.
   168 #
   177 #
   169 COMPONENT_TEST_ENV = EXTRATESTOPTS="-v -uall,-network $(TESTOPTS_PYTHON_TEST)"
   178 COMPONENT_TEST_ENV = EXTRATESTOPTS="-v -uall,-network $(TESTOPTS_PYTHON_TEST)"
       
   179 COMPONENT_TEST_ENV += PATH="$(PATH)"
   170 COMPONENT_TEST_TARGETS = test
   180 COMPONENT_TEST_TARGETS = test
   171 
   181 
   172 test:				$(TEST_32_and_64)
   182 test:				$(TEST_32_and_64)
   173 
   183 
   174 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
   184 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)