summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-09-07 14:30:32 +0100
committerPeter Powell <petpow@saberuk.com>2019-09-07 14:36:20 +0100
commit2648a0e1c4f4f2a6f975895bce639a37ed48e065 (patch)
treebfd451076342be595d5c7e224eff4d9fb8f899c6
parent1cf76f8aae0d2be86f85c7abfc3b885f2d6a6441 (diff)
Replace the gdbargs file with the --eval-command flag.
-rw-r--r--make/template/gdbargs4
-rw-r--r--make/template/inspircd11
-rw-r--r--make/template/main.mk3
3 files changed, 9 insertions, 9 deletions
diff --git a/make/template/gdbargs b/make/template/gdbargs
deleted file mode 100644
index de76c7270..000000000
--- a/make/template/gdbargs
+++ /dev/null
@@ -1,4 +0,0 @@
-%target .gdbargs
-handle SIGPIPE pass nostop noprint
-handle SIGHUP pass nostop noprint
-run
diff --git a/make/template/inspircd b/make/template/inspircd
index d0978ee29..4f352ddaf 100644
--- a/make/template/inspircd
+++ b/make/template/inspircd
@@ -59,6 +59,13 @@ my $executable = "inspircd";
my $version = "@VERSION_FULL@";
my $uid = "@UID@";
+my @gdbargs = (
+ '--eval-command', 'handle SIGPIPE pass nostop noprint',
+ '--eval-command', 'handle SIGHUP pass nostop noprint',
+ '--eval-command', 'run',
+ '--args', "$binpath/$executable", qw(--nofork --nolog --debug)
+);
+
sub expand_fragment($$) {
my ($base, $fragment) = @_;
if ($fragment =~ /^\//) {
@@ -213,7 +220,7 @@ sub dev_debug(@)
checkgdb();
# If we are still alive here.. Try starting the IRCd..
- exec 'gdb', "--command=$scriptpath/.gdbargs", '--args', "$binpath/$executable", qw(--nofork --debug), @_;
+ exec 'gdb', @gdbargs, @_;
die "Failed to start GDB: $!\n";
}
@@ -232,7 +239,7 @@ sub dev_screendebug(@)
# If we are still alive here.. Try starting the IRCd..
print "Starting InspIRCd in `screen`, type `screen -r` when the ircd crashes to view the gdb output and get a backtrace.\n";
print "Once you're inside the screen session press ^C + d to re-detach from the session\n";
- exec qw(screen -m -d gdb), "--command=$scriptpath/.gdbargs", '-args', "$binpath/$executable", qw(--nofork --debug --nolog), @_;
+ exec qw(screen -m -d gdb), @gdbargs, @_;
die "Failed to start screen: $!\n";
}
diff --git a/make/template/main.mk b/make/template/main.mk
index 3f0ba607b..748eae036 100644
--- a/make/template/main.mk
+++ b/make/template/main.mk
@@ -219,7 +219,6 @@ install: target
-$(INSTALL) -g @GID@ -o @UID@ -m $(INSTMODE_BIN) "$(BUILDPATH)/bin/inspircd" $(BINPATH)
-$(INSTALL) -g @GID@ -o @UID@ -m $(INSTMODE_BIN) "$(BUILDPATH)/modules/"*.so $(MODPATH)
-$(INSTALL) -g @GID@ -o @UID@ -m $(INSTMODE_BIN) @CONFIGURE_DIRECTORY@/inspircd $(SCRPATH) 2>/dev/null
- -$(INSTALL) -g @GID@ -o @UID@ -m $(INSTMODE_TXT) .gdbargs $(SCRPATH)/.gdbargs 2>/dev/null
ifeq ($(SYSTEM), darwin)
-$(INSTALL) -g @GID@ -o @UID@ -m $(INSTMODE_BIN) @CONFIGURE_DIRECTORY@/org.inspircd.plist $(SCRPATH) 2>/dev/null
endif
@@ -265,12 +264,10 @@ deinstall:
-rm -f $(MANPATH)/inspircd-genssl.1
-rm -f $(MODPATH)/m_*.so
-rm -f $(MODPATH)/core_*.so
- -rm -f $(SCRPATH)/.gdbargs
-rm -f $(SCRPATH)/inspircd.service
-rm -f $(SCRPATH)/org.inspircd.plist
configureclean:
- rm -f .gdbargs
-rm -f Makefile
rm -f GNUmakefile
rm -f include/config.h