Browse Source

Refine pylibfdt_clean target

Move it to the subdir Makefile, generalize some of the patterns, remove
the 'build' directory made by setup.py and __pycache__ directory made by
Python3.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
main
David Gibson 6 years ago
parent
commit
99284c4db9
  1. 4
      Makefile
  2. 9
      pylibfdt/Makefile.pylibfdt

4
Makefile

@ -271,10 +271,6 @@ include $(PYLIBFDT_srcdir)/Makefile.pylibfdt @@ -271,10 +271,6 @@ include $(PYLIBFDT_srcdir)/Makefile.pylibfdt
.PHONY: pylibfdt
pylibfdt: $(PYLIBFDT_objdir)/_libfdt.so

pylibfdt_clean:
@$(VECHO) CLEAN "(pylibfdt)"
rm -f $(addprefix $(PYLIBFDT_objdir)/,$(PYLIBFDT_cleanfiles))

#
# Release signing and uploading
# This is for maintainer convenience, don't try this at home.

9
pylibfdt/Makefile.pylibfdt

@ -3,6 +3,10 @@ @@ -3,6 +3,10 @@

PYLIBFDT_srcs = $(PYLIBFDT_srcdir)/libfdt.i
PYMODULE = $(PYLIBFDT_objdir)/_libfdt.so
PYLIBFDT_CLEANFILES_L = libfdt_wrap.c libfdt.py *.pyc *.so
PYLIBFDT_CLEANFILES = $(PYLIBFDT_CLEANFILES_L:%=$(PYLIBFDT_objdir)/%)
PYLIBFDT_CLEANDIRS_L = build __pycache__
PYLIBFDT_CLEANDIRS = $(PYLIBFDT_CLEANDIRS_L:%=$(PYLIBFDT_objdir)/%)

SETUP = $(PYLIBFDT_srcdir)/setup.py
SETUPFLAGS =
@ -19,4 +23,7 @@ install_pylibfdt: $(PYMODULE) @@ -19,4 +23,7 @@ install_pylibfdt: $(PYMODULE)
@$(VECHO) INSTALL-PYLIB
$(PYTHON) $(SETUP) $(SETUPFLAGS) install $(if $(SETUP_PREFIX),--prefix=$(SETUP_PREFIX))

PYLIBFDT_cleanfiles = libfdt_wrap.c libfdt.py libfdt.pyc _libfdt.so
pylibfdt_clean:
@$(VECHO) CLEAN "(pylibfdt)"
rm -f $(PYLIBFDT_CLEANFILES)
rm -rf $(PYLIBFDT_CLEANDIRS)

Loading…
Cancel
Save