summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure35
1 files changed, 28 insertions, 7 deletions
diff --git a/configure b/configure
index afc228539..92acbf6a4 100755
--- a/configure
+++ b/configure
@@ -73,7 +73,19 @@ if [ "$1" = "-update" -o "$2" = "-update" ] ; then
done
# Write the new makefile.
- . .Makefile.inc
+ for file in Makefile; do
+ echo -e "\033[0;37mWriting \033[1;32m$file\033[0;37m"
+ rm -f $file
+ sed -e "
+ s%@MAKEPROG@%$MAKEPROG%g
+ s%@FLAGS@%$FLAGS%g
+ s%@LDLIBS@%$LDLIBS%g
+ s%@CONFIG_DIR@%$CONFIG_DIR%g
+ s%@MODULE_DIR@%$MODULE_DIR%g
+ s%@BINARY_DIR@%$BINARY_DIR%g
+ s%@MODULES@%$MODULES%g
+ " .${file}.inc >> $file
+ done
echo "Complete."
exit 1;
fi
@@ -430,7 +442,7 @@ echo "GCC34=\"$GCC34\"" >> .config.cache
echo "HAS_STRLCPY=\"$HAS_STRLCPY\"" >> .config.cache
echo "COPY_CONF=\"$COPY_CONF\"" >> .config.cache
-echo "Writing include/inspircd_config.h ..."
+echo -e "Writing \033[1;32minspircd_config.h"
echo "/* Auto generated by configure, do not modify! */" >include/inspircd_config.h
echo "" >>include/inspircd_config.h
@@ -458,8 +470,6 @@ echo "#define SYSTEM \"`uname -n -s -r`\"" >>include/inspircd_config.h
echo "#define MAXBUF 514">>include/inspircd_config.h
touch include/inspircd_config.h
-echo "Preparing Variables for the Makefile"
-
case "$OSNAME" in
FreeBSD)
LDLIBS="-Ldl"
@@ -479,10 +489,21 @@ for module in src/modules/*.cpp ; do
MODULES="$MODULES $mod"
done
-echo -e "Writing \033[1;37m$OSNAME\033[0;37m makefile"
-echo ""
+for file in Makefile inspircd; do
+ echo -e "\033[0;37mWriting \033[1;32m$file\033[0;37m"
+ rm -f $file
+ sed -e "
+ s%@MAKEPROG@%$MAKEPROG%g
+ s%@FLAGS@%$FLAGS%g
+ s%@LDLIBS@%$LDLIBS%g
+ s%@CONFIG_DIR@%$CONFIG_DIR%g
+ s%@MODULE_DIR@%$MODULE_DIR%g
+ s%@BINARY_DIR@%$BINARY_DIR%g
+ s%@MODULES@%$MODULES%g
+ " .${file}.inc >> $file
+done
-. .Makefile.inc
+`chmod 700 inspircd`
echo ""