mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-12 15:34:47 +02:00
Add BSDmakefile with a note to run 'gmake' for BSD users.
Also, check for GNU make (which can be either 'make' or 'gmake') early in ./Config and print out an error to install prerequisites from https://www.unrealircd.org/docs/Installing_from_source This also replaces 'make' with ${MAKE} (and such) everywhere.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
.DONE:
|
||||
@echo "Please use GNU Make (gmake) to build UnrealIRCd"
|
||||
.DEFAULT:
|
||||
@echo "Please use GNU Make (gmake) to build UnrealIRCd"
|
||||
@@ -158,7 +158,7 @@ if [ "$QUICK" != "1" ] ; then
|
||||
echo "*******************************************************************************"
|
||||
echo "Press ENTER to continue"
|
||||
read cc
|
||||
make pem
|
||||
$MAKE pem
|
||||
echo "Certificate created successfully."
|
||||
sleep 1
|
||||
else
|
||||
@@ -173,7 +173,7 @@ fi
|
||||
# Silently force a 'make clean' as otherwise part (or whole) of the
|
||||
# compiled source could be using different settings than the user
|
||||
# just requested when re-running ./Config.
|
||||
make clean 1>/dev/null 2>&1
|
||||
$MAKE clean 1>/dev/null 2>&1
|
||||
}
|
||||
|
||||
RUN_ADVANCED () {
|
||||
@@ -333,6 +333,33 @@ if [ "`id -u`" = "0" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
# Check for gmake early...
|
||||
if [ "$MAKE" = "" ]; then
|
||||
MAKE="make"
|
||||
fi
|
||||
|
||||
if ! $MAKE --version 2>&1|grep -q "GNU Make"; then
|
||||
# So $MAKE is not GNU make, but do we have gmake?
|
||||
if gmake --version 2>&1|grep -q "GNU Make"; then
|
||||
# Great, use that one!
|
||||
MAKE="gmake"
|
||||
else
|
||||
# Both $MAKE and gmake are not GNU make, do we have a working $MAKE at all?
|
||||
if $MAKE --version 1>/dev/null 2>&1; then
|
||||
echo "Your system has 'make' but UnrealIRCd requires GNU Make ('gmake')"
|
||||
echo "Please install 'gmake' (eg 'pkg install gmake' on BSD)."
|
||||
exit 1
|
||||
else
|
||||
echo "Your system does not have the required tools installed to build UnrealIRCd."
|
||||
echo "Please check https://www.unrealircd.org/docs/Installing_from_source"
|
||||
echo "and install the required tools listed under 'Prerequisites'."
|
||||
echo "After that, you can run ./Config again"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
clear
|
||||
|
||||
if [ -f "doc/Config.header" -a -z "$NOINTRO" ] ; then
|
||||
@@ -808,7 +835,7 @@ cat << __EOF__
|
||||
|_______________________________________________________________________|
|
||||
|_______________________________________________________________________|
|
||||
| |
|
||||
| Now all you have to do is type 'make' and let it compile. When that's |
|
||||
| Now all you have to do is type '$MAKE' and let it compile. When that's |
|
||||
| done, you will receive other instructions on what to do next. |
|
||||
| |
|
||||
|_______________________________________________________________________|
|
||||
|
||||
+1
-1
@@ -148,7 +148,7 @@ build: Makefile
|
||||
done
|
||||
@echo ''
|
||||
@echo '* UnrealIRCd compiled successfully'
|
||||
@echo '* YOU ARE NOT DONE YET! Run "make install" to install UnrealIRCd !'
|
||||
@echo '* YOU ARE NOT DONE YET! Run "${MAKE} install" to install UnrealIRCd !'
|
||||
@echo ''
|
||||
|
||||
clean:
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ version.c: version.c.SH
|
||||
|
||||
clean:
|
||||
$(RM) -f *.o *.so *~ core ircd version.c; \
|
||||
cd modules; make clean
|
||||
cd modules; ${MAKE} clean
|
||||
|
||||
cleandir: clean
|
||||
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
MAKE="$1"
|
||||
echo ""
|
||||
echo "Checking for updates for third party modules..."
|
||||
# We can't use the "unrealircd" script, since possibly the ircd
|
||||
@@ -13,7 +14,7 @@ if [ "$x" != "*.c" ]; then
|
||||
x="`echo $x|sed 's/\.c//'`"
|
||||
if [ ! -f $x.so -o $x.c -nt $x.so ]; then
|
||||
echo "Building 3rd party module $x..."
|
||||
make custommodule MODULEFILE=$x || (echo "*****"; echo "Building 3rd party module $x failed."; echo "Contact the module author of the $x module (not the UnrealIRCd team), or simply delete the $PWD/$x.c file"; echo "*****"; exit 1)
|
||||
$MAKE custommodule MODULEFILE=$x || (echo "*****"; echo "Building 3rd party module $x failed."; echo "Contact the module author of the $x module (not the UnrealIRCd team), or simply delete the $PWD/$x.c file"; echo "*****"; exit 1)
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -40,7 +40,7 @@ RM=@RM@
|
||||
all: build
|
||||
|
||||
build:
|
||||
../../buildmod
|
||||
../../buildmod $(MAKE)
|
||||
|
||||
custommodule: $(MODULEFILE).c
|
||||
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
|
||||
|
||||
Reference in New Issue
Block a user