From: Ross S. W. W. <RW...@me...> - 2010-06-29 21:26:23
|
To be more standard this patch changes all instances of DISTDIR to DESTDIR in Makefile. Signed-off-by: Ross Walker Index: Makefile =================================================================== --- Makefile (revision 339) +++ Makefile (working copy) @@ -209,8 +209,8 @@ unpatch: depmod: @echo "Running depmod" - @if [ x$(DISTDIR) != x -o x$(INSTALL_MOD_PATH) != x ]; then \ - depmod -aq -b $(DISTDIR)$(INSTALL_MOD_PATH) $(KVER); \ + @if [ x$(DESTDIR) != x -o x$(INSTALL_MOD_PATH) != x ]; then \ + depmod -aq -b $(DESTDIR)$(INSTALL_MOD_PATH) $(KVER); \ else \ depmod -aq $(KVER); \ fi @@ -220,60 +220,60 @@ install-files: install-usr install-etc i install: install-files depmod install-kernel: kernel/iscsi_trgt.ko - @if [ -d $(DISTDIR)$(INSTALL_MOD_PATH)/lib/modules/$(KVER) ]; then \ + @if [ -d $(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/$(KVER) ]; then \ if [ -f /etc/debian_version ]; then \ - find $(DISTDIR)$(INSTALL_MOD_PATH)/lib/modules/$(KVER) \ + find $(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/$(KVER) \ -name iscsi_trgt.ko -type f \ -exec /bin/sh -c "dpkg-divert --rename {}" \;; \ else \ - find $(DISTDIR)$(INSTALL_MOD_PATH)/lib/modules/$(KVER) \ + find $(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/$(KVER) \ -name iscsi_trgt.ko -type f \ -execdir mv \{\} \{\}.orig \;; \ fi \ fi @install -vD kernel/iscsi_trgt.ko \ - $(DISTDIR)$(INSTALL_MOD_PATH)$(KMOD)/iscsi/iscsi_trgt.ko + $(DESTDIR)$(INSTALL_MOD_PATH)$(KMOD)/iscsi/iscsi_trgt.ko install-usr: usr/ietd usr/ietadm - @install -vD usr/ietd $(DISTDIR)/usr/sbin/ietd - @install -vD usr/ietadm $(DISTDIR)/usr/sbin/ietadm + @install -vD usr/ietd $(DESTDIR)/usr/sbin/ietd + @install -vD usr/ietadm $(DESTDIR)/usr/sbin/ietadm install-etc: install-initd - @if [ ! -e $(DISTDIR)/etc/ietd.conf ]; then \ - if [ ! -e $(DISTDIR)/etc/iet/ietd.conf ]; then \ + @if [ ! -e $(DESTDIR)/etc/ietd.conf ]; then \ + if [ ! -e $(DESTDIR)/etc/iet/ietd.conf ]; then \ install -vD -m 640 etc/ietd.conf \ - $(DISTDIR)/etc/iet/ietd.conf; \ + $(DESTDIR)/etc/iet/ietd.conf; \ fi \ fi - @if [ ! -e $(DISTDIR)/etc/initiators.allow ]; then \ - if [ ! -e $(DISTDIR)/etc/iet/initiators.allow ]; then \ + @if [ ! -e $(DESTDIR)/etc/initiators.allow ]; then \ + if [ ! -e $(DESTDIR)/etc/iet/initiators.allow ]; then \ install -vD -m 644 etc/initiators.allow \ - $(DISTDIR)/etc/iet/initiators.allow; \ + $(DESTDIR)/etc/iet/initiators.allow; \ fi \ fi - @if [ ! -e $(DISTDIR)/etc/targets.allow ]; then \ - if [ ! -e $(DISTDIR)/etc/iet/targets.allow ]; then \ + @if [ ! -e $(DESTDIR)/etc/targets.allow ]; then \ + if [ ! -e $(DESTDIR)/etc/iet/targets.allow ]; then \ install -vD -m 644 etc/targets.allow \ - $(DISTDIR)/etc/iet/targets.allow; \ + $(DESTDIR)/etc/iet/targets.allow; \ fi \ fi install-initd: @if [ -f /etc/debian_version ]; then \ install -vD -m 755 etc/initd/initd.debian \ - $(DISTDIR)/etc/init.d/iscsi-target; \ + $(DESTDIR)/etc/init.d/iscsi-target; \ elif [ -f /etc/redhat-release ]; then \ install -vD -m 755 etc/initd/initd.redhat \ - $(DISTDIR)/etc/init.d/iscsi-target; \ + $(DESTDIR)/etc/rc.d/init.d/iscsi-target; \ elif [ -f /etc/gentoo-release ]; then \ install -vD -m 755 etc/initd/initd.gentoo \ - $(DISTDIR)/etc/init.d/iscsi-target; \ + $(DESTDIR)/etc/init.d/iscsi-target; \ elif [ -f /etc/slackware-version ]; then \ install -vD -m 755 etc/initd/initd \ - $(DISTDIR)/etc/rc.d/iscsi-target; \ + $(DESTDIR)/etc/rc.d/iscsi-target; \ else \ install -vD -m 755 etc/initd/initd \ - $(DISTDIR)/etc/init.d/iscsi-target; \ + $(DESTDIR)/etc/init.d/iscsi-target; \ fi install-doc: install-man @@ -283,7 +283,7 @@ install-doc: install-man done ; $$ok @set -e; for f in $(DOCS) ; do \ install -v -D -m 644 $$f \ - $(DISTDIR)$(DOCDIR)/$$f ; \ + $(DESTDIR)$(DOCDIR)/$$f ; \ done install-man: @@ -294,50 +294,50 @@ install-man: @set -e; for f in $(MANPAGES) ; do \ s=$${f##*.}; \ install -v -D -m 644 doc/manpages/$$f \ - $(DISTDIR)$(MANDIR)/man$$s/$$f ; \ + $(DESTDIR)$(MANDIR)/man$$s/$$f ; \ done uninstall: uninstall-kernel depmod uninstall-usr uninstall-etc uninstall-doc uninstall-kernel: - rm -f $(DISTDIR)$(INSTALL_MOD_PATH)$(KMOD)/iscsi/iscsi_trgt.ko + rm -f $(DESTDIR)$(INSTALL_MOD_PATH)$(KMOD)/iscsi/iscsi_trgt.ko @if [ -f /etc/debian_version ]; then \ - find $(DISTDIR)$(INSTALL_MOD_PATH)/lib/modules/$(KVER) \ + find $(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/$(KVER) \ -name iscsi_trgt.ko.distrib -type f \ -exec /bin/sh -c "dpkg-divert --remove --rename \ \`dirname {}\`/iscsi_trgt.ko" \;; \ else \ - find $(DISTDIR)$(INSTALL_MOD_PATH)/lib/modules/$(KVER) \ + find $(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/$(KVER) \ -name iscsi_trgt.ko.orig -type f \ -execdir mv \{\} iscsi_trgt.ko \;; \ fi uninstall-usr: - @rm -f $(DISTDIR)/usr/sbin/ietd - @rm -f $(DISTDIR)/usr/sbin/ietadm + @rm -f $(DESTDIR)/usr/sbin/ietd + @rm -f $(DESTDIR)/usr/sbin/ietadm uninstall-etc: uninstall-initd uninstall-initd: if [ -f /etc/debian_version ]; then \ - rm -f $(DISTDIR)/etc/init.d/iscsi-target; \ + rm -f $(DESTDIR)/etc/init.d/iscsi-target; \ elif [ -f /etc/redhat-release ]; then \ - rm -f $(DISTDIR)/etc/init.d/iscsi-target; \ + rm -f $(DESTDIR)/etc/rc.d/init.d/iscsi-target; \ elif [ -f /etc/gentoo-release ]; then \ - rm -f $(DISTDIR)/etc/init.d/iscsi-target; \ + rm -f $(DESTDIR)/etc/init.d/iscsi-target; \ elif [ -f /etc/slackware-version ]; then \ - rm -f $(DISTDIR)/etc/rc.d/iscsi-target; \ + rm -f $(DESTDIR)/etc/rc.d/iscsi-target; \ else \ - rm -f $(DISTDIR)/etc/init.d/iscsi-target; \ + rm -f $(DESTDIR)/etc/init.d/iscsi-target; \ fi uninstall-doc: uninstall-man - rm -rf $(DISTDIR)$(DOCDIR) + rm -rf $(DESTDIR)$(DOCDIR) uninstall-man: set -e; for f in $(MANPAGES) ; do \ s=$${f##*.}; \ - rm -f $(DISTDIR)$(MANDIR)/man$$s/$$f ; \ + rm -f $(DESTDIR)$(MANDIR)/man$$s/$$f ; \ done clean: ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof. |