components/python/python26/Makefile
changeset 1246 164605dfef4e
parent 1058 34d7aaa03423
child 1303 79b691ffbda3
equal deleted inserted replaced
1245:b95e96615c0c 1246:164605dfef4e
    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, 2012, Oracle and/or its affiliates. All rights reserved.
    21 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
    22 #
    22 #
    23 include ../../../make-rules/shared-macros.mk
    23 include ../../../make-rules/shared-macros.mk
    24 
    24 
    25 PATH=/usr/bin:/usr/gnu/bin:/usr/sbin
    25 PATH=/usr/bin:/usr/gnu/bin:/usr/sbin
    26 
    26 
    36 
    36 
    37 include $(WS_TOP)/make-rules/prep.mk
    37 include $(WS_TOP)/make-rules/prep.mk
    38 include $(WS_TOP)/make-rules/configure.mk
    38 include $(WS_TOP)/make-rules/configure.mk
    39 include $(WS_TOP)/make-rules/ips.mk
    39 include $(WS_TOP)/make-rules/ips.mk
    40 include $(WS_TOP)/make-rules/lint-libraries.mk
    40 include $(WS_TOP)/make-rules/lint-libraries.mk
       
    41 
       
    42 # Need to preserve timestamp for Grammar files.  If the pickle files are older, 
       
    43 # Python will try to rebuild them.  
       
    44 PKGSEND_PUBLISH_OPTIONS += -T \*Grammar\*.txt
       
    45 PKGSEND_PUBLISH_OPTIONS += -T \*Grammar\*.pickle
    41 
    46 
    42 # We patch auto* files, so regenerate headers and configure
    47 # We patch auto* files, so regenerate headers and configure
    43 COMPONENT_PREP_ACTION = \
    48 COMPONENT_PREP_ACTION = \
    44 	(cd $(@D) ; autoheader ; autoconf)
    49 	(cd $(@D) ; autoheader ; autoconf)
    45 
    50 
    83 
    88 
    84 CONFIGURE_OPTIONS  +=		--infodir=$(CONFIGURE_INFODIR)
    89 CONFIGURE_OPTIONS  +=		--infodir=$(CONFIGURE_INFODIR)
    85 CONFIGURE_OPTIONS  +=		--enable-shared
    90 CONFIGURE_OPTIONS  +=		--enable-shared
    86 CONFIGURE_OPTIONS  +=		--with-system-ffi
    91 CONFIGURE_OPTIONS  +=		--with-system-ffi
    87 CONFIGURE_OPTIONS  +=		--without-gcc
    92 CONFIGURE_OPTIONS  +=		--without-gcc
    88 CONFIGURE_OPTIONS  +=		ac_cv_opt_olimit_ok=no
       
    89 CONFIGURE_OPTIONS  +=		ac_cv_olimit_ok=no
       
    90 CONFIGURE_OPTIONS  +=		CPPFLAGS="$(CPPFLAGS)"
    93 CONFIGURE_OPTIONS  +=		CPPFLAGS="$(CPPFLAGS)"
    91 CONFIGURE_OPTIONS  +=		CFLAGS="$(CFLAGS)"
    94 CONFIGURE_OPTIONS  +=		CFLAGS="$(CFLAGS)"
    92 CONFIGURE_OPTIONS  +=		CCSHARED="$(CC_PIC)"
    95 CONFIGURE_OPTIONS  +=		CCSHARED="$(CC_PIC)"
    93 CONFIGURE_OPTIONS  +=		CXX="$(CXX)"
    96 CONFIGURE_OPTIONS  +=		CXX="$(CXX)"
    94 CONFIGURE_OPTIONS  +=		CXXFLAGS="$(CXXFLAGS)"
    97 CONFIGURE_OPTIONS  +=		CXXFLAGS="$(CXXFLAGS)"
    95 CONFIGURE_OPTIONS  +=		DFLAGS="-$(BITS)"
    98 CONFIGURE_OPTIONS  +=		DFLAGS="-$(BITS)"
    96 CONFIGURE_OPTIONS  +=		XPROFILE_DIR="$(XPROFILE_DIR)"
    99 CONFIGURE_OPTIONS  +=		XPROFILE_DIR="$(XPROFILE_DIR)"
    97 COMPONENT_BUILD_ENV  +=		DFLAGS="-$(BITS)"
   100 COMPONENT_BUILD_ENV  +=		DFLAGS="-$(BITS)"
    98 COMPONENT_BUILD_ENV  +=		XPROFILE_DIR="$(XPROFILE_DIR)"
   101 COMPONENT_BUILD_ENV  +=		XPROFILE_DIR="$(XPROFILE_DIR)"
    99 
   102 
   100 COMPONENT_TEST_TARGETS =	test
       
   101 
       
   102 # 64 bit shared objects need to go in a 64-bit directory
   103 # 64 bit shared objects need to go in a 64-bit directory
   103 COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.6/lib-dynload
   104 COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.6/lib-dynload
   104 
   105 
       
   106 # Setup pyconfig.h file to support 32 & 64 bit.
       
   107 # If the /usr/lib/python2.6/lib2to3/*.pickle files are older than the related
       
   108 # *.txt files in the same directory, it will rebuild them anytime you try to
       
   109 # build a Python module.  So here we also touch the pickle files to avoid this.
       
   110 #
       
   111 COMPONENT_POST_INSTALL_ACTION= \
       
   112             (cd $(PROTOUSRDIR) ;  \
       
   113              $(MV) include/python2.6/pyconfig.h include/python2.6/pyconfig-$(BITS).h ; \
       
   114              $(TOUCH) lib/python2.6/lib2to3/*.pickle)
       
   115                 
   105 # common targets
   116 # common targets
       
   117 $(INSTALL_32):  $(INSTALL_64)
   106 build:		$(BUILD_32_and_64)
   118 build:		$(BUILD_32_and_64)
   107 
       
   108 $(INSTALL_32):	$(INSTALL_64)
       
   109 
       
   110 install:	$(INSTALL_32_and_64)
   119 install:	$(INSTALL_32_and_64)
   111 
   120 
   112 test:		$(TEST_32_and_64)
   121 # Using "-uall,-network" ensures all tests are run except the network tests.
       
   122 # The network tests contain many expected failures when run behind a firewall.
       
   123 # The "-v" ensures verbose mode.  You can set TESTOPTS_PYTHON_TEST to a
       
   124 # particular test if you want to run just one test.  For example, run gmake with
       
   125 # "-k" so it continues and does both 32-bit and 64-bit tests, even if there is a
       
   126 # failure, like this:
       
   127 # $ TESTOPTS_PYTHON_TEST=test_sys gmake -k test
       
   128 # Note that when a test succeeds, the builds/*/.tested file gets created.  You
       
   129 # may need to remove these files, or run "gmake clobber" or "gmake clean"
       
   130 # between tests.
       
   131 #
       
   132 COMPONENT_TEST_ENV = EXTRATESTOPTS="-v -uall,-network $(TESTOPTS_PYTHON_TEST)"
       
   133 COMPONENT_TEST_TARGETS = test
       
   134 
       
   135 test:				$(TEST_32_and_64)
   113 
   136 
   114 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
   137 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
   115 
   138 
   116 include $(WS_TOP)/make-rules/depend.mk
   139 include $(WS_TOP)/make-rules/depend.mk