[OpenWrt-Devel] [PATCH] build: don't call prereq for any package/symlinks rules

Felix Fietkau nbd at openwrt.org
Fri May 8 06:19:21 EDT 2015

On 2015-04-28 01:46, Mathieu Olivari wrote:
> Most of the time, we want to make sure OpenWrt has been configured and
> setup before start running make. However, in case of package/symlinks,
> forcing prereq as a dependency creates multiple issues:
> *when executed on a clean workspace, it will prompt for user input
>  and open a menuconfig window before executing the feeds command
> *the only way around that is to provide a .config. However, the "prereq"
>  target would then run a "make defconfig", which will remove all the
>  packages in the .config but from external feeds, as feeds have not been
>  installed yet.
> The only way to currently work around this, is to generate a fake config
> by running "make defconfig", then "make package/symlinks", copy the real
> config (which at this point disregards the previously generated config),
> and run make defconfig again. Something like this:
> make defconfig
> make package/symlinks
> cp real.config .config
> make defconfig
> This change is removing the need for the first defconfig, making the
> process more logical for OpenWrt users using the package/symlinks target.
> Signed-off-by: Mathieu Olivari <mathieu at qca.qualcomm.com>
> ---
>  include/toplevel.mk | 2 ++
>  1 file changed, 2 insertions(+)
> diff --git a/include/toplevel.mk b/include/toplevel.mk
> index d8651d9..b3b344d 100644
> --- a/include/toplevel.mk
> +++ b/include/toplevel.mk
> @@ -178,6 +178,7 @@ ifeq ($(SDK),1)
>  else
>  %::
> +ifeq ($(filter package/symlinks%,$(MAKECMDGOALS)),)
I think this is the wrong approach for solving this - this means that if
somebody specifies multiple targets in addition to package/symlinks, the
other targets will be excluded from this as well.
It would make more sense to move the package/symlinks targets to
include/toplevel.mk, where they can bypass the %:: target entirely.

- Felix
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list