summaryrefslogtreecommitdiff
path: root/src/modules/configure
blob: 4ce3dbd3215b7bffae451a842f9d7fb7e3c87657 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh

echo -n "SRCS=" > ./Makefile.inc
FIRST=1

LS=`ls *.c 2>/dev/null | wc -l `
if [ "0" == "$LS" ] ; then
  echo "*** no modules found"
else
	for oldfile in *.c
	do
		if [ "$FIRST" = 1 ] ; then
			echo -n " "$oldfile >> ./Makefile.inc
		else
			echo "\\" >> ./Makefile.inc
			echo -n "     " $oldfile >> ./Makefile.inc
		fi
		FIRST=0
	done
fi

echo "" >> ./Makefile.inc

echo -n "SUBS=" >> ./Makefile.inc
FIRST=1
for dir in *
do
        if [ -d $dir ] ; then
		if [ -f $dir/Makefile ] ; then
			if [ "$FIRST" = 1 ] ; then
				echo -n " "$dir >> ./Makefile.inc
		        else
				echo "\\" >> ./Makefile.inc
				echo -n "     " $dir >> ./Makefile.inc
			fi
			FIRST=0
			if [ -f $dir/configure ] ; then
				$dir/configure
			fi
		fi
	fi
done

exit 0