summaryrefslogtreecommitdiff
path: root/DevIL/autogen.sh
blob: 58e2301d7e8899e267ecff01d299ce08ee469cac (plain)
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
#!/bin/sh
# Author: Meloni Dario <mellon85 -at- gmail.com>

# use the -v flag to get all the output
if [ "$1" = "-v" ] ; then
	VERBOSE=yes
fi

log() {
	if [ "$VERBOSE" = "yes" ] ; then
		$1
		output=""
	else
		output=$($1 2>&1)
	fi
	
	# show output only in case of errors
	if [ $? -ne 0 ] ; then
		echo $output
		exit 1
	fi
}

log "aclocal -I ."
log "autoheader"
log "automake --foreign --include-deps --add-missing --copy"
log "autoconf"
exit 0