mirror of
https://github.com/anope/anope.git
synced 2026-06-26 14:36:38 +02:00
92f744e421
Also small fix to the Windows install.js call to CMake to include quotes around the source's path. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1949 5417fbe8-f217-4b02-8779-1006273d7864
66 lines
1.1 KiB
Bash
Executable File
66 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
oldpath=`pwd`
|
|
|
|
if [ $1 ]; then
|
|
cd $1
|
|
fi
|
|
|
|
echo2 () {
|
|
$ECHO2 "$*$ECHO2SUF" # these are defined later
|
|
}
|
|
|
|
ECHO2SUF=''
|
|
if [ "`echo -n a ; echo -n b`" = "ab" ] ; then
|
|
ECHO2='echo -n'
|
|
elif [ "`echo 'a\c' ; echo 'b\c'`" = "ab" ] ; then
|
|
ECHO2='echo' ; ECHO2SUF='\c'
|
|
elif [ "`printf 'a' 2>&1 ; printf 'b' 2>&1`" = "ab" ] ; then
|
|
ECHO2='printf "%s"'
|
|
else
|
|
# oh well...
|
|
ECHO2='echo'
|
|
fi
|
|
export ECHO2 ECHO2SUF
|
|
|
|
|
|
echo2 "SRCS=" > ./Makefile.inc
|
|
FIRST=1
|
|
for oldfile in `ls -1 *.c *.cpp`
|
|
do
|
|
if [ "$FIRST" = 1 ] ; then
|
|
echo2 " "$oldfile >> ./Makefile.inc
|
|
else
|
|
echo "\\" >> ./Makefile.inc
|
|
echo2 " " $oldfile >> ./Makefile.inc
|
|
fi
|
|
FIRST=0
|
|
done
|
|
echo "" >> ./Makefile.inc
|
|
|
|
echo2 "SUBS=" >> ./Makefile.inc
|
|
FIRST=1
|
|
for dir in *
|
|
do
|
|
if [ -d $dir ] ; then
|
|
if [ -f $dir/configure ] ; then
|
|
cd $dir
|
|
./configure
|
|
cd ..
|
|
fi
|
|
if [ -f $dir/Makefile ] ; then
|
|
if [ "$FIRST" = 1 ] ; then
|
|
echo2 " "$dir >> ./Makefile.inc
|
|
else
|
|
echo "\\" >> ./Makefile.inc
|
|
echo2 " " $dir >> ./Makefile.inc
|
|
fi
|
|
FIRST=0
|
|
fi
|
|
fi
|
|
done
|
|
|
|
cd $oldpath
|
|
|
|
exit 0
|