37 |
37 |
38 include $(WS_TOP)/make-rules/prep.mk |
38 include $(WS_TOP)/make-rules/prep.mk |
39 include $(WS_TOP)/make-rules/configure.mk |
39 include $(WS_TOP)/make-rules/configure.mk |
40 include $(WS_TOP)/make-rules/ips.mk |
40 include $(WS_TOP)/make-rules/ips.mk |
41 include $(WS_TOP)/make-rules/lint-libraries.mk |
41 include $(WS_TOP)/make-rules/lint-libraries.mk |
|
42 |
|
43 # Need to preserve timestamp for Grammar files. If the pickle files are older, |
|
44 # Python will try to rebuild them. |
|
45 PKGSEND_PUBLISH_OPTIONS += -T \*Grammar\*.txt |
|
46 PKGSEND_PUBLISH_OPTIONS += -T \*Grammar\*.pickle |
42 |
47 |
43 # We patch auto* files, so regenerate headers and configure |
48 # We patch auto* files, so regenerate headers and configure |
44 COMPONENT_PREP_ACTION = \ |
49 COMPONENT_PREP_ACTION = \ |
45 (cd $(@D) ; autoheader ; autoconf) |
50 (cd $(@D) ; autoheader ; autoconf) |
46 |
51 |
89 CONFIGURE_OPTIONS += --enable-shared |
94 CONFIGURE_OPTIONS += --enable-shared |
90 CONFIGURE_OPTIONS += --with-system-expat |
95 CONFIGURE_OPTIONS += --with-system-expat |
91 CONFIGURE_OPTIONS += --with-system-ffi |
96 CONFIGURE_OPTIONS += --with-system-ffi |
92 CONFIGURE_OPTIONS += --without-gcc |
97 CONFIGURE_OPTIONS += --without-gcc |
93 CONFIGURE_OPTIONS += --enable-ipv6 |
98 CONFIGURE_OPTIONS += --enable-ipv6 |
94 CONFIGURE_OPTIONS += ac_cv_opt_olimit_ok=no |
|
95 CONFIGURE_OPTIONS += ac_cv_olimit_ok=no |
|
96 CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)" |
99 CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)" |
97 CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)" |
100 CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)" |
98 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" |
101 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" |
99 CONFIGURE_OPTIONS += DFLAGS="-$(BITS)" |
102 CONFIGURE_OPTIONS += DFLAGS="-$(BITS)" |
100 CONFIGURE_OPTIONS += XPROFILE_DIR="$(XPROFILE_DIR)" |
103 CONFIGURE_OPTIONS += XPROFILE_DIR="$(XPROFILE_DIR)" |
101 |
104 |
102 COMPONENT_BUILD_ENV += DFLAGS="-$(BITS)" |
105 COMPONENT_BUILD_ENV += DFLAGS="-$(BITS)" |
103 COMPONENT_BUILD_ENV += XPROFILE_DIR="$(XPROFILE_DIR)" |
106 COMPONENT_BUILD_ENV += XPROFILE_DIR="$(XPROFILE_DIR)" |
104 |
107 |
105 # patches/00-bits.patch removes some AC_CHECK_SIZEOF tests in order to |
|
106 # generate a pyconfig.h that is both 32 and 64 bit compatible. We add this |
|
107 # back to the environment so that configure can still work. configure.in and |
|
108 # pyconfig.h.in should probably be rewhacked to do this more cleanly in the |
|
109 # future. |
|
110 CONFIGURE_OPTIONS.32 += ac_cv_sizeof_long=4 |
|
111 CONFIGURE_OPTIONS.64 += ac_cv_sizeof_long=8 |
|
112 |
|
113 # 64 bit shared objects need to go in a 64-bit directory |
108 # 64 bit shared objects need to go in a 64-bit directory |
114 COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.7/lib-dynload |
109 COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.7/lib-dynload |
115 |
110 |
|
111 # Setup pyconfig.h file to support 32 & 64 bit. |
|
112 # If the /usr/lib/python2.7/lib2to3/*.pickle files are older than the related |
|
113 # *.txt files in the same directory, it will rebuild them anytime you try to |
|
114 # build a Python module. So here we also touch the pickle files to avoid this. |
|
115 # |
|
116 COMPONENT_POST_INSTALL_ACTION= \ |
|
117 (cd $(PROTOUSRDIR) ; \ |
|
118 $(MV) include/python2.7/pyconfig.h include/python2.7/pyconfig-$(BITS).h ; \ |
|
119 $(TOUCH) lib/python2.7/lib2to3/*.pickle) |
|
120 |
116 # common targets |
121 # common targets |
|
122 $(INSTALL_32): $(INSTALL_64) |
117 build: $(BUILD_32_and_64) |
123 build: $(BUILD_32_and_64) |
118 |
|
119 $(INSTALL_32): $(INSTALL_64) |
|
120 |
|
121 install: $(INSTALL_32_and_64) |
124 install: $(INSTALL_32_and_64) |
122 |
125 |
|
126 # Using "-uall,-network" ensures all tests are run except the network tests. |
|
127 # The network tests contain many expected failures when run behind a firewall. |
|
128 # The "-v" ensures verbose mode. You can set TESTOPTS_PYTHON_TEST to a |
|
129 # particular test if you want to run just one test. For example, run gmake with |
|
130 # "-k" so it continues and does both 32-bit and 64-bit tests, even if there is a |
|
131 # failure, like this: |
|
132 # $ TESTOPTS_PYTHON_TEST=test_sys gmake -k test |
|
133 # Note that when a test succeeds, the builds/*/.tested file gets created. You |
|
134 # may need to remove these files, or run "gmake clobber" or "gmake clean" |
|
135 # between tests. |
|
136 # |
|
137 COMPONENT_TEST_ENV = EXTRATESTOPTS="-v -uall,-network $(TESTOPTS_PYTHON_TEST)" |
123 COMPONENT_TEST_TARGETS = test |
138 COMPONENT_TEST_TARGETS = test |
124 |
139 |
125 test: $(TEST_32_and_64) |
140 test: $(TEST_32_and_64) |
126 |
141 |
127 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) |
142 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) |
128 |
143 |
129 include $(WS_TOP)/make-rules/depend.mk |
144 include $(WS_TOP)/make-rules/depend.mk |