Skip to content

Commit

Permalink
Remove ${DESTDIR} from INSTALLDIR
Browse files Browse the repository at this point in the history
Instead, prepend ${DESTDIR} everywhere ${INSTALLDIR} is used.
  • Loading branch information
ryandesign committed Jun 2, 2018
1 parent 23ca18a commit 0e09a22
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 51 deletions.
26 changes: 13 additions & 13 deletions doc/Makefile.in
Expand Up @@ -106,7 +106,7 @@ MANXML= ${MANTXT:.txt=.xml}
MANHTML= ${MANTXT:.txt=.html} ${MANSOELIM:.soelim=.html}

CONF= archive_sites.conf macports.conf pubkeys.conf sources.conf variants.conf
INSTALLDIR= ${DESTDIR}${prefix}
INSTALLDIR= ${prefix}
TOPSRCDIR= ..

ifneq ($(MAKECMDGOALS),distclean)
Expand Down Expand Up @@ -183,16 +183,16 @@ man: ${MAN} ${MAN:%=%.gz}
endif

install: all
$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${DESTDIR}${INSTALLDIR}"
$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${DESTDIR}${mpconfigdir}"

< prefix.mtree $(MTREE) -U -e -p "${INSTALLDIR}" > /dev/null
< base.mtree $(MTREE) -U -e -p "${INSTALLDIR}" > /dev/null
< prefix.mtree $(MTREE) -U -e -p "${DESTDIR}${INSTALLDIR}" > /dev/null
< base.mtree $(MTREE) -U -e -p "${DESTDIR}${INSTALLDIR}" > /dev/null
ifneq (,$(findstring darwin,@build_os@))
ifneq (8,@OS_MAJOR@)
# Tiger's chmod doesn't accept -h
# mtree with umask 0077 doesn't get the permissions of the symlink right
chmod -h 755 "${INSTALLDIR}/man"
chmod -h 755 "${DESTDIR}${INSTALLDIR}/man"
endif
endif

Expand All @@ -205,15 +205,15 @@ endif
done

# delete old uncompressed man pages if they exist
for m in ${MAN1}; do rm -f "${INSTALLDIR}/share/man/man1/$$m" ; done
for m in ${MAN5}; do rm -f "${INSTALLDIR}/share/man/man5/$$m" ; done
for m in ${MAN7}; do rm -f "${INSTALLDIR}/share/man/man7/$$m" ; done
for m in ${MAN1}; do rm -f "${DESTDIR}${INSTALLDIR}/share/man/man1/$$m" ; done
for m in ${MAN5}; do rm -f "${DESTDIR}${INSTALLDIR}/share/man/man5/$$m" ; done
for m in ${MAN7}; do rm -f "${DESTDIR}${INSTALLDIR}/share/man/man7/$$m" ; done

$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}/share/macports/install"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 644 base.mtree "${INSTALLDIR}/share/macports/install/"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 644 prefix.mtree "${INSTALLDIR}/share/macports/install/"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 644 macosx.mtree "${INSTALLDIR}/share/macports/install/"
$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${DESTDIR}${INSTALLDIR}/share/macports/install"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 644 base.mtree "${DESTDIR}${INSTALLDIR}/share/macports/install/"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 644 prefix.mtree "${DESTDIR}${INSTALLDIR}/share/macports/install/"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 644 macosx.mtree "${DESTDIR}${INSTALLDIR}/share/macports/install/"

for page in ${MAN1} ${MAN5} ${MAN7}; do \
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$${page}.gz" "${INSTALLDIR}/share/man/man$$(echo $$page | sed -e 's/.*\.//')"; \
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$${page}.gz" "${DESTDIR}${INSTALLDIR}/share/man/man$$(echo $$page | sed -e 's/.*\.//')"; \
done
6 changes: 3 additions & 3 deletions src/darwintracelib1.0/Makefile.in
Expand Up @@ -34,7 +34,7 @@ CPPFLAGS+= -I$(srcdir)/../compat
LIBS+= $(COMPAT_OBJS)

SHLIB_NAME = darwintrace$(SHLIB_SUFFIX)
INSTALLDIR = $(DESTDIR)$(TCL_PACKAGE_PATH)/darwintrace1.0
INSTALLDIR = $(TCL_PACKAGE_PATH)/darwintrace1.0

# Yes, we know having $ signs in identifiers is not a very good idea; in the
# case of darwintrace we still need them, though.
Expand Down Expand Up @@ -70,8 +70,8 @@ distclean:: clean
rm -f Makefile

install:: all
$(INSTALL) -d -o "$(DSTUSR)" -g "$(DSTGRP)" -m "$(DSTMODE)" "$(INSTALLDIR)"
$(INSTALL) -o "$(DSTUSR)" -g "$(DSTGRP)" -m 444 "$(SHLIB_NAME)" "$(INSTALLDIR)"
$(INSTALL) -d -o "$(DSTUSR)" -g "$(DSTGRP)" -m "$(DSTMODE)" "$(DESTDIR)$(INSTALLDIR)"
$(INSTALL) -o "$(DSTUSR)" -g "$(DSTGRP)" -m 444 "$(SHLIB_NAME)" "$(DESTDIR)$(INSTALLDIR)"

