summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backport/Makefile7
-rw-r--r--backport/Makefile.build6
-rw-r--r--backport/Makefile.real4
-rwxr-xr-xgentree.py4
4 files changed, 18 insertions, 3 deletions
diff --git a/backport/Makefile b/backport/Makefile
index 5cb70169..287b27de 100644
--- a/backport/Makefile
+++ b/backport/Makefile
@@ -29,6 +29,13 @@ export KLIB KLIB_BUILD BACKPORT_PWD KMODDIR KMODPATH_ARG
default:
@$(MAKE) modules
+.PHONY: mrproper
+mrproper:
+ @test -f .config && $(MAKE) clean || true
+ @rm -f .config
+ @rm -f .kernel_config_md5 Kconfig.versions Kconfig.kernel
+ @rm -f backport-include/backport/autoconf.h
+
.DEFAULT:
@set -e ; test -f $(KERNEL_CONFIG) || ( \
echo "/--------------" ;\
diff --git a/backport/Makefile.build b/backport/Makefile.build
index 3ac4350e..d2090415 100644
--- a/backport/Makefile.build
+++ b/backport/Makefile.build
@@ -1,6 +1,10 @@
-include .config
+-include .config
export
.PHONY: modules
modules:
@$(MAKE) -C $(KLIB_BUILD) M=$(BACKPORT_PWD) modules
+
+.PHONY: clean
+clean:
+ @$(MAKE) -C $(KLIB_BUILD) M=$(BACKPORT_PWD) clean
diff --git a/backport/Makefile.real b/backport/Makefile.real
index 243f904f..e033d73b 100644
--- a/backport/Makefile.real
+++ b/backport/Makefile.real
@@ -97,3 +97,7 @@ install: modules
@echo Your backported driver modules should be installed now.
@echo Reboot.
@echo
+
+.PHONY: clean
+clean:
+ @$(MAKE) -f Makefile.build clean
diff --git a/gentree.py b/gentree.py
index 5ae88706..afe3645f 100755
--- a/gentree.py
+++ b/gentree.py
@@ -520,12 +520,12 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None,
# groups -- 50 seemed safer and is still fast)
regexes = []
for some_symbols in [disable_makefile[i:i + 50] for i in range(0, len(disable_makefile), 50)]:
- r = '((CPTCFG|CONFIG)_(' + '|'.join([s for s in some_symbols]) + '))'
+ r = '^([^#].*((CPTCFG|CONFIG)_(' + '|'.join([s for s in some_symbols]) + ')))'
regexes.append(re.compile(r, re.MULTILINE))
for f in maketree.get_makefiles():
data = open(f, 'r').read()
for r in regexes:
- data = r.sub(r'IMPOSSIBLE_\3', data)
+ data = r.sub(r'#\1', data)
fo = open(f, 'w')
fo.write(data)
fo.close()