[pacman-dev] [PATCH 2/2] libmakepkg: give buildenv files a distinct order
morganamilo
morganamilo at archlinux.org
Wed Apr 21 15:43:14 UTC 2021
Before, the functions would be run aphabetically.
Now we ensure buildflags and makeflags are wiped first, then we apply
other options, before copying the buildflags into debugflags.
diff --git a/scripts/libmakepkg/buildenv.sh.in b/scripts/libmakepkg/buildenv.sh.in
index b75d792a..a4f1c6f5 100644
--- a/scripts/libmakepkg/buildenv.sh.in
+++ b/scripts/libmakepkg/buildenv.sh.in
@@ -31,6 +31,7 @@ done
readonly -a buildenv_functions build_options
prepare_buildenv() {
+echo ${buildenv_functions[@]}
for func in ${buildenv_functions[@]}; do
$func
done
diff --git a/scripts/libmakepkg/buildenv/buildflags.sh.in b/scripts/libmakepkg/buildenv/10-buildflags.sh.in
similarity index 100%
rename from scripts/libmakepkg/buildenv/buildflags.sh.in
rename to scripts/libmakepkg/buildenv/10-buildflags.sh.in
diff --git a/scripts/libmakepkg/buildenv/makeflags.sh.in b/scripts/libmakepkg/buildenv/20-makeflags.sh.in
similarity index 100%
rename from scripts/libmakepkg/buildenv/makeflags.sh.in
rename to scripts/libmakepkg/buildenv/20-makeflags.sh.in
diff --git a/scripts/libmakepkg/buildenv/compiler.sh.in b/scripts/libmakepkg/buildenv/30-compiler.sh.in
similarity index 100%
rename from scripts/libmakepkg/buildenv/compiler.sh.in
rename to scripts/libmakepkg/buildenv/30-compiler.sh.in
diff --git a/scripts/libmakepkg/buildenv/flags.sh.in b/scripts/libmakepkg/buildenv/40-flags.sh.in
similarity index 100%
rename from scripts/libmakepkg/buildenv/flags.sh.in
rename to scripts/libmakepkg/buildenv/40-flags.sh.in
diff --git a/scripts/libmakepkg/buildenv/lto.sh.in b/scripts/libmakepkg/buildenv/50-lto.sh.in
similarity index 100%
rename from scripts/libmakepkg/buildenv/lto.sh.in
rename to scripts/libmakepkg/buildenv/50-lto.sh.in
diff --git a/scripts/libmakepkg/buildenv/debugflags.sh.in b/scripts/libmakepkg/buildenv/60-debugflags.sh.in
similarity index 100%
rename from scripts/libmakepkg/buildenv/debugflags.sh.in
rename to scripts/libmakepkg/buildenv/60-debugflags.sh.in
diff --git a/scripts/libmakepkg/buildenv/meson.build b/scripts/libmakepkg/buildenv/meson.build
index a69accb7..8ca2d085 100644
--- a/scripts/libmakepkg/buildenv/meson.build
+++ b/scripts/libmakepkg/buildenv/meson.build
@@ -1,12 +1,12 @@
libmakepkg_module = 'buildenv'
sources = [
- 'buildflags.sh.in',
- 'compiler.sh.in',
- 'debugflags.sh.in',
- 'flags.sh.in',
- 'lto.sh.in',
- 'makeflags.sh.in',
+ '10-buildflags.sh.in',
+ '20-makeflags.sh.in',
+ '30-compiler.sh.in',
+ '40-flags.sh.in',
+ '50-lto.sh.in',
+ '60-debugflags.sh.in',
]
foreach src : sources
--
2.31.1
More information about the pacman-dev
mailing list