test::

Expand Down
2 changes: 1 addition & 1 deletion src/machista1.0/Makefile.in
Expand Up @@ -5,7 +5,7 @@ include ../../Mk/macports.autoconf.mk

OBJS= libmachista.o hashmap.o machista_wrap.o
SHLIB_NAME= machista${SHLIB_SUFFIX}
INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/machista1.0
INSTALLDIR= ${TCL_PACKAGE_PATH}/machista1.0

SWIG = @SWIG@
SWIG_FLAGS = -tcl8 -pkgversion 1.0 -namespace
Expand Down
10 changes: 5 additions & 5 deletions src/macports1.0/Makefile.in
Expand Up @@ -8,7 +8,7 @@ SRCS= macports.tcl macports_dlist.tcl macports_util.tcl \
OBJS= macports.o get_systemconfiguration_proxies.o sysctl.o
SHLIB_NAME= MacPorts${SHLIB_SUFFIX}

INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/macports1.0
INSTALLDIR= ${TCL_PACKAGE_PATH}/macports1.0
OLDINSTALLDIR= ${datadir}/macports/Tcl

ifeq (@HAVE_FRAMEWORK_COREFOUNDATION@,yes)
Expand All @@ -32,15 +32,15 @@ install:: all

@# Remove the previously installed link if it still exists. Without this,
@# creating the directory will fail.
if test -L "${INSTALLDIR}"; then rm -rf "${INSTALLDIR}"; fi
if test -L "${DESTDIR}${INSTALLDIR}"; then rm -rf "${DESTDIR}${INSTALLDIR}"; fi

$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${DESTDIR}${INSTALLDIR}"

$(SILENT) set -x; for file in ${SRCS}; do \
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$$file" "${INSTALLDIR}/$$file"; \
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$$file" "${DESTDIR}${INSTALLDIR}/$$file"; \
done

$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${INSTALLDIR}"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${DESTDIR}${INSTALLDIR}"


include $(srcdir)/../../Mk/macports.tea.mk
8 changes: 4 additions & 4 deletions src/mpcommon1.0/Makefile.in
Expand Up @@ -5,7 +5,7 @@ include ../../Mk/macports.autoconf.mk

SRCS = mpcommon.tcl signalcatch.tcl

INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/mpcommon1.0
INSTALLDIR= ${TCL_PACKAGE_PATH}/mpcommon1.0

all:: pkgIndex.tcl

Expand All @@ -19,10 +19,10 @@ distclean:: clean
rm -f Makefile

install:: all
$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${DESTDIR}${INSTALLDIR}"
$(SILENT) set -x; for file in ${SRCS}; do \
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$(srcdir)/$$file" "${INSTALLDIR}/$$file"; \
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$(srcdir)/$$file" "${DESTDIR}${INSTALLDIR}/$$file"; \
done
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${INSTALLDIR}"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${DESTDIR}${INSTALLDIR}"

test:: ;
8 changes: 4 additions & 4 deletions src/package1.0/Makefile.in
Expand Up @@ -3,7 +3,7 @@ VPATH = @srcdir@

include ../../Mk/macports.autoconf.mk

INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/package1.0
INSTALLDIR= ${TCL_PACKAGE_PATH}/package1.0

SRCS= package.tcl portdmg.tcl portmdmg.tcl portmpkg.tcl portpkg.tcl \
portunarchive.tcl \
Expand All @@ -25,8 +25,8 @@ test::
$(TCLSH) $(srcdir)/../tests/test.tcl -nocolor

install:: all
$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${DESTDIR}${INSTALLDIR}"
$(SILENT)set -x; for file in ${SRCS}; do \
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$(srcdir)/$$file" "${INSTALLDIR}"; \
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$(srcdir)/$$file" "${DESTDIR}${INSTALLDIR}"; \
done
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${INSTALLDIR}"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${DESTDIR}${INSTALLDIR}"
2 changes: 1 addition & 1 deletion src/pextlib1.0/Makefile.in
Expand Up @@ -44,7 +44,7 @@ CPPFLAGS+= -I$(srcdir)/../compat
LIBS+= $(COMPAT_OBJS)

SHLIB_NAME= Pextlib${SHLIB_SUFFIX}
INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/pextlib1.0
INSTALLDIR= ${TCL_PACKAGE_PATH}/pextlib1.0

include $(srcdir)/../../Mk/macports.tea.mk

Expand Down
18 changes: 9 additions & 9 deletions src/port/Makefile.in
Expand Up @@ -3,7 +3,7 @@ VPATH = @srcdir@

