Makefile: ensure frontends/ exits before writing into it As previously, if GCC dependencies are not being written and the build is out of tree then frontends/ won't exist so we need to create it. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Makefile: ensure utils/ exists before writing to it Since utils/ was changed to not build recursively it's possible that in out-of-tree builds the utils/ directory hasn't been created when Make runs the utils/kconfig-tweak target which tries to write to file inside utils/. This is the case, for example, when using --disable-dependency-tracking. To ensure this can work, mkdir the directory. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Makefile: generated yacc/lex/gperf source are maintainer-clean Those files should not be cleaned using the standard distclean or clean rules, because they "may require special tools to rebuild" and thus should be kept, especially in released tree. They should only be removed inmaintainer mode (but a "git clean -dX" will remove them too!). Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Makefile: comment tricky yconf condition The yconf.c file is generated from the yconf.y yacc source; it is the main and only source file that is actuall compiled, as it #include-s the other source files (weird, but that's how it's done upstream). So yconf.c does not need to be listed as a built source; the other two, generated from lex and gperf source files, do need to be listed because they are not part of _SOURCES, but are only in _EXTRA_SOURCES. However, .c files generated from yacc code are nt considerate as being intermediate files, and thus are not cleaned automatically. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Makefile: cleaning .pc belongs to distclean As suggested by the standard, documented heuristic in automake, files created by ./configure should be removed by distclean, not clean: https://www.gnu.org/software/automake/manual/automake.html#Clean Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Makefile: include generated hconf.c in distribution As for lex and yacc generated files, also distribute the gperf-generated file, as gperf is not always installed, and sometimes not the correct version. Reported-by: Freddie Chopin <freddie.chopin@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Makefile: unbreak build out-of-tree When we switched to a single top-level Makefile, we lost the ability to build out-of-tree, but only in a non-git tree... Weird... However, the error is real: we were missing a include path for the generated files, wihch are not generated in top_srcdir but in top_builddir. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
libs/parser: support gperf v3.1+ As Freddie wrote: New version of gperf (3.1, released in January 2017) breaks the build of kconfig-frontends both for the last package you uploaded (3.12.0.0) and for the HEAD from the repository. The problem is that gperf 3.1 now uses "size_t" as the length argument for the functions, while earlier versions use "unsigned int". As suggested by Freddie, add a configure check to detect the type used in gperf declarations. Unlike the patch from Freddie, we use as much autoconf code as possible, rather than canned shell commands. This makes the code about twice bigger, but it is full autoconf stuff, so presumably more portable. Also add a patch to be applied by scripts/ksync.sh, so that the change persists with future update from upstream (as so we catch it when upstream fixes it by themselves). Reported-by: Freddie Chopin <freddie.chopin@gmail.com> Inspired-by: https://gist.github.com/FreddieChopin/b2ec415ee4eacbd4b92499bbf4e934be Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Synchronise with v4.10 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
scripts/ksync: exit on error (esp. on a missing file) We currently do not detect when upstream removes (or rnames) a file we used to sync. We must detect this condition and fail ASAP (or we get a cryptic error from git). Fix that by making the sync script abort on any error. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>