summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2018-11-03 19:58:31 -0400
committerAllan McRae <allan@archlinux.org>2018-11-27 22:48:43 +1000
commitc41222837d76d550921a70dd95c509537031102c (patch)
tree6b409b47f5cf4313fb98dd2bf12adc56632f375c /scripts
parent0dd14924424478564321fc681e3f344b53fb7b54 (diff)
downloadpacman-c41222837d76d550921a70dd95c509537031102c.tar.xz
meson: separate out wrapped from non-wrapped scripts
makepkg-template is a perl script and doesn't get wrapped by our shell wrapper. It (wrongly) reads from the host machine rather than the build root, but this is working as implemented.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/meson.build20
1 files changed, 18 insertions, 2 deletions
diff --git a/scripts/meson.build b/scripts/meson.build
index 535eccba..50b0c34f 100644
--- a/scripts/meson.build
+++ b/scripts/meson.build
@@ -1,5 +1,4 @@
-scripts = [
- 'makepkg-template.pl.in',
+wrapped_scripts = [
'makepkg.sh.in',
'pacman-db-upgrade.sh.in',
'pacman-key.sh.in',
@@ -7,6 +6,10 @@ scripts = [
'repo-add.sh.in'
]
+scripts = [
+ 'makepkg-template.pl.in',
+]
+
library_files = [
'library/human_to_size.sh',
'library/size_to_human.sh',
@@ -26,6 +29,19 @@ m4_edit = generator(
foreach script : scripts
script_shortname = script.split('.')[0]
+ custom_target(
+ script,
+ input : m4_edit.process(script),
+ command : [ SCRIPT_EDITOR, '@INPUT@', '@OUTPUT@', '0755'],
+ output : script_shortname,
+ depend_files : library_files,
+ install : true,
+ install_dir : get_option('bindir'))
+endforeach
+
+foreach script : wrapped_scripts
+ script_shortname = script.split('.')[0]
+
# Build the script, but don't install it. We want to keep it as a "private"
# artifact that we reference from a wrapper script in order to bootstrap it
# the build directory.