aboutsummaryrefslogtreecommitdiffstats
path: root/default.do
blob: 00057566b153fbf4c2c7eafb2ff9b02de5fae2c3 (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
27
# define all project wide variables

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

DESTDIR=${DESTDIR-/usr/local/bin}

printf '%s' $REDO_TEST | redo-stamp

if [ "$1" = "all" ]; then
	redo-ifchange "$OUTDIR/redo"
elif [ "$1" = "clean" ]; then
	rm -rf "$OUTDIR"/*.tmp "$OUTDIR"/*.o "$OUTDIR"/redo "$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"
	ln -sf "$DESTDIR/redo" "$DESTDIR/redo-ifchange"
	ln -sf "$DESTDIR/redo" "$DESTDIR/redo-ifcreate"
	ln -sf "$DESTDIR/redo" "$DESTDIR/redo-always"
	ln -sf "$DESTDIR/redo" "$DESTDIR/redo-stamp"
	echo "Finished installing."
fi