Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: sync and dedup the creation of the SYSNAME and OBJTYPE env vars #321

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions buildEnvironmentVariables
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
SYSNAME=`uname`
OBJTYPE=`(uname -m -p 2>/dev/null || uname -m) | sed '
s;.*i[3-6]86.*;386;;
s;.*i86pc.*;386;;
s;.*amd64.*;x86_64;;
s;.*x86_64.*;x86_64;;
s;.*armv.*;arm;g;
s;.*powerpc.*;power;g;
s;.*PowerMacintosh.*;power;g;
s;.*Power.Macintosh.*;power;g;
s;.*macppc.*;power;g;
s;.*mips.*;mips;g;
s;.*ppc64.*;power;g;
s;.*ppc.*;power;g;
s;.*alpha.*;alpha;g;
s;.*sun4u.*;sun4u;g;
s;.*aarch64.*;arm64;
s;.*arm64.*;arm64;
'`
19 changes: 2 additions & 17 deletions dist/buildmk
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
#!/bin/sh

# run this in the src directory
SYSNAME=`uname` export SYSNAME
OBJTYPE=`(uname -m -p 2>/dev/null || uname -m) | sed '
s;.*i[3-6]86.*;386;;
s;.*i86pc.*;386;;
s;.*amd64.*;x86_64;;
s;.*x86_64.*;x86_64;;
s;.*armv.*;arm;g;
s;.*powerpc.*;power;g;
s;.*PowerMacintosh.*;power;g;
s;.*Power.Macintosh.*;power;g;
s;.*macppc.*;power;g;
s;.*mips.*;mips;g;
s;.*ppc64.*;power;g;
s;.*ppc.*;power;g;
s;.*alpha.*;alpha;g;
s;.*sun4u.*;sun4u;g;
'` export OBJTYPE
export SYSNAME OBJTYPE
. ../buildEnvironmentVariables
sh -x mkmk.sh
20 changes: 1 addition & 19 deletions src/mkhdr
Original file line number Diff line number Diff line change
@@ -1,22 +1,4 @@
# if you change this, also edit ../dist/buildmk
SYSNAME=`uname`
OBJTYPE=`(uname -m -p 2>/dev/null || uname -m) | sed '
s;.*i[3-6]86.*;386;;
s;.*i86pc.*;386;;
s;.*amd64.*;x86_64;;
s;.*x86_64.*;x86_64;;
s;.*armv.*;arm;g;
s;.*powerpc.*;power;g;
s;.*PowerMacintosh.*;power;g;
s;.*Power.Macintosh.*;power;g;
s;.*macppc.*;power;g;
s;.*mips.*;mips;g;
s;.*ppc64.*;power;g;
s;.*ppc.*;power;g;
s;.*alpha.*;alpha;g;
s;.*sun4u.*;sun4u;g;
s;.*aarch64.*;arm64;
'`
<$PLAN9/buildEnvironmentVariables

BIN=$PLAN9/bin
LIBDIR=$PLAN9/lib
Expand Down