File: smart-make

package info (click to toggle)
rsync 3.4.1%2Bds1-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,388 kB
  • sloc: ansic: 35,682; sh: 6,538; python: 1,759; asm: 829; perl: 479; makefile: 365; cpp: 298; awk: 191
file content (45 lines) | stat: -rwxr-xr-x 686 bytes parent folder | download | duplicates (3)
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
#!/bin/sh
 
set -e

export LANG=C

branch=`packaging/prep-auto-dir`
if test x"$branch" = x; then
    srcdir=.
else
    cd build
    srcdir=..
fi

if test -f configure.sh; then
    cp -p configure.sh configure.sh.old
else
    touch configure.sh.old
fi

if test -f .fetch; then
    $srcdir/prepare-source fetch
else
    $srcdir/prepare-source
fi

if diff configure.sh configure.sh.old >/dev/null 2>&1; then
    echo "configure.sh is unchanged."
    rm configure.sh.old
else
    echo "configure.sh has CHANGED."
    if test -f config.status; then
	./config.status --recheck
    else
	$srcdir/configure
    fi
fi

./config.status

make all

if test x"$1" = x"check"; then
    make check
fi