summaryrefslogtreecommitdiff
path: root/make/template/main.mk
diff options
context:
space:
mode:
Diffstat (limited to 'make/template/main.mk')
-rw-r--r--make/template/main.mk25
1 files changed, 20 insertions, 5 deletions
diff --git a/make/template/main.mk b/make/template/main.mk
index 5806d568a..b4d77e4e6 100644
--- a/make/template/main.mk
+++ b/make/template/main.mk
@@ -43,6 +43,7 @@ CORELDFLAGS = -rdynamic -L. $(LDFLAGS)
PICLDFLAGS = -fPIC -shared -rdynamic $(LDFLAGS)
BASE = "$(DESTDIR)@BASE_DIR@"
CONPATH = "$(DESTDIR)@CONFIG_DIR@"
+MANPATH = "$(DESTDIR)@MANUAL_DIR@"
MODPATH = "$(DESTDIR)@MODULE_DIR@"
DATPATH = "$(DESTDIR)@DATA_DIR@"
BINPATH = "$(DESTDIR)@BINARY_DIR@"
@@ -53,7 +54,10 @@ INSTMODE_BIN = 0750
INSTMODE_LIB = 0640
@IFNEQ $(COMPILER) ICC
- CORECXXFLAGS += -pedantic -Woverloaded-virtual -Wshadow -Wformat=2 -Wmissing-format-attribute
+ CORECXXFLAGS += -Woverloaded-virtual -Wshadow
+@IFNEQ $(SYSTEM) openbsd
+ CORECXXFLAGS += -pedantic -Wformat=2 -Wmissing-format-attribute
+@ENDIF
@ENDIF
@IFNEQ $(SYSTEM)-$(COMPILER) darwin-GCC
@@ -225,6 +229,7 @@ install: target
@-$(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) $(MANPATH)
@-$(INSTALL) -d -m $(INSTMODE_DIR) $(MODPATH)
[ $(BUILDPATH)/bin/ -ef $(BINPATH) ] || $(INSTALL) -m $(INSTMODE_BIN) $(BUILDPATH)/bin/inspircd $(BINPATH)
@IFNDEF PURE_STATIC
@@ -238,10 +243,11 @@ install: target
@IFEQ $(SYSTEM) linux
-$(INSTALL) -m $(INSTMODE_LIB) inspircd.service $(BASE) 2>/dev/null
@ENDIF
- -$(INSTALL) -m $(INSTMODE_LIB) inspircd.1 $(BASE) 2>/dev/null
- -$(INSTALL) -m $(INSTMODE_LIB) inspircd-genssl.1 $(BASE) 2>/dev/null
+ -$(INSTALL) -m $(INSTMODE_LIB) inspircd.1 $(MANPATH) 2>/dev/null
+ -$(INSTALL) -m $(INSTMODE_LIB) inspircd-genssl.1 $(MANPATH) 2>/dev/null
-$(INSTALL) -m $(INSTMODE_BIN) tools/genssl $(BINPATH)/inspircd-genssl 2>/dev/null
-$(INSTALL) -m $(INSTMODE_LIB) docs/conf/*.example $(CONPATH)/examples
+ -$(INSTALL) -m $(INSTMODE_LIB) *.pem $(CONPATH)
-$(INSTALL) -m $(INSTMODE_LIB) docs/conf/aliases/*.example $(CONPATH)/examples/aliases
-$(INSTALL) -m $(INSTMODE_LIB) docs/conf/modules/*.example $(CONPATH)/examples/modules
@echo ""
@@ -258,7 +264,10 @@ install: target
@echo 'Remember to create your config file:' $(CONPATH)/inspircd.conf
@echo 'Examples are available at:' $(CONPATH)/examples/
-GNUmakefile BSDmakefile: make/template/main.mk src/version.sh configure .config.cache
+@TARGET BSD_MAKE CONFIGURE_CACHE_FILE = @CONFIGURE_CACHE_FILE@
+@TARGET GNU_MAKE CONFIGURE_CACHE_FILE = $(wildcard @CONFIGURE_CACHE_FILE@)
+
+GNUmakefile BSDmakefile: make/template/main.mk src/version.sh configure $(CONFIGURE_CACHE_FILE)
./configure -update
@TARGET BSD_MAKE .MAKEFILEDEPS: BSDmakefile
@@ -273,17 +282,23 @@ clean:
deinstall:
-rm -f $(BINPATH)/inspircd
-rm -rf $(CONPATH)/examples
+ -rm -f $(MANPATH)/inspircd.1
+ -rm -f $(MANPATH)/inspircd-genssl.1
-rm -f $(MODPATH)/*.so
-rm -f $(BASE)/.gdbargs
+ -rm -f $(BASE)/inspircd.service
-rm -f $(BASE)/org.inspircd.plist
configureclean:
- rm -f .config.cache
rm -f BSDmakefile
rm -f GNUmakefile
rm -f include/config.h
rm -f inspircd
+ rm -f inspircd.1
+ rm -f inspircd-genssl.1
+ -rm -f inspircd.service
-rm -f org.inspircd.plist
+ -rm -f @CONFIGURE_CACHE_FILE@
distclean: clean configureclean
-rm -rf $(SOURCEPATH)/run