Skip to content

Commit

Permalink
Fix and improve configuring code in makefile and script.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucc committed Jun 20, 2016
1 parent 1c941c8 commit 330c27a
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions scripts/find_platform
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,28 @@

. inc/platform.sh

# The backslash has to be put here 8 times: foctor two to get past the initial
# shell quoting, another factor two because it is used in the replacement
# string for sed, another factor two because the output of belows echo will be
# used in the replacement text in the sed call in the makefile. This yields
# one backslash that can escape the single quote in the configured vimpager
# script.
AWK=$(echo "$AWK" | sed "s/'/'\\\\\\\\''/g")
SED=$(echo "$SED" | sed "s/'/'\\\\\\\\''/g")

echo \
bsd=$bsd \
cygwin=$cygwin \
freebsd=$freebsd \
linux=$linux \
msys=$msys \
netbsd=$netbsd \
openbsd=$openbsd \
osx=$osx \
solaris=$solaris \
win32=$win32 \
AWK=$AWK \
SED=$SED \
SED=$SED \
HEAD_SYNTAX=$HEAD_SYNTAX \
${bsd:+bsd=$bsd} \
${cygwin:+cygwin=$cygwin} \
${freebsd:+freebsd=$freebsd} \
${linux:+linux=$linux} \
${msys:+msys=$msys} \
${netbsd:+netbsd=$netbsd} \
${openbsd:+openbsd=$openbsd} \
${osx:+osx=$osx} \
${solaris:+solaris=$solaris} \
${win32:+win32=$win32} \
"AWK='$AWK'" \
"SED='$SED'" \
${HEAD_SYNTAX:+HEAD_SYNTAX=$HEAD_SYNTAX} \

# vim: sw=4 et tw=0:

0 comments on commit 330c27a

Please sign in to comment.