From f657b78b286ac4fd24bfa2c8a8529b608dfb7a39 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 18 May 2019 17:55:31 -0400 Subject: build: Shorten build-gcc-config commands --- (limited to 'build') 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) -- \ -- cgit v0.9.1