mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-12 17:14:46 +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 "*******************************************************************************"
|
||||||
echo "Press ENTER to continue"
|
echo "Press ENTER to continue"
|
||||||
read cc
|
read cc
|
||||||
make pem
|
$MAKE pem
|
||||||
echo "Certificate created successfully."
|
echo "Certificate created successfully."
|
||||||
sleep 1
|
sleep 1
|
||||||
else
|
else
|
||||||
@@ -173,7 +173,7 @@ fi
|
|||||||
# Silently force a 'make clean' as otherwise part (or whole) of the
|
# Silently force a 'make clean' as otherwise part (or whole) of the
|
||||||
# compiled source could be using different settings than the user
|
# compiled source could be using different settings than the user
|
||||||
# just requested when re-running ./Config.
|
# just requested when re-running ./Config.
|
||||||
make clean 1>/dev/null 2>&1
|
$MAKE clean 1>/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
RUN_ADVANCED () {
|
RUN_ADVANCED () {
|
||||||
@@ -333,6 +333,33 @@ if [ "`id -u`" = "0" ]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
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
|
clear
|
||||||
|
|
||||||
if [ -f "doc/Config.header" -a -z "$NOINTRO" ] ; then
|
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. |
|
| done, you will receive other instructions on what to do next. |
|
||||||
| |
|
| |
|
||||||
|_______________________________________________________________________|
|
|_______________________________________________________________________|
|
||||||
|
|||||||
+1
-1
@@ -148,7 +148,7 @@ build: Makefile
|
|||||||
done
|
done
|
||||||
@echo ''
|
@echo ''
|
||||||
@echo '* UnrealIRCd compiled successfully'
|
@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 ''
|
@echo ''
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
+1
-1
@@ -88,7 +88,7 @@ version.c: version.c.SH
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) -f *.o *.so *~ core ircd version.c; \
|
$(RM) -f *.o *.so *~ core ircd version.c; \
|
||||||
cd modules; make clean
|
cd modules; ${MAKE} clean
|
||||||
|
|
||||||
cleandir: clean
|
cleandir: clean
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -1,4 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
MAKE="$1"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Checking for updates for third party modules..."
|
echo "Checking for updates for third party modules..."
|
||||||
# We can't use the "unrealircd" script, since possibly the ircd
|
# 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//'`"
|
x="`echo $x|sed 's/\.c//'`"
|
||||||
if [ ! -f $x.so -o $x.c -nt $x.so ]; then
|
if [ ! -f $x.so -o $x.c -nt $x.so ]; then
|
||||||
echo "Building 3rd party module $x..."
|
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
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ RM=@RM@
|
|||||||
all: build
|
all: build
|
||||||
|
|
||||||
build:
|
build:
|
||||||
../../buildmod
|
../../buildmod $(MAKE)
|
||||||
|
|
||||||
custommodule: $(MODULEFILE).c
|
custommodule: $(MODULEFILE).c
|
||||||
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
|
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
|
||||||
|
|||||||
Reference in New Issue
Block a user