Skip to content

Commit

Permalink
add DESTDIR support in Makefiles (Martin Hauke). Should make the distrib
Browse files Browse the repository at this point in the history
packaging easier.
  • Loading branch information
Tontonitch committed Jun 14, 2014
1 parent 7f5d967 commit ec29605
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 28 deletions.
10 changes: 5 additions & 5 deletions etc/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down Expand Up @@ -101,4 +101,4 @@ install-sudo-config:
echo ""; \
fi

fullinstall: install install-apache-config install-sudo-config
fullinstall: install install-apache-config install-sudo-config
6 changes: 3 additions & 3 deletions lib/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
fullinstall: install install-apache-config install-sudo-config
6 changes: 3 additions & 3 deletions libexec/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
fullinstall: install install-apache-config install-sudo-config
7 changes: 2 additions & 5 deletions sbin/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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



21 changes: 9 additions & 12 deletions share/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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



0 comments on commit ec29605

Please sign in to comment.