Browse Source

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.
pull/12/head
Bram Matthys 10 months ago
parent
commit
4ef3b9f000
No known key found for this signature in database
GPG Key ID: BF8116B163EAAE98
  1. 4
      BSDmakefile
  2. 33
      Config
  3. 2
      Makefile.in
  4. 2
      src/Makefile.in
  5. 3
      src/buildmod
  6. 2
      src/modules/third/Makefile.in

4
BSDmakefile

@ -0,0 +1,4 @@
.DONE:
@echo "Please use GNU Make (gmake) to build UnrealIRCd"
.DEFAULT:
@echo "Please use GNU Make (gmake) to build UnrealIRCd"

33
Config

@ -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. |
| |
|_______________________________________________________________________|

2
Makefile.in

@ -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:

2
src/Makefile.in

@ -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

3
src/buildmod

@ -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

2
src/modules/third/Makefile.in

@ -40,7 +40,7 @@ RM=@RM@
all: build
build:
../../buildmod
../../buildmod $(MAKE)
custommodule: $(MODULEFILE).c
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \

Loading…
Cancel
Save