summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-03-29 12:55:02 +0200
committerAttila Molnar <attilamolnar@hush.com>2016-03-29 12:55:02 +0200
commita785f350fd584d87f3b84bbaff569ecb59c29f04 (patch)
tree5456dbc199c66d4b8bf2b07f5a459fe3e98e68c6 /make
parent571714e28b26cc59cbc8d27098a5ba981240ee2d (diff)
parenteced5062205cb9c2ae4af5ca0972340059ae3363 (diff)
Merge pull request #1162 from SaberUK/insp20+fix-deinstall
[2.0] Delete modules cautiously when doing a deinstall.
Diffstat (limited to 'make')
-rw-r--r--make/template/main.mk39
1 files changed, 20 insertions, 19 deletions
diff --git a/make/template/main.mk b/make/template/main.mk
index c044bdaaa..08787a1bf 100644
--- a/make/template/main.mk
+++ b/make/template/main.mk
@@ -220,22 +220,22 @@ install: target
echo ""; \
exit 1; \
fi
- @-$(INSTALL) -d -o $(INSTUID) -m $(INSTMODE_DIR) "$(BASE)"
- @-$(INSTALL) -d -o $(INSTUID) -m $(INSTMODE_DIR) "$(DATPATH)"
- @-$(INSTALL) -d -o $(INSTUID) -m $(INSTMODE_DIR) "$(LOGPATH)"
- @-$(INSTALL) -d -m $(INSTMODE_DIR) "$(BINPATH)"
- @-$(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)"
+ @-$(INSTALL) -d -o $(INSTUID) -m $(INSTMODE_DIR) $(BASE)
+ @-$(INSTALL) -d -o $(INSTUID) -m $(INSTMODE_DIR) $(DATPATH)
+ @-$(INSTALL) -d -o $(INSTUID) -m $(INSTMODE_DIR) $(LOGPATH)
+ @-$(INSTALL) -d -m $(INSTMODE_DIR) $(BINPATH)
+ @-$(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)
@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
- -$(INSTALL) -m $(INSTMODE_LIB) docs/conf/*.example "$(CONPATH)/examples"
- -$(INSTALL) -m $(INSTMODE_LIB) docs/conf/aliases/*.example "$(CONPATH)/examples/aliases"
- -$(INSTALL) -m $(INSTMODE_LIB) docs/conf/modules/*.example "$(CONPATH)/examples/modules"
+ -$(INSTALL) -m $(INSTMODE_BIN) @STARTSCRIPT@ $(BASE) 2>/dev/null
+ -$(INSTALL) -m $(INSTMODE_LIB) tools/gdbargs $(BASE)/.gdbargs 2>/dev/null
+ -$(INSTALL) -m $(INSTMODE_LIB) docs/conf/*.example $(CONPATH)/examples
+ -$(INSTALL) -m $(INSTMODE_LIB) docs/conf/aliases/*.example $(CONPATH)/examples/aliases
+ -$(INSTALL) -m $(INSTMODE_LIB) docs/conf/modules/*.example $(CONPATH)/examples/modules
@echo ""
@echo "*************************************"
@echo "* INSTALL COMPLETE! *"
@@ -265,11 +265,12 @@ clean:
@echo Completed.
deinstall:
- -rm -f "$(BINPATH)/inspircd"
- -rm -rf "$(CONPATH)/examples"
- -rm -f "$(MODPATH)/*.so"
- -rm -f "$(BASE)/.gdbargs"
- -rm -f "$(BASE)/org.inspircd.plist"
+ -rm -f $(BINPATH)/inspircd
+ -rm -rf $(CONPATH)/examples
+ -rm -f $(MODPATH)/cmd_*.so
+ -rm -f $(MODPATH)/m_*.so
+ -rm -f $(BASE)/.gdbargs
+ -rm -f $(BASE)/org.inspircd.plist
squeakyclean: distclean