History

meson, bootstrap: make bootstrap independent of build dir naming

Sigrid Solveig Haflínudóttir committed 3 months ago

Commit 1fcf5dc1 parent 87aa3092 files · +6 −8Browse files

Unified · Split

2 files
  1. meson.build +2 −2
  2. tools/bootstrap.sh +4 −6
meson.build+2−2
@@ -729,7 +729,7 @@ test('docvet.sl', sl, args: ta+['docvet.sl'], workdir: src_dir/'tools', is_paral · 728 unmodified lines
729bootstrap = src_dir/'tools'/'bootstrap.sh'729bootstrap = src_dir/'tools'/'bootstrap.sh'
730run_target(730run_target(
731 'bootstrap',731 'bootstrap',
732 command: bootstrap,732 command: [bootstrap, sl]+ta,
733)733)
734 734
735if not meson.is_cross_build()735if not meson.is_cross_build()
@@ -738,7 +738,7 @@ if not meson.is_cross_build() · 2 unmodified lines
738 native: true,738 native: true,
739 required: true,739 required: true,
740 )740 )
741 test('bootstrap', bootstrap, args: ta, workdir: src_dir, is_parallel: false, priority: 9999, timeout: -1)741 test('bootstrap', bootstrap, workdir: src_dir, is_parallel: false, priority: 9999, timeout: -1)
742endif742endif
743 743
744summary(744summary(
tools/bootstrap.sh+4−6
@@ -1,18 +1,16 @@
1#!/bin/sh1#!/bin/sh
2set -x2set -x
3test -e
4P="${MESON_SOURCE_ROOT:-$(pwd)}"3P="${MESON_SOURCE_ROOT:-$(pwd)}"
5T="$P/tools"4T="$P/tools"
6B="${MESON_BUILD_ROOT:-$P/build}"5B="${MESON_BUILD_ROOT:-$P/build}"
7F="$B/sl"6test -x "$1" || { echo no "$1" found; exit 1; }
8test -x "$F" || { echo no "$F" found; exit 1; }
9cd "$P/src" && \7cd "$P/src" && \
10"$F" $* "$T/gen.sl" && \8$* "$T/gen.sl" && \
11cp "$P/boot/sl.boot" "$P/boot/sl.boot.bak" && \9cp "$P/boot/sl.boot" "$P/boot/sl.boot.bak" && \
12"$F" $* "$T/mkboot0.sl" builtins.sl instructions.sl system.sl compiler.sl > "$P/boot/sl.boot" && \10$* "$T/mkboot0.sl" builtins.sl instructions.sl system.sl compiler.sl > "$P/boot/sl.boot" && \
13ninja -C "$B" && \11ninja -C "$B" && \
14cd "$P/boot" && \12cd "$P/boot" && \
15"$F" $* "$T/mkboot1.sl" && \13$* "$T/mkboot1.sl" && \
16sed -E 's/^ +//g' <sl.boot >sl.boot.cut && \14sed -E 's/^ +//g' <sl.boot >sl.boot.cut && \
17mv sl.boot.cut sl.boot && \15mv sl.boot.cut sl.boot && \
18ninja -C "$B" || { cp "$P/boot/sl.boot.bak" "$P/boot/sl.boot"; exit 1; }16ninja -C "$B" || { cp "$P/boot/sl.boot.bak" "$P/boot/sl.boot"; exit 1; }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t