include ../../Mk/macports.autoconf.mk

INSTALLDIR= ${DESTDIR}${prefix}
INSTALLDIR= ${prefix}
TOPSRCDIR= ../..
SCRIPTS= portmirror portindex port

Expand All @@ -23,8 +23,8 @@ port: port.tcl ../../Mk/macports.autoconf.mk
${edit} $(srcdir)/port.tcl > $@

mkdirs:
< ../../doc/prefix.mtree $(MTREE) -U -d -e -p ${INSTALLDIR} > /dev/null
< ../../doc/base.mtree $(MTREE) -U -d -e -p ${INSTALLDIR} > /dev/null
< ../../doc/prefix.mtree $(MTREE) -U -d -e -p "${DESTDIR}${INSTALLDIR}" > /dev/null
< ../../doc/base.mtree $(MTREE) -U -d -e -p "${DESTDIR}${INSTALLDIR}" > /dev/null

clean:
rm -f ${SCRIPTS}
Expand All @@ -35,13 +35,13 @@ distclean: clean
rm -f Makefile

install: all mkdirs
$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}/bin"
$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}/var/macports"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 555 port portindex portmirror "${INSTALLDIR}/bin/"
cd "${INSTALLDIR}/bin" && $(LN_S) -f port portf
cd "${INSTALLDIR}/bin" && $(LN_S) -f "${TCLSH}" port-tclsh
$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${DESTDIR}${INSTALLDIR}/bin"
$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${DESTDIR}${INSTALLDIR}/var/macports"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 555 port portindex portmirror "${DESTDIR}${INSTALLDIR}/bin/"
cd "${DESTDIR}${INSTALLDIR}/bin" && $(LN_S) -f port portf
cd "${DESTDIR}${INSTALLDIR}/bin" && $(LN_S) -f "${TCLSH}" port-tclsh
ifneq (,$(findstring darwin,@build_os@))
ifneq (8,@OS_MAJOR@)
chmod -h 555 "${INSTALLDIR}/bin/portf" "${INSTALLDIR}/bin/port-tclsh"
chmod -h 555 "${DESTDIR}${INSTALLDIR}/bin/portf" "${DESTDIR}${INSTALLDIR}/bin/port-tclsh"
endif
endif
10 changes: 5 additions & 5 deletions src/port1.0/Makefile.in
Expand Up @@ -3,7 +3,7 @@ VPATH = @srcdir@

include ../../Mk/macports.autoconf.mk

INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/port1.0
INSTALLDIR= ${TCL_PACKAGE_PATH}/port1.0

SRCS_AUTOCONF= port_autoconf.tcl
SRCS= port.tcl portchecksum.tcl portconfigure.tcl portextract.tcl \
Expand Down Expand Up @@ -31,14 +31,14 @@ distclean:: clean
rm -f Makefile

install:: all
$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${DESTDIR}${INSTALLDIR}"
$(SILENT)set -x; for file in ${SRCS}; do \
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$(srcdir)/$$file" "${INSTALLDIR}"; \
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$(srcdir)/$$file" "${DESTDIR}${INSTALLDIR}"; \
done
$(SILENT)set -x; for file in ${SRCS_AUTOCONF}; do \
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$$file" "${INSTALLDIR}"; \
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$$file" "${DESTDIR}${INSTALLDIR}"; \
done
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${INSTALLDIR}"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${DESTDIR}${INSTALLDIR}"

test::
$(TCLSH) $(srcdir)/../tests/test.tcl -nocolor
12 changes: 6 additions & 6 deletions src/registry2.0/Makefile.in
Expand Up @@ -12,7 +12,7 @@ OBJS = registry.o util.o \
portgroup.o portgroupobj.o

SHLIB_NAME= registry${SHLIB_SUFFIX}
INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/registry2.0
INSTALLDIR= ${TCL_PACKAGE_PATH}/registry2.0

include $(srcdir)/../../Mk/macports.tea.mk

Expand All @@ -39,12 +39,12 @@ distclean:: clean
rm -f Makefile

install:: all $(SHLIB_NAME)
$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "${SHLIB_NAME}" "${INSTALLDIR}"
$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${DESTDIR}${INSTALLDIR}"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "${SHLIB_NAME}" "${DESTDIR}${INSTALLDIR}"
$(SILENT) set -x; for file in ${SRCS}; do \
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$(srcdir)/$$file" "${INSTALLDIR}/$$file"; \
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$(srcdir)/$$file" "${DESTDIR}${INSTALLDIR}/$$file"; \
done
$(SILENT) set -x; for file in ${SRCS_AUTOCONF}; do \
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$$file" "${INSTALLDIR}/$$file"; \
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$$file" "${DESTDIR}${INSTALLDIR}/$$file"; \
done
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${INSTALLDIR}"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${DESTDIR}${INSTALLDIR}"

0 comments on commit 0e09a22

Please sign in to comment.