diff options
author | Marius Halden <marius.h@lden.org> | 2016-04-29 14:48:32 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2016-05-07 14:31:03 +0200 |
commit | 429b8ba306b7781f344fd5a3f5cf44515729a7fe (patch) | |
tree | b45c9db9df8d2072cf96d70ccb1fad87695d4eef | |
parent | c7caa906d60c7bebf2af7ce43fb375709e36da3f (diff) |
Configure option for install-dev and install config sample automatically
-rw-r--r-- | Makefile | 20 | ||||
-rwxr-xr-x | configure | 6 |
2 files changed, 22 insertions, 4 deletions
@@ -25,10 +25,14 @@ ifdef DOC $(MAKE) -C doc endif -uninstall: uninstall-bin uninstall-doc +ifdef DEVEL +INSTALL_DEV = install-dev +UNINSTALL_DEV = uninstall-dev +endif +uninstall: uninstall-bin uninstall-doc $(UNINSTALL_DEV) @echo -e '\nmake uninstall does not remove files in '$(DESTDIR)$(ETCDIR)', you can use make uninstall-etc to do that.\n' -install: install-bin install-doc install-plugins +install: install-bin install-doc install-plugins install-etc $(INSTALL_DEV) @echo @echo Installed successfully @echo @@ -111,12 +115,20 @@ uninstall-dev: install-etc: mkdir -p $(DESTDIR)$(ETCDIR) - $(INSTALL) -m 0644 $(_SRCDIR_)motd.txt $(DESTDIR)$(ETCDIR)/motd.txt - $(INSTALL) -m 0644 $(_SRCDIR_)bitlbee.conf $(DESTDIR)$(ETCDIR)/bitlbee.conf + $(INSTALL) -m 0644 $(_SRCDIR_)motd.txt $(DESTDIR)$(ETCDIR)/motd.txt.sample + $(INSTALL) -m 0644 $(_SRCDIR_)bitlbee.conf $(DESTDIR)$(ETCDIR)/bitlbee.conf.sample + @if ! [ -e $(DESTDIR)$(ETCDIR)/motd.txt ]; then \ + $(INSTALL) -m 0644 $(_SRCDIR_)motd.txt $(DESTDIR)$(ETCDIR)/motd.txt; \ + fi + @if ! [ -e $(DESTDIR)$(ETCDIR)/bitlbee.conf ]; then \ + $(INSTALL) -m 0644 $(_SRCDIR_)bitlbee.conf $(DESTDIR)$(ETCDIR)/bitlbee.conf; \ + fi uninstall-etc: rm -f $(DESTDIR)$(ETCDIR)/motd.txt + rm -f $(DESTDIR)$(ETCDIR)/motd.txt.sample rm -f $(DESTDIR)$(ETCDIR)/bitlbee.conf + rm -f $(DESTDIR)$(ETCDIR)/bitlbee.conf.sample -rmdir $(DESTDIR)$(ETCDIR) install-plugins: install-plugin-otr install-plugin-skype @@ -47,6 +47,7 @@ asan=0 plugins=1 otr=0 skype=0 +devel=0 events=glib ssl=auto @@ -150,6 +151,7 @@ Option Description Default Disable/enable OTR encryption support $otr --skype=0/1/plugin Disable/enable Skype support $skype +--devel=0/1 Disable/enable header install $devel --events=... Event handler (glib, libevent) $events --ssl=... SSL library to use (gnutls, nss, openssl, auto) @@ -296,6 +298,10 @@ else [ -z "$CFLAGS" ] && CFLAGS="-O2 -fno-strict-aliasing" fi +if [ "$devel" = "1" ]; then + echo 'DEVEL=1' >> Makefile.settings +fi + if [ "$pie" = "1" ]; then echo 'CFLAGS_BITLBEE=-fPIE' >> Makefile.settings echo 'LDFLAGS_BITLBEE=-pie' >> Makefile.settings |