aboutsummaryrefslogtreecommitdiffstats
path: root/default.do
blob: fec86a8473ada07356bff3a1ae6da45aa716d0e5 (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
#!/bin/sh -e
# 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}

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"
	echo "Finished installing."
fi