diff options
author | 2016-01-23 12:33:38 -0800 | |
---|---|---|
committer | 2016-01-23 13:05:34 -0800 | |
commit | 164fcba61cc8cc4458e74f21bcfd97ef2f3aa815 (patch) | |
tree | 5695c0994b5d62ed64384760d43d00249628496b /Makefile | |
parent | kernel-generic-config: fix bad patch of CONFIG_MEDIA_USB_SUPPORT. (diff) | |
download | genkernel-164fcba61cc8cc4458e74f21bcfd97ef2f3aa815.tar.gz genkernel-164fcba61cc8cc4458e74f21bcfd97ef2f3aa815.tar.bz2 genkernel-164fcba61cc8cc4458e74f21bcfd97ef2f3aa815.zip |
Makefile: Fix kernel config building, ensure targets are always updated properly as well.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 34 |
1 files changed, 24 insertions, 10 deletions
@@ -1,18 +1,24 @@ PACKAGE_VERSION = `/bin/fgrep GK_V= genkernel | sed "s/.*GK_V='\([^']\+\)'/\1/"` distdir = genkernel-$(PACKAGE_VERSION) -KCONF = $(shell ls arch/*/arch-config | sed 's/arch-/generated-/g') - +MANPAGE = genkernel.8 # Add off-Git/generated files here that need to be shipped with releases -EXTRA_DIST = genkernel.8 ChangeLog $(KCONF) +EXTRA_DIST = $(MANPAGE) ChangeLog $(KCONF) -default: $(KCONF) genkernel.8 +default: kconfig man -$(KCONF): - perl merge.pl defaults/kernel-generic-config $(dir $@)arch-config > $@ +# First argument in the override file +# Second argument is the base file +BASE_KCONF = defaults/kernel-generic-config +ARCH_KCONF = $(wildcard arch/*/arch-config) +GENERATED_KCONF = $(subst arch-,generated-,$(ARCH_KCONF)) +KCONF = $(GENERATED_KCONF) -genkernel.8: doc/genkernel.8.txt doc/asciidoc.conf Makefile genkernel - a2x --conf-file=doc/asciidoc.conf --attribute="genkernelversion=$(PACKAGE_VERSION)" \ - --format=manpage -D . "$<" +debug: + @echo "ARCH_KCONF=$(ARCH_KCONF)" + @echo "GENERATED_KCONF=$(GENERATED_KCONF)" + +kconfig: $(GENERATED_KCONF) +man: $(MANPAGE) ChangeLog: git log >$@ @@ -35,4 +41,12 @@ dist: check-git-repository distclean $(EXTRA_DIST) distclean: clean rm -Rf "$(distdir)" "$(distdir)".tar "$(distdir)".tar.xz -.PHONY: clean check-git-repository dist distclean +.PHONY: clean check-git-repository dist distclean kconfig + +# Generic rules +%/generated-config: %/arch-config $(BASE_KCONF) merge.pl Makefile + perl merge.pl $^ $(BASE_KCONF) > $@ + +%.8: doc/%.8.txt doc/asciidoc.conf Makefile genkernel + a2x --conf-file=doc/asciidoc.conf --attribute="genkernelversion=$(PACKAGE_VERSION)" \ + --format=manpage -D . "$<" |