diff options
author | Peter Powell <petpow@saberuk.com> | 2019-07-03 10:53:21 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-07-03 10:53:21 +0100 |
commit | c9a812a5ccc5e2639ae4e1314f5f24b3d4518c68 (patch) | |
tree | 1d375a3a851e876b458521691a7d3d28c8c90411 /make/template/main.mk | |
parent | 25359c08847a447544b67d6c60d99ad48168ca5e (diff) |
Allow customising the example config directory at build time.
Fixes #1626.
Diffstat (limited to 'make/template/main.mk')
-rw-r--r-- | make/template/main.mk | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/make/template/main.mk b/make/template/main.mk index e39a24f87..d77d59fa5 100644 --- a/make/template/main.mk +++ b/make/template/main.mk @@ -38,14 +38,17 @@ CORECXXFLAGS = -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -pipe -Iinc LDLIBS = -lstdc++ CORELDFLAGS = -rdynamic -L. PICLDFLAGS = -fPIC -shared -rdynamic -BASE = "$(DESTDIR)@BASE_DIR@" + +BASE = "$(DESTDIR)@BASE_DIR@" +BINPATH = "$(DESTDIR)@BINARY_DIR@" CONPATH = "$(DESTDIR)@CONFIG_DIR@" +DATPATH = "$(DESTDIR)@DATA_DIR@" +EXAPATH = "$(DESTDIR)@EXAMPLE_DIR@" +LOGPATH = "$(DESTDIR)@LOG_DIR@" MANPATH = "$(DESTDIR)@MANUAL_DIR@" MODPATH = "$(DESTDIR)@MODULE_DIR@" -LOGPATH = "$(DESTDIR)@LOG_DIR@" -DATPATH = "$(DESTDIR)@DATA_DIR@" -BINPATH = "$(DESTDIR)@BINARY_DIR@" SCRPATH = "$(DESTDIR)@SCRIPT_DIR@" + INSTALL ?= install INSTMODE_DIR ?= 0755 INSTMODE_BIN ?= 0755 @@ -204,11 +207,12 @@ finishmessage: target install: target @-$(INSTALL) -d -g @GID@ -o @UID@ -m $(INSTMODE_DIR) $(BASE) + @-$(INSTALL) -d -g @GID@ -o @UID@ -m $(INSTMODE_DIR) $(BINPATH) + @-$(INSTALL) -d -g @GID@ -o @UID@ -m $(INSTMODE_DIR) $(CONPATH) @-$(INSTALL) -d -g @GID@ -o @UID@ -m $(INSTMODE_DIR) $(DATPATH) + @-$(INSTALL) -d -g @GID@ -o @UID@ -m $(INSTMODE_DIR) $(EXAPATH)/services + @-$(INSTALL) -d -g @GID@ -o @UID@ -m $(INSTMODE_DIR) $(EXAPATH)/sql @-$(INSTALL) -d -g @GID@ -o @UID@ -m $(INSTMODE_DIR) $(LOGPATH) - @-$(INSTALL) -d -g @GID@ -o @UID@ -m $(INSTMODE_DIR) $(BINPATH) - @-$(INSTALL) -d -g @GID@ -o @UID@ -m $(INSTMODE_DIR) $(CONPATH)/examples/services - @-$(INSTALL) -d -g @GID@ -o @UID@ -m $(INSTMODE_DIR) $(CONPATH)/examples/sql @-$(INSTALL) -d -g @GID@ -o @UID@ -m $(INSTMODE_DIR) $(MANPATH) @-$(INSTALL) -d -g @GID@ -o @UID@ -m $(INSTMODE_DIR) $(MODPATH) @-$(INSTALL) -d -g @GID@ -o @UID@ -m $(INSTMODE_DIR) $(SCRPATH) @@ -225,9 +229,9 @@ endif -$(INSTALL) -g @GID@ -o @UID@ -m $(INSTMODE_TXT) @CONFIGURE_DIRECTORY@/inspircd.1 $(MANPATH) 2>/dev/null -$(INSTALL) -g @GID@ -o @UID@ -m $(INSTMODE_TXT) @CONFIGURE_DIRECTORY@/inspircd-genssl.1 $(MANPATH) 2>/dev/null -$(INSTALL) -g @GID@ -o @UID@ -m $(INSTMODE_BIN) tools/genssl $(BINPATH)/inspircd-genssl 2>/dev/null - -$(INSTALL) -g @GID@ -o @UID@ -m $(INSTMODE_TXT) docs/conf/*.example $(CONPATH)/examples - -$(INSTALL) -g @GID@ -o @UID@ -m $(INSTMODE_TXT) docs/conf/services/*.example $(CONPATH)/examples/services - -$(INSTALL) -g @GID@ -o @UID@ -m $(INSTMODE_TXT) docs/sql/*.sql $(CONPATH)/examples/sql + -$(INSTALL) -g @GID@ -o @UID@ -m $(INSTMODE_TXT) docs/conf/*.example $(EXAPATH) + -$(INSTALL) -g @GID@ -o @UID@ -m $(INSTMODE_TXT) docs/conf/services/*.example $(EXAPATH)/services + -$(INSTALL) -g @GID@ -o @UID@ -m $(INSTMODE_TXT) docs/sql/*.sql $(EXAPATH)/sql -$(INSTALL) -g @GID@ -o @UID@ -m $(INSTMODE_PRV) *.pem $(CONPATH) 2>/dev/null @echo "" @echo "*************************************" @@ -241,7 +245,7 @@ endif @echo ' Data:' $(DATPATH) @echo 'To start the ircd, run:' $(SCRPATH)/inspircd start @echo 'Remember to create your config file:' $(CONPATH)/inspircd.conf - @echo 'Examples are available at:' $(CONPATH)/examples/ + @echo 'Examples are available at:' $(EXAPATH) GNUmakefile: make/template/main.mk src/version.sh configure @CONFIGURE_CACHE_FILE@ ./configure --update |