Index: buildsys.mk.in ================================================================== --- buildsys.mk.in +++ buildsys.mk.in @@ -27,17 +27,19 @@ DC = @DC@ ERLC = @ERLC@ OBJC = @OBJC@ AR = @AR@ LD = ${CC} +PYTHON = @PYTHON@ CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ CPPFLAGS = @CPPFLAGS@ DFLAGS = @DFLAGS@ ERLCFLAGS = @ERLCFLAGS@ OBJCFLAGS = @OBJCFLAGS@ LDFLAGS = @LDFLAGS@ +PYTHON_FLAGS = @PYTHON_FLAGS@ LIBS = @LIBS@ PROG_IMPLIB_NEEDED = @PROG_IMPLIB_NEEDED@ PROG_IMPLIB_LDFLAGS = @PROG_IMPLIB_LDFLAGS@ PROG_SUFFIX = @EXEEXT@ LIB_CPPFLAGS = @LIB_CPPFLAGS@ @@ -72,14 +74,15 @@ OBJS2 = ${OBJS1:.cc=.o} OBJS3 = ${OBJS2:.cxx=.o} OBJS4 = ${OBJS3:.d=.o} OBJS5 = ${OBJS4:.erl=.beam} OBJS6 = ${OBJS5:.m=.o} -OBJS += ${OBJS6:.xpm=.o} +OBJS7 = ${OBJS6:.py=.pyc} +OBJS += ${OBJS7:.xpm=.o} .SILENT: -.SUFFIXES: .beam .c .cc .cxx .d .dep .erl .m .xpm +.SUFFIXES: .beam .c .cc .cxx .d .dep .erl .m .py .pyc .xpm .PHONY: all subdirs pre-depend depend install install-extra uninstall uninstall-extra clean distclean all: for i in subdirs depend ${STATIC_LIB} ${STATIC_LIB_NOINST} ${LIB} ${LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST}; do \ ${MAKE} ${MFLAGS} $$i || exit 1; \ @@ -199,10 +202,18 @@ .m.o: ${COMPILE_STATUS} if ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c -o $@ $<; then \ ${COMPILE_OK}; \ + else \ + ${COMPILE_FAILED}; \ + fi + +.py.pyc: + ${COMPILE_STATUS} + if ${PYTHON} ${PYTHON_FLAGS} -c "import py_compile; py_compile.compile('$<')"; then \ + ${COMPILE_OK}; \ else \ ${COMPILE_FAILED}; \ fi .xpm.o: