| 1 | # $Id$ |
|---|
| 2 | |
|---|
| 3 | SUBDIR = doc src |
|---|
| 4 | DISTDIR = dist |
|---|
| 5 | DISTVER = |
|---|
| 6 | DISTTAG = release_${subst .,_,${DISTVER}} |
|---|
| 7 | DISTNAME = MacPorts-${DISTVER} |
|---|
| 8 | DISTARCTAG = ${DISTTAG}-archive |
|---|
| 9 | DISTARCNAME = ${DISTNAME}-archive |
|---|
| 10 | SVNURL = http://svn.macports.org/repository/macports |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | include Mk/macports.autoconf.mk |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | all:: Mk/macports.autoconf.mk |
|---|
| 17 | |
|---|
| 18 | Mk/macports.autoconf.mk: Mk/macports.autoconf.mk.in src/config.h.in Makefile.in config.status |
|---|
| 19 | ./config.status |
|---|
| 20 | make clean |
|---|
| 21 | |
|---|
| 22 | config.status: configure |
|---|
| 23 | @if test -f ./config.status ; then \ |
|---|
| 24 | set -x ; \ |
|---|
| 25 | ./config.status --recheck ; \ |
|---|
| 26 | else \ |
|---|
| 27 | set -x ; \ |
|---|
| 28 | echo "Source tree not configured. Use ./configure" ; \ |
|---|
| 29 | fi |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | include Mk/macports.upgrade.mk |
|---|
| 33 | |
|---|
| 34 | install:: upgrade |
|---|
| 35 | [ ! -f ${sysconfdir}/macports/mp_version ] || rm -vf ${sysconfdir}/macports/mp_version |
|---|
| 36 | |
|---|
| 37 | include Mk/macports.subdir.mk |
|---|
| 38 | |
|---|
| 39 | install:: |
|---|
| 40 | $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 setupenv.bash $(DESTDIR)${datadir}/macports/ |
|---|
| 41 | # Only run these scripts when not building in a destroot |
|---|
| 42 | ifeq ($(DESTDIR),) |
|---|
| 43 | # Add [default] tag to the central MacPorts repository, if it isn't already |
|---|
| 44 | $(TCLSH) src/upgrade_sources_conf_default.tcl ${prefix} |
|---|
| 45 | # Remove duplicate entries from the dependency map (could occur with 1.6 and earlier): |
|---|
| 46 | $(TCLSH) src/dep_map_clean.tcl ${TCL_PACKAGE_DIR} |
|---|
| 47 | endif |
|---|
| 48 | @echo ""; echo "Congratulations, you have successfully installed the MacPorts system. To get the Portfiles and update the system, run:"; echo "" |
|---|
| 49 | @echo "sudo port -v selfupdate"; echo "" |
|---|
| 50 | @echo "Please read \"man port\", the MacPorts guide at http://guide.macports.org/ and Wiki at http://trac.macports.org/ for full documentation."; echo "" |
|---|
| 51 | @echo "Stray sources might have been left in the legacy ${localstatedir}/db/dports directory after this upgrade, which moved most of what it could to ${localstatedir}/macports, so you might want to look in the former and cleanup manually."; echo "" |
|---|
| 52 | |
|---|
| 53 | clean:: |
|---|
| 54 | |
|---|
| 55 | distclean:: |
|---|
| 56 | rm -f config.log config.status configure.lineno |
|---|
| 57 | rm -rf autom4te.cache ${DISTDIR} |
|---|
| 58 | rm -f Makefile Mk/macports.autoconf.mk portmgr/fedora/macports.spec portmgr/freebsd/Makefile |
|---|
| 59 | rm -f Doxyfile |
|---|
| 60 | rm -f setupenv.bash |
|---|
| 61 | |
|---|
| 62 | _gettag: |
|---|
| 63 | cd ${DISTDIR}; svn co ${SVNURL}/tags/${SVNTAG} ${PKGNAME}-svn |
|---|
| 64 | |
|---|
| 65 | _pkgdist: |
|---|
| 66 | [ ! -d ${DISTDIR}/${PKGNAME} ] || rm -rf ${DISTDIR}/${PKGNAME} |
|---|
| 67 | cd ${DISTDIR}; svn export ${PKGNAME}-svn ${PKGNAME} |
|---|
| 68 | cd ${DISTDIR}; COPY_EXTENDED_ATTRIBUTES_DISABLE=true tar -c ${PKGNAME} | gzip > ${PKGNAME}.tar.gz |
|---|
| 69 | cd ${DISTDIR}; COPY_EXTENDED_ATTRIBUTES_DISABLE=true tar -c ${PKGNAME} | bzip2 > ${PKGNAME}.tar.bz2 |
|---|
| 70 | cd ${DISTDIR}; for tarball in ${PKGNAME}.tar.*; do { \ |
|---|
| 71 | for type in -md5 -sha1 -ripemd160; do { \ |
|---|
| 72 | openssl dgst $$type $$tarball; \ |
|---|
| 73 | }; done >> ${DISTNAME}.chk.txt; \ |
|---|
| 74 | }; done |
|---|
| 75 | |
|---|
| 76 | _dopkg: _gettag _pkgdist |
|---|
| 77 | |
|---|
| 78 | # This target fetches a tagged distribution from svn, and generates tarballs and checksums for it |
|---|
| 79 | distfromsvn: |
|---|
| 80 | @[ -n "${DISTVER}" ] || { echo Must specify DISTVER, like: make DISTVER=1.4.0 distfromsvn; exit 1; } |
|---|
| 81 | [ -d ${DISTDIR} ] || mkdir ${DISTDIR} |
|---|
| 82 | rm -f ${DISTDIR}/${DISTNAME}.chk.txt |
|---|
| 83 | ${MAKE} SVNTAG=${DISTTAG}/base/ PKGNAME=${DISTNAME} _dopkg |
|---|
| 84 | ifeq ($(ARC),yes) |
|---|
| 85 | ${MAKE} SVNTAG=${DISTARCTAG} PKGNAME=${DISTARCNAME} _dopkg |
|---|
| 86 | endif |
|---|
| 87 | |
|---|
| 88 | tcldoc: |
|---|
| 89 | find src -name '*.tcl' | xargs tcldoc --verbose --title "MacPorts Documentation" --force tcldoc |
|---|
| 90 | |
|---|
| 91 | tcldox: |
|---|
| 92 | doxygen |
|---|
| 93 | |
|---|
| 94 | test:: |
|---|
| 95 | |
|---|
| 96 | .PHONY: dist _gettag _pkgdist _dopkg tcldoc tcldox |
|---|