[OpenWrt-Devel] [PATCH] build: include BUILD_VARIANT in PKG_BUILD_DIR

Jeffery To jeffery.to at gmail.com
Wed May 15 07:56:56 EDT 2019


On Sun, May 12, 2019 at 3:15 AM Hauke Mehrtens <hauke at hauke-m.de> wrote:

> On 5/2/19 7:52 PM, Jeffery To wrote:
> > This changes the default PKG_BUILD_DIR to take BUILD_VARIANT into
> > account (if set), so that packages do not need to manually override
> > PKG_BUILD_DIR just to handle variants.
> >
> > This also updates most base packages with variants to use the updated
> > default PKG_BUILD_DIR.
> >
> > Signed-off-by: Jeffery To <jeffery.to at gmail.com>
> > ---
> >  include/package.mk                        | 2 +-
> >  package/libs/ustream-ssl/Makefile         | 2 --
> >  package/network/services/hostapd/Makefile | 2 --
> >  package/network/services/odhcpd/Makefile  | 2 --
> >  package/network/services/openvpn/Makefile | 1 -
> >  package/network/services/ppp/Makefile     | 3 ++-
> >  package/network/utils/iproute2/Makefile   | 4 ++--
> >  package/network/utils/iw/Makefile         | 1 -
> >  package/network/utils/tcpdump/Makefile    | 1 -
> >  package/system/ucert/Makefile             | 2 --
> >  package/utils/px5g/Makefile               | 1 -
> >  11 files changed, 5 insertions(+), 16 deletions(-)
> >
> > diff --git a/include/package.mk b/include/package.mk
> > index 569ad647d6..015117bd3a 100644
> > --- a/include/package.mk
> > +++ b/include/package.mk
> > @@ -11,7 +11,7 @@ all: $(if $(DUMP),dumpinfo,$(if
> $(CHECK),check,compile))
> >
> >  include $(INCLUDE_DIR)/download.mk
> >
> > -PKG_BUILD_DIR ?= $(BUILD_DIR)/$(PKG_NAME)$(if
> $(PKG_VERSION),-$(PKG_VERSION))
> > +PKG_BUILD_DIR ?= $(BUILD_DIR)/$(if
> $(BUILD_VARIANT),$(PKG_NAME)-$(BUILD_VARIANT)/)$(PKG_NAME)$(if
> $(PKG_VERSION),-$(PKG_VERSION))
> >  PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install
> >  PKG_BUILD_PARALLEL ?=
> >  PKG_USE_MIPS16 ?= 1
>
> Please also update the variable in include/kernel.mk then you should not
> need the workarounds for the packages which include include/kernel.mk
> and more.
>
> Hauke
>

I've updated include/kernel.mk and will submit a revised patch shortly, but
now iproute2 and ppp are built inside KERNEL_BUILD_DIR instead of
BUILD_DIR, not sure if this is an issue.

Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20190515/dd521686/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list