summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-05-18 17:55:31 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-05-18 17:55:31 (EDT)
commitf657b78b286ac4fd24bfa2c8a8529b608dfb7a39 (patch)
tree8d84df725853ff45151915ac7aa3654c3790143f /build
parent420be76028fbfaaf8611149922f543f2e4ef1cbb (diff)
build: Shorten build-gcc-config commands
Diffstat (limited to 'build')
-rwxr-xr-xbuild26
1 files changed, 10 insertions, 16 deletions
diff --git a/build b/build
index f06b886..4fea037 100755
--- a/build
+++ b/build
@@ -61,6 +61,8 @@ bootstrap1_opts = \
--disable-libgomp \
--disable-libssp
+tm = src/gcc/config # Abbreviation for build-gcc-config
+
# Defaults:
libdir = /usr/lib/$(OPK_HOST_ARCH)
libsubdir = /usr/lib/$(OPK_HOST_ARCH)/gcc/$(target_gnu)/$(version)
@@ -107,22 +109,14 @@ build-gcc-config:
# configuration can be used by multiple ProteanOS targets.
# These commands run once per target, but they modify files in the src/
# directory that other targets might also use, so backups are made.
- set -e; \
- [ -e "src/gcc/config/$(tm_file).orig" ] || \
- mv "src/gcc/config/$(tm_file)" \
- "src/gcc/config/$(tm_file).orig"; \
- define_pattern=".define $(tm_interp_macro)"; \
- sed "s|^\($${define_pattern}\) \".*\"$$|\1 \"$(elf_interp)\"|" \
- "src/gcc/config/$(tm_file).orig" \
- >"src/gcc/config/$(tm_file)"; \
- [ -e "src/gcc/config/$(tmake_file).orig" ] || \
- mv "src/gcc/config/$(tmake_file)" \
- "src/gcc/config/$(tmake_file).orig"; \
- sed "$(tmake_script)" \
- "src/gcc/config/$(tmake_file).orig" \
- >"src/gcc/config/$(tmake_file)"; \
- printf '\nMULTIARCH_DIRNAME = %s\n' "$(target)" \
- >>"src/gcc/config/$(tmake_file)"
+ [ -e "$(tm)/$(tm_file).orig" ] || \
+ mv "$(tm)/$(tm_file)" "$(tm)/$(tm_file).orig"
+ sed "s|^\(.define $(tm_interp_macro)\) \".*\"$$|\1 \"$(elf_interp)\"|" \
+ "$(tm)/$(tm_file).orig" >"$(tm)/$(tm_file)"
+ [ -e "$(tm)/$(tmake_file).orig" ] || \
+ mv "$(tm)/$(tmake_file)" "$(tm)/$(tmake_file).orig"
+ sed "$(tmake_script)" "$(tm)/$(tmake_file).orig" >"$(tm)/$(tmake_file)"
+ printf '\nMULTIARCH_DIRNAME = %s\n' "$(target)" >>"$(tm)/$(tmake_file)"
build-native: build-gcc-config
oh-autobuild -B "$(builddir)" -T $(native_target) -- \