diff options
Diffstat (limited to 'Examples/python/import_packages/Makefile')
-rw-r--r-- | Examples/python/import_packages/Makefile | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/Examples/python/import_packages/Makefile b/Examples/python/import_packages/Makefile index fda2380b3..dfd46d05c 100644 --- a/Examples/python/import_packages/Makefile +++ b/Examples/python/import_packages/Makefile @@ -5,17 +5,23 @@ LIBS = PY3 = import_packages_subdirs = \ - same_modnames1 \ + same_modnames1 \ same_modnames2 \ from_init1 \ from_init2 \ from_init3 \ relativeimport1 \ - relativeimport1 + relativeimport2 \ + relativeimport3 check: build + if test "x$(SRCDIR)" != x; then \ + for file in `cd $(SRCDIR) && find . -type f -name __init__.py`; do \ + cp "${SRCDIR}$$file" "$$file" || exit 1; \ + done; \ + fi; \ for s in $(import_packages_subdirs); do \ - (cd $$s && $(MAKE) check); \ + (cd $$s && $(MAKE) check); \ done build: @@ -29,7 +35,12 @@ static: done clean: - $(MAKE) -f $(TOP)/Makefile python_clean + $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean + if test "x$(SRCDIR)" != x; then \ + for file in `cd $(SRCDIR) && find . -type f -name __init__.py`; do \ + rm -f "$$file" || exit 1; \ + done; \ + fi; \ for s in $(import_packages_subdirs); do \ (cd $$s && $(MAKE) clean); \ done |