diff options
author | Joshua Haberman <joshua@reverberate.org> | 2011-08-09 23:41:09 -0700 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2011-08-09 23:41:09 -0700 |
commit | a1bb3dc448bc313427fedb4c435763acb90853fc (patch) | |
tree | ddb2e0d22f83c222724910a0b654ee1154660096 /Makefile | |
parent | ce425df78ce5da50005635cb270ba0e5e74ef814 (diff) |
Makefile target for running Python tests.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -136,7 +136,7 @@ OBJ=$(patsubst %.c,%.o,$(SRC)) PICOBJ=$(patsubst %.c,%.lo,$(SRC)) ifneq (, $(findstring DUPB_USE_JIT_X64, $(USER_CFLAGS))) -upb/pb/decoder.o: upb/pb/decoder_x86.h +upb/pb/decoder.o upb/pb/decoder.lo: upb/pb/decoder_x86.h ifeq (, $(findstring DNDEBUG, $(USER_CFLAGS))) $(error "JIT only works with -DNDEBUG enabled!") endif @@ -197,10 +197,6 @@ descriptorgen: upb/descriptor.pb tools/upbc tools/upbc: tools/upbc.c $(LIBUPB) -# Language extensions. -python: $(LIBUPB_PIC) - cd lang_ext/python && python setup.py build - # Tests. ####################################################################### tests/test.proto.pb: tests/test.proto @@ -397,3 +393,15 @@ lua: $(LUAEXT) lang_ext/lua/upb.so: lang_ext/lua/upb.c $(LIBUPB_PIC) $(E) CC lang_ext/lua/upb.c $(Q) $(CC) $(CFLAGS) $(CPPFLAGS) $(LUA_CPPFLAGS) -fpic -shared -o $@ $< upb/libupb_pic.a $(LUA_LDFLAGS) + + +# Python extension ############################################################# + +PYTHONEXT=lang_ext/python/build/install/lib/python/upb/__init__.so +python: $(PYTHONEXT) +$(PYTHONEXT): $(LIBUPB_PIC) lang_ext/python/upb.c + $(E) PYTHON lang_ext/python/upb.c + $(Q) cd lang_ext/python && python setup.py build install --home=build/install + +pythontest: $(PYTHONEXT) + cd lang_ext/python && cp test.py build/install/lib/python && python ./build/install/lib/python/test.py |