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
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
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"
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 ""
$MAKEPROG
echo ""
echo "Done!"
- echo ""
else
echo ""
- echo "Done!"
- echo ""
- echo -e "To build your server with these settings, please type '\033[1;32mmake\033[0;37m' now."
- echo ""
- echo -e "*** \033[1;32mRemember to edit your configuration files!!!\033[0;37m ***"
- echo ""
+ echo -e "To build your server with these settings, please type '\033[1;32m$MAKEPROG\033[0;37m' now."
fi
echo ""
-echo "Do you want to run the config file maker?"
-echo -e $n "[\033[1;32my\033[0;37m] $c"
-read YN
-if [ "$YN" != "n" ] ; then
- sh makeconf
-fi
-
echo -e "*** \033[1;32mRemember to edit your configuration files!!!\033[0;37m ***"
echo ""