summaryrefslogtreecommitdiffstats
path: root/archive/p7zip/PRE_BUILD
blob: c8cf33c3af0bcca03dbbac848a9c7c6f3b137c38 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
default_pre_build &&
cd $SOURCE_DIRECTORY &&

sed -i "s:/usr/local:$INSTALL_ROOT/usr:g" makefile install.sh &&
sed -i "s:HOME)/man:HOME)/share/man:" makefile &&
sed -i "s:HOME}/man:HOME}/share/man:" install.sh &&

# make sure make is using our CFLAGS, see also the sedit below
sedit "s|CFLAGS=|CFLAGS=$CFLAGS |g" makefile.glb &&

case "${HOST%%-*}" in
i*86 | ppc | alpha)
  cp makefile.linux_any_cpu_gcc_4.X makefile.machine
  ;;
x86_64)
  cp makefile.linux_amd64 makefile.machine
  ;;
#sparc*)
#  ;;
*)
  message "${ERROR_COLOR}Unsupported architecture${DEFAULT_COLOR}" &&
  false
  ;;
esac &&
# we need double backslash for sed, so we have to give quadruple one here
sedit "s|ALLFLAGS=.*\\\\|ALLFLAGS=$CFLAGS \\\\|g" makefile.machine