mirror of
https://github.com/dgibson/dtc.git
synced 2026-04-12 00:47:46 -04:00
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>
This commit is contained in:
parent
a4629cfaed
commit
99284c4db9
2 changed files with 8 additions and 5 deletions
4
Makefile
4
Makefile
|
|
@ -271,10 +271,6 @@ include $(PYLIBFDT_srcdir)/Makefile.pylibfdt
|
||||||
.PHONY: pylibfdt
|
.PHONY: pylibfdt
|
||||||
pylibfdt: $(PYLIBFDT_objdir)/_libfdt.so
|
pylibfdt: $(PYLIBFDT_objdir)/_libfdt.so
|
||||||
|
|
||||||
pylibfdt_clean:
|
|
||||||
@$(VECHO) CLEAN "(pylibfdt)"
|
|
||||||
rm -f $(addprefix $(PYLIBFDT_objdir)/,$(PYLIBFDT_cleanfiles))
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Release signing and uploading
|
# Release signing and uploading
|
||||||
# This is for maintainer convenience, don't try this at home.
|
# This is for maintainer convenience, don't try this at home.
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,10 @@
|
||||||
|
|
||||||
PYLIBFDT_srcs = $(PYLIBFDT_srcdir)/libfdt.i
|
PYLIBFDT_srcs = $(PYLIBFDT_srcdir)/libfdt.i
|
||||||
PYMODULE = $(PYLIBFDT_objdir)/_libfdt.so
|
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
|
SETUP = $(PYLIBFDT_srcdir)/setup.py
|
||||||
SETUPFLAGS =
|
SETUPFLAGS =
|
||||||
|
|
@ -19,4 +23,7 @@ install_pylibfdt: $(PYMODULE)
|
||||||
@$(VECHO) INSTALL-PYLIB
|
@$(VECHO) INSTALL-PYLIB
|
||||||
$(PYTHON) $(SETUP) $(SETUPFLAGS) install $(if $(SETUP_PREFIX),--prefix=$(SETUP_PREFIX))
|
$(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…
Add table
Add a link
Reference in a new issue