forked from dosemu2/dosemu2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rebuild
executable file
·52 lines (47 loc) · 1002 Bytes
/
rebuild
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
#
# properly clean source tree, configure and recompile dosemu
# (this is here just for developer's convenience, not for general usage)
#
# USAGE:
#
# rebuild [all] [inst] [static]
#
# all force a complete rebuild, don't rely on previous make
# inst test install of the binary (if running root) suid-root in $TGT
# static build portable static binaries
#
#
TGT=/usr/bin
#
ALL=0
INST=0
PORTABLE=0
while [ -n "$1" ]; do
case $1 in
all) ALL=1 ;;
inst) INST=1 ;;
static) PORTABLE=1 ;;
*) ;;
esac
shift
done
if [ $ALL = 1 -o ! -f Makefile ]; then
if [ -f Makefile.conf ]; then
make distclean
fi
fi
if [ $PORTABLE = 1 -a ! -f Makefile.conf ]; then
./default-configure --enable-linkstatic
fi
make 'WAIT=' 2>&1 | tee -a gen.log
# grep 'warning' gen.log
if [ "$UID" = "0" -a $INST = 1 ]; then
#
# special installs
#
rm -f ${TGT}/dos
install -s -m 4755 bin/dosemu.bin ${TGT}/dos
install -s -m 4755 bin/dosdebug ${TGT}
fi
sync