summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure3
-rw-r--r--make/template/main.mk20
2 files changed, 12 insertions, 11 deletions
diff --git a/configure b/configure
index 225187c87..30b8ddf85 100755
--- a/configure
+++ b/configure
@@ -225,7 +225,6 @@ $config{OSNAME} = $^O; # Operating System Name
$config{IS_DARWIN} = "NO"; # Is OSX?
$config{STARTSCRIPT} = "inspircd"; # start script?
$config{DESTINATION} = "BASE"; # Is target path.
-$config{EXTRA_DIR} = ""; # Is empty.
if ($config{OSNAME} =~ /darwin/i)
{
$config{IS_DARWIN} = "YES";
@@ -1047,7 +1046,7 @@ EOF
for my $var (qw(
CC SYSTEM BASE_DIR CONFIG_DIR MODULE_DIR BINARY_DIR BUILD_DIR UID
- STARTSCRIPT DESTINATION EXTRA_DIR SOCKETENGINE
+ STARTSCRIPT DESTINATION SOCKETENGINE
)) {
s/\@$var\@/$config{$var}/g;
}
diff --git a/make/template/main.mk b/make/template/main.mk
index d9b57a17b..301bc4199 100644
--- a/make/template/main.mk
+++ b/make/template/main.mk
@@ -20,10 +20,10 @@ LDFLAGS =
SHARED = -shared -rdynamic
CORELDFLAGS = -rdynamic -L. $(LDFLAGS)
PICLDFLAGS = -fPIC -shared -rdynamic $(LDFLAGS)
-BASE = "@BASE_DIR@"
-CONPATH = "@CONFIG_DIR@"
-MODPATH = "@MODULE_DIR@"
-BINPATH = "@BINARY_DIR@"
+BASE = "$(DESTDIR)@BASE_DIR@"
+CONPATH = "$(DESTDIR)@CONFIG_DIR@"
+MODPATH = "$(DESTDIR)@MODULE_DIR@"
+BINPATH = "$(DESTDIR)@BINARY_DIR@"
INSTUID = @UID@
INSTMODE_DIR = 0755
INSTMODE_BIN = 0755
@@ -157,7 +157,7 @@ finishmessage: target
@echo "* make install *"
@echo "*************************************"
-install: target@EXTRA_DIR@
+install: target
@if [ $(INSTUID) = 0 ]; then echo "You must specify a non-root uid for the server"; exit 1; fi
@-install -d -o $(INSTUID) -m $(INSTMODE_DIR) $(BASE)
@-install -d -o $(INSTUID) -m $(INSTMODE_DIR) $(BASE)/data
@@ -165,9 +165,9 @@ install: target@EXTRA_DIR@
@-install -d -m $(INSTMODE_DIR) $(BINPATH)
@-install -d -m $(INSTMODE_DIR) $(CONPATH)
@-install -d -m $(INSTMODE_DIR) $(MODPATH)
+ install -m $(INSTMODE_BIN) $(BUILDPATH)/bin/inspircd $(BINPATH)
+ install -m $(INSTMODE_LIB) $(BUILDPATH)/modules/*.so $(MODPATH)
-install -m $(INSTMODE_BIN) @STARTSCRIPT@ $(BASE) 2>/dev/null
- -install -m $(INSTMODE_BIN) $(BUILDPATH)/bin/inspircd $(BINPATH)
- -install -m $(INSTMODE_LIB) $(BUILDPATH)/modules/*.so $(MODPATH)
-install -m $(INSTMODE_LIB) tools/gdbargs $(BASE)/.gdbargs 2>/dev/null
-install -m $(INSTMODE_LIB) docs/*.example $(CONPATH)
@echo ""
@@ -221,10 +221,12 @@ help:
@echo 'Flags:'
@echo ' V=1 Show the full command being executed instead of "BUILD: dns.cpp"'
@echo ' D=1 Enable debug build, for module development or crash tracing'
+ @echo ' D=2 Enable debug build with optimizations, for detailed backtraces'
+ @echo ' DESTDIR= Specify a destination root directory (for tarball creation)'
@echo ' -j <N> Run a parallel build using N jobs'
@echo ''
- @echo 'User targets:'
- @echo ' all Complete build of InspIRCd, without installing'
+ @echo 'Targets:'
+ @echo ' all Complete build of InspIRCd, without installing (default)'
@echo ' install Build and install InspIRCd to the directory chosen in ./configure'
@echo ' Currently installs to ${BASE}'
@echo ' debug Compile a debug build. Equivalent to "make D=1 all"'