History

kbuild: pacman-pkg: do not override objtree

objtree is defined and exported by the top-level Makefile. I prefer not to override it. There is no need to pass the absolute path of objtree. PKGBUILD can detect it by itself.

Masahiro Yamada committed 2 years ago

Commit 5b000f31 parent b6223c22 files · +4 −3Browse files

Unified · Split

2 files
  1. scripts/Makefile.package +1 −2
  2. scripts/package/PKGBUILD +3 −1
scripts/Makefile.package+1−2
@@ -147,8 +147,7 @@ snap-pkg: · 146 unmodified lines
147PHONY += pacman-pkg147PHONY += pacman-pkg
148pacman-pkg:148pacman-pkg:
149 @ln -srf $(srctree)/scripts/package/PKGBUILD $(objtree)/PKGBUILD149 @ln -srf $(srctree)/scripts/package/PKGBUILD $(objtree)/PKGBUILD
150 +objtree="$(realpath $(objtree))" \150 +BUILDDIR="$(realpath $(objtree))/pacman" \
151 BUILDDIR="$(realpath $(objtree))/pacman" \
152 CARCH="$(UTS_MACHINE)" \151 CARCH="$(UTS_MACHINE)" \
153 KBUILD_MAKEFLAGS="$(MAKEFLAGS)" \152 KBUILD_MAKEFLAGS="$(MAKEFLAGS)" \
154 KBUILD_REVISION="$(shell $(srctree)/scripts/build-version)" \153 KBUILD_REVISION="$(shell $(srctree)/scripts/build-version)" \
scripts/package/PKGBUILD+3−1
@@ -40,7 +40,9 @@ _prologue() { · 39 unmodified lines
40 # MAKEFLAGS from makepkg.conf override the ones inherited from kbuild.40 # MAKEFLAGS from makepkg.conf override the ones inherited from kbuild.
41 # Bypass this override with a custom variable.41 # Bypass this override with a custom variable.
42 export MAKEFLAGS="${KBUILD_MAKEFLAGS}"42 export MAKEFLAGS="${KBUILD_MAKEFLAGS}"
43 cd "${objtree}"43
44 # Kbuild works in the output directory, where this PKGBUILD is located.
45 cd "$(dirname "${BASH_SOURCE[0]}")"
44}46}
45 47
46build() {48build() {