aboutsummaryrefslogtreecommitdiffstats
path: root/Redofile
blob: ab241f9f782fa3e063135f84d38f57447d280ed3 (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
# define all project wide variables

export ROOTDIR=$(pwd)
export SRCDIR=$ROOTDIR/src
export OUTDIR=$ROOTDIR/out
export VERSION="pre-0.01"

DESTDIR=${DESTDIR-/usr/bin}

if [ "$1" = "all" ]; then
    redo-ifchange $OUTDIR/redo $OUTDIR/redo-ifchange $OUTDIR/redo-ifcreate \
                  $OUTDIR/redo-always
elif [ "$1" = "clean" ]; then
    rm -rf $OUTDIR/*.tmp $OUTDIR/*.o $OUTDIR/redo $OUTDIR/redo-ifchange \
           $OUTDIR/redo-ifcreate $OUTDIR/redo-always $OUTDIR/CC
    # autoconf stuff
    rm -rf autom4te.cache config.h.in configure config.status config.log config.h
elif [ "$1" = "install" ]; then
    redo-ifchange all
    mkdir -p $DESTDIR
    install $OUTDIR/redo $DESTDIR
    install $OUTDIR/redo-ifchange $DESTDIR
    install $OUTDIR/redo-ifcreate $DESTDIR
    install $OUTDIR/redo-always $DESTDIR
    echo "Finished installing."
fi