From ec296053204f9a3c785cf50aa571db61427b4c9c Mon Sep 17 00:00:00 2001 From: Yannick Charton Date: Sat, 14 Jun 2014 18:10:01 +0200 Subject: [PATCH] add DESTDIR support in Makefiles (Martin Hauke). Should make the distrib packaging easier. --- etc/Makefile.in | 10 +++++----- lib/Makefile.in | 6 +++--- libexec/Makefile.in | 6 +++--- sbin/Makefile.in | 7 ++----- share/Makefile.in | 21 +++++++++------------ 5 files changed, 22 insertions(+), 28 deletions(-) diff --git a/etc/Makefile.in b/etc/Makefile.in index 040e012..d4aad30 100644 --- a/etc/Makefile.in +++ b/etc/Makefile.in @@ -41,12 +41,12 @@ distclean: clean -rm -f Makefile install: - $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(etcdir) - $(INSTALL) -m 644 $(INSTALL_OPTS) settings.cfg-sample $(etcdir)/settings.cfg-sample + $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(etcdir) + $(INSTALL) -m 644 $(INSTALL_OPTS) settings.cfg-sample $(DESTDIR)$(etcdir)/settings.cfg-sample install-apache-config: - $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(httpd_conf) - $(INSTALL) -m 644 interfacetable_v3t.conf.httpd $(httpd_conf)/interfacetable_v3t.conf + $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(httpd_conf) + $(INSTALL) -m 644 interfacetable_v3t.conf.httpd $(DESTDIR)$(httpd_conf)/interfacetable_v3t.conf @echo "" @echo "*** Apache config file installed. The apache service needs to be reloaded. ***" @echo "" @@ -101,4 +101,4 @@ install-sudo-config: echo ""; \ fi -fullinstall: install install-apache-config install-sudo-config \ No newline at end of file +fullinstall: install install-apache-config install-sudo-config diff --git a/lib/Makefile.in b/lib/Makefile.in index 7e9676d..3aee642 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -48,13 +48,13 @@ distclean: clean -rm -f Makefile install: - $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(libdir) + $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(libdir) for file in ./*.pm; \ - do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(libdir); done + do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(DESTDIR)$(libdir); done install-apache-config: install-sudo-config: -fullinstall: install install-apache-config install-sudo-config \ No newline at end of file +fullinstall: install install-apache-config install-sudo-config diff --git a/libexec/Makefile.in b/libexec/Makefile.in index b44da85..7c44823 100644 --- a/libexec/Makefile.in +++ b/libexec/Makefile.in @@ -46,11 +46,11 @@ distclean: clean -rm -f Makefile install: - $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(nagios_libexec) - $(INSTALL) -m 755 $(INSTALL_OPTS) check_interface_table_v3t.pl $(nagios_libexec)/check_interface_table_v3t.pl + $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(nagios_libexec) + $(INSTALL) -m 755 $(INSTALL_OPTS) check_interface_table_v3t.pl $(DESTDIR)$(nagios_libexec)/check_interface_table_v3t.pl install-apache-config: install-sudo-config: -fullinstall: install install-apache-config install-sudo-config \ No newline at end of file +fullinstall: install install-apache-config install-sudo-config diff --git a/sbin/Makefile.in b/sbin/Makefile.in index 31ed041..bb36fa2 100644 --- a/sbin/Makefile.in +++ b/sbin/Makefile.in @@ -46,14 +46,11 @@ distclean: clean -rm -f Makefile install: - $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(cgidir) - $(INSTALL) -m 755 $(INSTALL_OPTS) InterfaceTableReset_v3t.cgi $(cgidir)/InterfaceTableReset_v3t.cgi + $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(cgidir) + $(INSTALL) -m 755 $(INSTALL_OPTS) InterfaceTableReset_v3t.cgi $(DESTDIR)$(cgidir)/InterfaceTableReset_v3t.cgi install-apache-config: install-sudo-config: fullinstall: install install-apache-config install-sudo-config - - - \ No newline at end of file diff --git a/share/Makefile.in b/share/Makefile.in index 49a5e02..6b91e24 100644 --- a/share/Makefile.in +++ b/share/Makefile.in @@ -48,29 +48,26 @@ distclean: clean -rm -f Makefile install: - $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(sharedir) - $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(sharedir)/css - $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(sharedir)/img - $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(sharedir)/js - $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(sharedir)/tables + $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(sharedir) + $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(sharedir)/css + $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(sharedir)/img + $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(sharedir)/js + $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(sharedir)/tables for file in css/*; \ - do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(sharedir)/css; done + do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(DESTDIR)$(sharedir)/css; done for file in img/*; \ - do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(sharedir)/img; done + do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(DESTDIR)$(sharedir)/img; done for file in js/*; \ - do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(sharedir)/js; done + do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(DESTDIR)$(sharedir)/js; done for file in tables/*; \ - do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(sharedir)/tables; done + do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(DESTDIR)$(sharedir)/tables; done install-apache-config: install-sudo-config: fullinstall: install install-apache-config install-sudo-config - - - \ No newline at end of file