source: trunk/base/src/macports1.0/Makefile @ 82111

Last change on this file since 82111 was 82111, checked in by jmr@…, 9 years ago

rearrange tcl package symlink creation to hopefully cover all possibilities

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1SRCS=           macports.tcl macports_dlist.tcl macports_util.tcl \
2                macports_autoconf.tcl macports_index.tcl macports_fastload.tcl
3OBJS=           macports.o get_systemconfiguration_proxies.o sysctl.o
4SHLIB_NAME=     MacPorts${SHLIB_SUFFIX}
5
6INSTALLDIR=     ${DESTDIR}${datadir}/macports/Tcl/macports1.0
7INSTALLPKGLINK= ${TCL_PACKAGE_DIR}/macports1.0
8
9include ../../Mk/macports.autoconf.mk
10include ../../Mk/macports.tea.mk
11
12ifeq ($(OBJC_RUNTIME), APPLE_RUNTIME)
13        LIBS+= -framework CoreFoundation -framework SystemConfiguration
14endif
15
16pkgIndex.tcl: $(SRCS)
17
18test::
19        ${TCLSH} tests/macports_dlist.tcl
20        ${TCLSH} tests/macports_util.tcl
21
22distclean:: clean
23        rm -f macports_autoconf.tcl macports_fastload.tcl ${SHLIB_NAME}
24
25install:: all
26        $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
27
28        $(SILENT) set -x; for file in ${SRCS}; do \
29                $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}/$$file; \
30        done
31
32        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
33
34        echo "${TCL_PACKAGE_DIR}" > ${DESTDIR}${prefix}/var/macports/.tclpackage
35        if test -z "${DESTDIR}" -a "${INSTALLPKGLINK}" != "${INSTALLDIR}"; then \
36                if test ! -L "${INSTALLPKGLINK}"; then \
37            if test ! -e "${TCL_PACKAGE_DIR}"; then \
38                $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "${TCL_PACKAGE_DIR}" || true; \
39            fi; \
40            if test -d "${INSTALLPKGLINK}"; then \
41                rm -vrf "${INSTALLPKGLINK}" || true; \
42            fi; \
43            if test ! -e "${INSTALLPKGLINK}"; then \
44                ln -vs "${INSTALLDIR}" "${INSTALLPKGLINK}" || true; \
45            fi; \
46        fi; \
47        fi
Note: See TracBrowser for help on using the repository browser.