diff options
Diffstat (limited to 'make/template')
-rw-r--r-- | make/template/inspircd | 4 | ||||
-rw-r--r-- | make/template/main.mk | 32 |
2 files changed, 22 insertions, 14 deletions
diff --git a/make/template/inspircd b/make/template/inspircd index 7cd83a8e1..b43ad60c9 100644 --- a/make/template/inspircd +++ b/make/template/inspircd @@ -135,7 +135,7 @@ sub cmd_rehash() sub cmd_cron() { - if (getstatus() == 0) { goto &cmd_start(); } + if (getstatus() == 0) { goto &cmd_start(@_); } exit(); } @@ -149,7 +149,7 @@ sub cmd_restart(@) { cmd_stop(); unlink($pidfile) if (-e $pidfile); - goto &cmd_start; + goto &cmd_start(@_); } sub hid_cheese_sandwich() diff --git a/make/template/main.mk b/make/template/main.mk index 1dff0fc20..23daa7efc 100644 --- a/make/template/main.mk +++ b/make/template/main.mk @@ -89,6 +89,11 @@ INSTMODE_LIB = 0644 D=0 @ENDIF +GCC6=@GCC6@ +@IFEQ $(GCC6) true + CXXFLAGS += -fno-delete-null-pointer-checks +@ENDIF + DBGOK=0 @IFEQ $(D) 0 CXXFLAGS += -O2 @@ -124,8 +129,8 @@ CXXFLAGS += -Iinclude @ELSE @GNU_ONLY MAKEFLAGS += --silent @BSD_ONLY MAKE += -s - RUNCC = perl $(SOURCEPATH)/make/run-cc.pl $(CC) - RUNLD = perl $(SOURCEPATH)/make/run-cc.pl $(CC) + RUNCC = perl "$(SOURCEPATH)/make/run-cc.pl" $(CC) + RUNLD = perl "$(SOURCEPATH)/make/run-cc.pl" $(CC) VERBOSE = @ENDIF @@ -160,7 +165,7 @@ all: $(FOOTER) target: $(HEADER) $(MAKEENV) perl make/calcdep.pl - cd $(BUILDPATH); $(MAKEENV) $(MAKE) -f real.mk $(TARGET) + cd "$(BUILDPATH)"; $(MAKEENV) $(MAKE) -f real.mk $(TARGET) debug: @${MAKE} D=1 all @@ -227,9 +232,9 @@ install: target @-$(INSTALL) -d -m $(INSTMODE_DIR) $(CONPATH)/examples/aliases @-$(INSTALL) -d -m $(INSTMODE_DIR) $(CONPATH)/examples/modules @-$(INSTALL) -d -m $(INSTMODE_DIR) $(MODPATH) - [ $(BUILDPATH)/bin/ -ef $(BINPATH) ] || $(INSTALL) -m $(INSTMODE_BIN) $(BUILDPATH)/bin/inspircd $(BINPATH) + [ "$(BUILDPATH)/bin/" -ef $(BINPATH) ] || $(INSTALL) -m $(INSTMODE_BIN) "$(BUILDPATH)/bin/inspircd" $(BINPATH) @IFNDEF PURE_STATIC - [ $(BUILDPATH)/modules/ -ef $(MODPATH) ] || $(INSTALL) -m $(INSTMODE_LIB) $(BUILDPATH)/modules/*.so $(MODPATH) + [ "$(BUILDPATH)/modules/" -ef $(MODPATH) ] || $(INSTALL) -m $(INSTMODE_LIB) "$(BUILDPATH)/modules/"*.so $(MODPATH) @ENDIF -$(INSTALL) -m $(INSTMODE_BIN) @STARTSCRIPT@ $(BASE) 2>/dev/null -$(INSTALL) -m $(INSTMODE_LIB) tools/gdbargs $(BASE)/.gdbargs 2>/dev/null @@ -258,16 +263,17 @@ GNUmakefile BSDmakefile: make/template/main.mk configure $(RCS_FILES) clean: @echo Cleaning... - -rm -f $(BUILDPATH)/bin/inspircd $(BUILDPATH)/include $(BUILDPATH)/real.mk - -rm -rf $(BUILDPATH)/obj $(BUILDPATH)/modules - @-rmdir $(BUILDPATH)/bin 2>/dev/null - @-rmdir $(BUILDPATH) 2>/dev/null + -rm -f "$(BUILDPATH)/bin/inspircd" "$(BUILDPATH)/include" "$(BUILDPATH)/real.mk" + -rm -rf "$(BUILDPATH)/obj" "$(BUILDPATH)/modules" + @-rmdir "$(BUILDPATH)/bin" 2>/dev/null + @-rmdir "$(BUILDPATH)" 2>/dev/null @echo Completed. deinstall: -rm -f $(BINPATH)/inspircd -rm -rf $(CONPATH)/examples - -rm -f $(MODPATH)/*.so + -rm -f $(MODPATH)/cmd_*.so + -rm -f $(MODPATH)/m_*.so -rm -f $(BASE)/.gdbargs -rm -f $(BASE)/org.inspircd.plist @@ -283,8 +289,8 @@ configureclean: -rm -f org.inspircd.plist distclean: clean configureclean - -rm -rf $(SOURCEPATH)/run - find $(SOURCEPATH)/src/modules -type l | xargs rm -f + -rm -rf "$(SOURCEPATH)/run" + find "$(SOURCEPATH)/src/modules" -type l | xargs rm -f help: @echo 'InspIRCd Makefile' @@ -314,4 +320,6 @@ help: @echo ' deinstall Removes the files created by "make install"' @echo +.NOTPARALLEL: + .PHONY: all target debug debug-header mod-header mod-footer std-header finishmessage install clean deinstall squeakyclean configureclean help |