swig/Examples/python/import_packages/relativeimport3/Makefile
Johan Hake 1dd297ad9d Fix issue with relative import when using single header file import.
-- The commit propagates the package option to the newly create
     module node so it is recognized by SWIG
  -- Added a relativeimport test for this combination
     (in lack of py3 I was not able to test it with py3 but it
      "should just work")
2014-08-12 21:48:26 +02:00

25 lines
580 B
Makefile

TOP = ../../..
SWIG = $(realpath $(TOP)/../preinst-swig)
SWIGOPT =
LIBS =
PY3 =
ifeq (,$(PY3))
PKG1DIR = "py2"
else
PKG1DIR = "py3"
endif
check: build
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
cd $(PKG1DIR) && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -relativeimport' LIBS='$(LIBS)' build
static:
cd $(PKG1DIR) && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -relativeimport' LIBS='$(LIBS)' static
clean:
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd py2 && $(MAKE) clean
cd py3 && $(MAKE) clean