License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 22:07:57 +08:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
2005-04-17 06:20:36 +08:00
|
|
|
# ===========================================================================
|
|
|
|
# Kernel configuration targets
|
|
|
|
# These targets are used from top-level makefile
|
|
|
|
|
2018-08-15 08:36:49 +08:00
|
|
|
PHONY += xconfig gconfig menuconfig config localmodconfig localyesconfig \
|
|
|
|
build_menuconfig build_nconfig build_gconfig build_xconfig
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2008-08-25 16:51:27 +08:00
|
|
|
ifdef KBUILD_KCONFIG
|
|
|
|
Kconfig := $(KBUILD_KCONFIG)
|
|
|
|
else
|
2010-09-05 05:10:20 +08:00
|
|
|
Kconfig := Kconfig
|
2008-08-25 16:51:27 +08:00
|
|
|
endif
|
2007-10-26 02:42:18 +08:00
|
|
|
|
2019-05-27 22:37:24 +08:00
|
|
|
ifndef KBUILD_DEFCONFIG
|
|
|
|
KBUILD_DEFCONFIG := defconfig
|
|
|
|
endif
|
|
|
|
|
2015-04-08 19:30:42 +08:00
|
|
|
ifeq ($(quiet),silent_)
|
|
|
|
silent := -s
|
|
|
|
endif
|
|
|
|
|
2012-11-22 08:06:04 +08:00
|
|
|
# We need this, in case the user has it in its environment
|
|
|
|
unexport CONFIG_
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
xconfig: $(obj)/qconf
|
2015-04-08 19:30:42 +08:00
|
|
|
$< $(silent) $(Kconfig)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
gconfig: $(obj)/gconf
|
2015-04-08 19:30:42 +08:00
|
|
|
$< $(silent) $(Kconfig)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
menuconfig: $(obj)/mconf
|
2015-04-08 19:30:42 +08:00
|
|
|
$< $(silent) $(Kconfig)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
config: $(obj)/conf
|
2015-04-08 19:30:42 +08:00
|
|
|
$< $(silent) --oldaskconfig $(Kconfig)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2009-11-25 18:28:43 +08:00
|
|
|
nconfig: $(obj)/nconf
|
2015-04-08 19:30:42 +08:00
|
|
|
$< $(silent) $(Kconfig)
|
2009-11-25 18:28:43 +08:00
|
|
|
|
2018-08-15 08:36:49 +08:00
|
|
|
build_menuconfig: $(obj)/mconf
|
|
|
|
|
|
|
|
build_nconfig: $(obj)/nconf
|
|
|
|
|
|
|
|
build_gconfig: $(obj)/gconf
|
|
|
|
|
|
|
|
build_xconfig: $(obj)/qconf
|
|
|
|
|
2018-03-01 19:18:01 +08:00
|
|
|
localyesconfig localmodconfig: $(obj)/conf
|
2019-12-17 12:18:19 +08:00
|
|
|
$(Q)$(PERL) $(srctree)/$(src)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config
|
2019-12-17 12:18:18 +08:00
|
|
|
$(Q)if [ -f .config ]; then \
|
|
|
|
cmp -s .tmp.config .config || \
|
|
|
|
(mv -f .config .config.old.1; \
|
|
|
|
mv -f .tmp.config .config; \
|
|
|
|
$< $(silent) --oldconfig $(Kconfig); \
|
|
|
|
mv -f .config.old.1 .config.old) \
|
|
|
|
else \
|
|
|
|
mv -f .tmp.config .config; \
|
|
|
|
$< $(silent) --oldconfig $(Kconfig); \
|
2009-05-07 23:09:55 +08:00
|
|
|
fi
|
2009-04-30 10:52:22 +08:00
|
|
|
$(Q)rm -f .tmp.config
|
|
|
|
|
2015-04-08 17:11:57 +08:00
|
|
|
# These targets map 1:1 to the commandline options of 'conf'
|
2018-07-20 15:46:29 +08:00
|
|
|
#
|
|
|
|
# Note:
|
|
|
|
# syncconfig has become an internal implementation detail and is now
|
|
|
|
# deprecated for external use
|
2015-04-08 17:11:57 +08:00
|
|
|
simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \
|
2019-11-05 06:10:08 +08:00
|
|
|
alldefconfig randconfig listnewconfig olddefconfig syncconfig \
|
2019-12-17 17:42:06 +08:00
|
|
|
helpnewconfig yes2modconfig mod2yesconfig
|
2019-11-05 06:10:08 +08:00
|
|
|
|
2015-04-08 17:11:57 +08:00
|
|
|
PHONY += $(simple-targets)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2015-04-08 17:11:57 +08:00
|
|
|
$(simple-targets): $(obj)/conf
|
2015-04-08 19:30:42 +08:00
|
|
|
$< $(silent) --$@ $(Kconfig)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2018-10-29 23:41:28 +08:00
|
|
|
PHONY += savedefconfig defconfig
|
2018-03-01 14:34:37 +08:00
|
|
|
|
2010-08-01 05:35:34 +08:00
|
|
|
savedefconfig: $(obj)/conf
|
2015-04-08 19:30:42 +08:00
|
|
|
$< $(silent) --$@=defconfig $(Kconfig)
|
2010-08-01 05:35:34 +08:00
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
defconfig: $(obj)/conf
|
2019-05-27 22:37:21 +08:00
|
|
|
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),)
|
2015-04-08 19:30:42 +08:00
|
|
|
@$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
|
|
|
|
$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
|
2015-09-23 13:40:34 +08:00
|
|
|
else
|
|
|
|
@$(kecho) "*** Default configuration is based on target '$(KBUILD_DEFCONFIG)'"
|
|
|
|
$(Q)$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG)
|
2005-04-17 06:20:36 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
%_defconfig: $(obj)/conf
|
2015-04-08 19:30:42 +08:00
|
|
|
$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2015-03-13 14:21:43 +08:00
|
|
|
configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@)
|
2014-08-07 06:21:00 +08:00
|
|
|
|
2015-03-13 14:21:43 +08:00
|
|
|
%.config: $(obj)/conf
|
|
|
|
$(if $(call configfiles),, $(error No configuration exists for this target on this architecture))
|
|
|
|
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(configfiles)
|
2019-06-05 02:14:53 +08:00
|
|
|
$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
|
2014-08-07 06:21:00 +08:00
|
|
|
|
|
|
|
PHONY += kvmconfig
|
2015-03-13 14:21:43 +08:00
|
|
|
kvmconfig: kvm_guest.config
|
|
|
|
@:
|
2014-08-07 06:21:00 +08:00
|
|
|
|
2015-05-21 02:53:39 +08:00
|
|
|
PHONY += xenconfig
|
|
|
|
xenconfig: xen.config
|
|
|
|
@:
|
|
|
|
|
2014-08-09 07:25:47 +08:00
|
|
|
PHONY += tinyconfig
|
2015-03-13 14:21:43 +08:00
|
|
|
tinyconfig:
|
|
|
|
$(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
|
2014-08-09 07:25:47 +08:00
|
|
|
|
2018-03-13 17:12:03 +08:00
|
|
|
# CHECK: -o cache_dir=<path> working?
|
|
|
|
PHONY += testconfig
|
|
|
|
testconfig: $(obj)/conf
|
|
|
|
$(PYTHON3) -B -m pytest $(srctree)/$(src)/tests \
|
|
|
|
-o cache_dir=$(abspath $(obj)/tests/.cache) \
|
|
|
|
$(if $(findstring 1,$(KBUILD_VERBOSE)),--capture=no)
|
2019-08-25 09:31:27 +08:00
|
|
|
clean-files += tests/.cache
|
2018-03-13 17:12:03 +08:00
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
# Help text used by make help
|
|
|
|
help:
|
|
|
|
@echo ' config - Update current config utilising a line-oriented program'
|
2018-06-02 17:08:03 +08:00
|
|
|
@echo ' nconfig - Update current config utilising a ncurses menu based program'
|
2005-04-17 06:20:36 +08:00
|
|
|
@echo ' menuconfig - Update current config utilising a menu based program'
|
2015-04-06 17:27:45 +08:00
|
|
|
@echo ' xconfig - Update current config utilising a Qt based front-end'
|
2015-06-01 01:35:51 +08:00
|
|
|
@echo ' gconfig - Update current config utilising a GTK+ based front-end'
|
2005-04-17 06:20:36 +08:00
|
|
|
@echo ' oldconfig - Update current config utilising a provided .config as base'
|
2009-04-30 10:52:22 +08:00
|
|
|
@echo ' localmodconfig - Update current config disabling modules not loaded'
|
2009-04-30 10:52:23 +08:00
|
|
|
@echo ' localyesconfig - Update current config converting local mods to core'
|
2010-08-01 05:35:31 +08:00
|
|
|
@echo ' defconfig - New config with default from ARCH supplied defconfig'
|
2010-08-01 05:35:34 +08:00
|
|
|
@echo ' savedefconfig - Save current config as ./defconfig (minimal config)'
|
2006-02-26 04:52:50 +08:00
|
|
|
@echo ' allnoconfig - New config where all options are answered with no'
|
2010-08-01 05:35:31 +08:00
|
|
|
@echo ' allyesconfig - New config where all options are accepted with yes'
|
|
|
|
@echo ' allmodconfig - New config selecting modules when possible'
|
|
|
|
@echo ' alldefconfig - New config with all symbols set to default'
|
|
|
|
@echo ' randconfig - New config with random answer to all options'
|
2019-12-17 17:42:06 +08:00
|
|
|
@echo ' yes2modconfig - Change answers from yes to mod if possible'
|
|
|
|
@echo ' mod2yesconfig - Change answers from mod to yes if possible'
|
2010-08-01 05:35:28 +08:00
|
|
|
@echo ' listnewconfig - List new options'
|
2019-11-05 06:10:08 +08:00
|
|
|
@echo ' helpnewconfig - List new options and help text'
|
2018-01-27 06:59:00 +08:00
|
|
|
@echo ' olddefconfig - Same as oldconfig but sets new symbols to their'
|
|
|
|
@echo ' default value without prompting'
|
2015-05-21 02:53:38 +08:00
|
|
|
@echo ' kvmconfig - Enable additional options for kvm guest kernel support'
|
2019-10-25 19:52:32 +08:00
|
|
|
@echo ' xenconfig - Enable additional options for xen dom0 and guest kernel'
|
|
|
|
@echo ' support'
|
2014-08-09 07:25:47 +08:00
|
|
|
@echo ' tinyconfig - Configure the tiniest possible kernel'
|
2018-06-02 17:08:02 +08:00
|
|
|
@echo ' testconfig - Run Kconfig unit tests (requires python3 and pytest)'
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
# ===========================================================================
|
|
|
|
# object files used by all kconfig flavours
|
2019-01-24 18:47:30 +08:00
|
|
|
common-objs := confdata.o expr.o lexer.lex.o parser.tab.o preprocess.o \
|
2019-08-26 01:28:33 +08:00
|
|
|
symbol.o util.o
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2019-01-24 18:47:30 +08:00
|
|
|
$(obj)/lexer.lex.o: $(obj)/parser.tab.h
|
2019-05-13 14:22:16 +08:00
|
|
|
HOSTCFLAGS_lexer.lex.o := -I $(srctree)/$(src)
|
|
|
|
HOSTCFLAGS_parser.tab.o := -I $(srctree)/$(src)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2018-12-21 16:33:04 +08:00
|
|
|
# conf: Used for defconfig, oldconfig and related targets
|
|
|
|
hostprogs-y += conf
|
|
|
|
conf-objs := conf.o $(common-objs)
|
|
|
|
|
2018-05-22 15:22:21 +08:00
|
|
|
# nconf: Used for the nconfig target based on ncurses
|
|
|
|
hostprogs-y += nconf
|
2018-12-21 16:33:04 +08:00
|
|
|
nconf-objs := nconf.o nconf.gui.o $(common-objs)
|
2018-05-22 15:22:21 +08:00
|
|
|
|
2019-01-05 11:01:51 +08:00
|
|
|
HOSTLDLIBS_nconf = $(shell . $(obj)/nconf-cfg && echo $$libs)
|
|
|
|
HOSTCFLAGS_nconf.o = $(shell . $(obj)/nconf-cfg && echo $$cflags)
|
|
|
|
HOSTCFLAGS_nconf.gui.o = $(shell . $(obj)/nconf-cfg && echo $$cflags)
|
2018-05-22 15:22:21 +08:00
|
|
|
|
2019-01-05 11:01:51 +08:00
|
|
|
$(obj)/nconf.o $(obj)/nconf.gui.o: $(obj)/nconf-cfg
|
2018-05-22 15:22:21 +08:00
|
|
|
|
|
|
|
# mconf: Used for the menuconfig target based on lxdialog
|
|
|
|
hostprogs-y += mconf
|
kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)
Kbuild provides per-file compiler flag addition/removal:
CFLAGS_<basetarget>.o
CFLAGS_REMOVE_<basetarget>.o
AFLAGS_<basetarget>.o
AFLAGS_REMOVE_<basetarget>.o
CPPFLAGS_<basetarget>.lds
HOSTCFLAGS_<basetarget>.o
HOSTCXXFLAGS_<basetarget>.o
The <basetarget> is the filename of the target with its directory and
suffix stripped.
This syntax comes into a trouble when two files with the same basename
appear in one Makefile, for example:
obj-y += foo.o
obj-y += dir/foo.o
CFLAGS_foo.o := <some-flags>
Here, the <some-flags> applies to both foo.o and dir/foo.o
The real world problem is:
scripts/kconfig/util.c
scripts/kconfig/lxdialog/util.c
Both files are compiled into scripts/kconfig/mconf, but only the
latter should be given with the ncurses flags.
It is more sensible to use the relative path to the Makefile, like this:
obj-y += foo.o
CFLAGS_foo.o := <some-flags>
obj-y += dir/foo.o
CFLAGS_dir/foo.o := <other-flags>
At first, I attempted to replace $(basetarget) with $*. The $* variable
is replaced with the stem ('%') part in a pattern rule. This works with
most of cases, but does not for explicit rules.
For example, arch/ia64/lib/Makefile reuses rule_as_o_S in its own
explicit rules, so $* will be empty, resulting in ignoring the per-file
AFLAGS.
I introduced a new variable, target-stem, which can be used also from
explicit rules.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Marc Zyngier <maz@kernel.org>
2019-08-30 12:34:01 +08:00
|
|
|
lxdialog := $(addprefix lxdialog/, \
|
|
|
|
checklist.o inputbox.o menubox.o textbox.o util.o yesno.o)
|
|
|
|
mconf-objs := mconf.o $(lxdialog) $(common-objs)
|
2018-05-22 15:22:21 +08:00
|
|
|
|
2019-01-05 11:01:51 +08:00
|
|
|
HOSTLDLIBS_mconf = $(shell . $(obj)/mconf-cfg && echo $$libs)
|
2018-05-22 15:22:21 +08:00
|
|
|
$(foreach f, mconf.o $(lxdialog), \
|
2019-01-05 11:01:51 +08:00
|
|
|
$(eval HOSTCFLAGS_$f = $$(shell . $(obj)/mconf-cfg && echo $$$$cflags)))
|
2010-08-16 12:19:04 +08:00
|
|
|
|
kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)
Kbuild provides per-file compiler flag addition/removal:
CFLAGS_<basetarget>.o
CFLAGS_REMOVE_<basetarget>.o
AFLAGS_<basetarget>.o
AFLAGS_REMOVE_<basetarget>.o
CPPFLAGS_<basetarget>.lds
HOSTCFLAGS_<basetarget>.o
HOSTCXXFLAGS_<basetarget>.o
The <basetarget> is the filename of the target with its directory and
suffix stripped.
This syntax comes into a trouble when two files with the same basename
appear in one Makefile, for example:
obj-y += foo.o
obj-y += dir/foo.o
CFLAGS_foo.o := <some-flags>
Here, the <some-flags> applies to both foo.o and dir/foo.o
The real world problem is:
scripts/kconfig/util.c
scripts/kconfig/lxdialog/util.c
Both files are compiled into scripts/kconfig/mconf, but only the
latter should be given with the ncurses flags.
It is more sensible to use the relative path to the Makefile, like this:
obj-y += foo.o
CFLAGS_foo.o := <some-flags>
obj-y += dir/foo.o
CFLAGS_dir/foo.o := <other-flags>
At first, I attempted to replace $(basetarget) with $*. The $* variable
is replaced with the stem ('%') part in a pattern rule. This works with
most of cases, but does not for explicit rules.
For example, arch/ia64/lib/Makefile reuses rule_as_o_S in its own
explicit rules, so $* will be empty, resulting in ignoring the per-file
AFLAGS.
I introduced a new variable, target-stem, which can be used also from
explicit rules.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Marc Zyngier <maz@kernel.org>
2019-08-30 12:34:01 +08:00
|
|
|
$(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/mconf-cfg
|
2018-05-22 15:22:19 +08:00
|
|
|
|
|
|
|
# qconf: Used for the xconfig target based on Qt
|
|
|
|
hostprogs-y += qconf
|
|
|
|
qconf-cxxobjs := qconf.o
|
2018-12-21 16:33:07 +08:00
|
|
|
qconf-objs := images.o $(common-objs)
|
2018-05-22 15:22:19 +08:00
|
|
|
|
2019-01-05 11:01:51 +08:00
|
|
|
HOSTLDLIBS_qconf = $(shell . $(obj)/qconf-cfg && echo $$libs)
|
|
|
|
HOSTCXXFLAGS_qconf.o = $(shell . $(obj)/qconf-cfg && echo $$cflags)
|
2018-05-22 15:22:19 +08:00
|
|
|
|
2019-01-05 11:01:51 +08:00
|
|
|
$(obj)/qconf.o: $(obj)/qconf-cfg $(obj)/qconf.moc
|
2018-05-22 15:22:19 +08:00
|
|
|
|
|
|
|
quiet_cmd_moc = MOC $@
|
2019-01-05 11:01:51 +08:00
|
|
|
cmd_moc = $(shell . $(obj)/qconf-cfg && echo $$moc) -i $< -o $@
|
2018-05-22 15:22:19 +08:00
|
|
|
|
2019-01-05 11:01:51 +08:00
|
|
|
$(obj)/%.moc: $(src)/%.h $(obj)/qconf-cfg
|
2018-05-22 15:22:19 +08:00
|
|
|
$(call cmd,moc)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2018-05-22 15:22:20 +08:00
|
|
|
# gconf: Used for the gconfig target based on GTK+
|
|
|
|
hostprogs-y += gconf
|
2018-12-21 16:33:07 +08:00
|
|
|
gconf-objs := gconf.o images.o $(common-objs)
|
2018-05-22 15:22:20 +08:00
|
|
|
|
2019-01-05 11:01:51 +08:00
|
|
|
HOSTLDLIBS_gconf = $(shell . $(obj)/gconf-cfg && echo $$libs)
|
|
|
|
HOSTCFLAGS_gconf.o = $(shell . $(obj)/gconf-cfg && echo $$cflags)
|
2018-05-22 15:22:20 +08:00
|
|
|
|
2019-01-05 11:01:51 +08:00
|
|
|
$(obj)/gconf.o: $(obj)/gconf-cfg
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2018-05-22 15:22:19 +08:00
|
|
|
# check if necessary packages are available, and configure build flags
|
2019-01-03 09:16:54 +08:00
|
|
|
filechk_conf_cfg = $(CONFIG_SHELL) $<
|
2018-05-22 15:22:19 +08:00
|
|
|
|
2019-01-05 11:01:51 +08:00
|
|
|
$(obj)/%conf-cfg: $(src)/%conf-cfg.sh FORCE
|
2018-05-22 15:22:19 +08:00
|
|
|
$(call filechk,conf_cfg)
|
|
|
|
|
2019-01-11 10:51:48 +08:00
|
|
|
clean-files += *conf-cfg
|