source: trunk/base/Makefile.in @ 19073

Last change on this file since 19073 was 18983, checked in by pguyot (Paul Guyot), 14 years ago

Improved logic when a template or configure is modified.

  • Property svn:eol-style set to native
File size: 3.0 KB
Line 
1SUBDIR          = config doc src portmgr
2DISTDIR         = dist
3DISTVER         =
4DISTTAG         = release_${subst .,_,${DISTVER}}
5DISTNAME        = DarwinPorts-${DISTVER}
6DISTARCTAG      = ${DISTTAG}-archive
7DISTARCNAME     = ${DISTNAME}-archive
8CVSLOGIN        = ${USER}
9
10include Mk/dports.autoconf.mk
11
12all:: Mk/dports.autoconf.mk
13
14Mk/dports.autoconf.mk: Mk/dports.autoconf.mk.in src/config.h.in Makefile.in config.status
15        ./config.status
16        make clean
17
18config.status: configure
19        @if test -f ./config.status ; then      \
20                set -x ;                                                \
21                ./config.status --recheck ;             \
22        else                                                            \
23                set -x ;                                                \
24                echo "Source tree not configured. Use ./configure" ; \
25        fi
26
27include Mk/dports.subdir.mk
28
29install::
30        # Compatibility upgrade from dp 1.1 to dp 1.2
31        @echo "Renaming rsync'd directories from rsync.opendarwin.org to rsync.darwinports.org"
32        if test -d ${DESTDIR}${localstatedir}/db/dports/sources/rsync.rsync.opendarwin.org_dpupdate_dports \
33           -a ! -d ${DESTDIR}${localstatedir}/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports; then \
34                mv ${DESTDIR}${localstatedir}/db/dports/sources/rsync.rsync.opendarwin.org_dpupdate_dports \
35                   ${DESTDIR}${localstatedir}/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports; \
36        fi
37        if test -d ${DESTDIR}${localstatedir}/db/dports/sources/rsync.rsync.opendarwin.org_dpupdate1 \
38           -a ! -d ${DESTDIR}${localstatedir}/db/dports/sources/rsync.rsync.darwinports.org_dpupdate1; then \
39                mv ${DESTDIR}${localstatedir}/db/dports/sources/rsync.rsync.opendarwin.org_dpupdate1 \
40                   ${DESTDIR}${localstatedir}/db/dports/sources/rsync.rsync.darwinports.org_dpupdate1; \
41        fi
42
43        @echo ""
44        @echo "Congratulations, you have successfully installed the DarwinPorts system."
45        @echo ""
46        @echo "To get the Portfiles and update the system run:"
47        @echo ""
48        @echo "sudo port selfupdate"
49        @echo ""
50        @echo "Please read README_RELEASE1 and port(1)."
51        @echo ""
52
53clean::
54
55distclean::
56        rm -f config.log config.status configure.lineno
57        rm -rf autom4te.cache ${DISTDIR}
58        rm -f Makefile Mk/dports.autoconf.mk
59
60_gettag:
61        cd ${DISTDIR}; cvs -d ":ext:${CVSLOGIN}@cvs.opendarwin.org:/Volumes/src/cvs/od" co -N -r ${CVSTAG} ${REPOPATH}
62        cd ${DISTDIR}; mv ${REPOPATH} ${PKGNAME}; rm -Rf darwinports
63
64_pkgdist:
65        cd ${DISTDIR}; COPY_EXTENDED_ATTRIBUTES_DISABLE=true tar --exclude CVS -c ${PKGNAME} | gzip > ${PKGNAME}.tar.gz
66        cd ${DISTDIR}; COPY_EXTENDED_ATTRIBUTES_DISABLE=true tar --exclude CVS -c ${PKGNAME} | bzip2 > ${PKGNAME}.tar.bz2
67        cd ${DISTDIR}; for type in -md5 -sha1 -ripemd160; do openssl dgst $$type ${PKGNAME}.tar.gz ${PKGNAME}.tar.bz2; done >> ${DISTNAME}.chk.txt
68
69_dopkg: _gettag _pkgdist
70
71# This target fetches a tagged distribution from cvs, and generates tarballs and checksums for it
72distfromcvs:
73        @[ -n "${DISTVER}" ] || ( echo Must specify DISTVER, like: make DISTVER=1.1 dist; exit 1 )
74        [ -d ${DISTDIR} ] || mkdir ${DISTDIR}
75        rm -f ${DISTDIR}/${DISTNAME}.chk.txt
76        ${MAKE} PKGNAME=${DISTNAME} REPOPATH=darwinports/base CVSTAG=${DISTTAG} _dopkg
77        ${MAKE} PKGNAME=${DISTARCNAME} REPOPATH=darwinports CVSTAG=${DISTARCTAG} _dopkg
78
79test::
80
81.PHONY: dist _gettag _pkgdist _dopkg
Note: See TracBrowser for help on using the repository browser.