/
Makefile.in
161 lines (139 loc) · 7.24 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# $Id: Makefile.in 119182 2014-04-19 06:18:31Z jmr@macports.org $
srcdir = @srcdir@
VPATH = @srcdir@
PATH = @PATH_CLEANED@
SUBDIR = vendor doc src tests
DISTDIR = dist
DISTVER =
DISTTAG = release_${subst .,_,${DISTVER}}
DISTNAME = MacPorts-${DISTVER}
DISTARCTAG = ${DISTTAG}-archive
DISTARCNAME = ${DISTNAME}-archive
SVNURL = https://svn.macports.org/repository/macports
include Mk/macports.autoconf.mk
all:: Mk/macports.autoconf.mk
Mk/macports.autoconf.mk: Mk/macports.autoconf.mk.in src/config.h.in Makefile.in doc/Makefile.in src/cflib1.0/Makefile.in src/cregistry/Makefile.in src/darwintracelib1.0/Makefile.in src/macports1.0/Makefile.in src/package1.0/Makefile.in src/port/Makefile.in src/port1.0/Makefile.in src/registry2.0/Makefile.in tests/Makefile.in config.status
./config.status
${MAKE} clean
config.status: configure
@if test -f ./config.status ; then \
set -x ; \
./config.status --recheck ; \
else \
set -x ; \
echo "Source tree not configured. Use ./configure" ; \
fi
include $(srcdir)/Mk/macports.subdir.mk
install::
[ ! -f "$(DESTDIR)${sysconfdir}/macports/mp_version" ] || rm -vf "$(DESTDIR)${sysconfdir}/macports/mp_version"
$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "$(DESTDIR)${datadir}/macports/"
$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 setupenv.bash "$(DESTDIR)${datadir}/macports/"
$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $(srcdir)/macports-pubkey.pem "$(DESTDIR)${datadir}/macports/"
# Only run these scripts when not building in a destroot
ifeq ($(DESTDIR),)
# create run user if it doesn't exist
@if test -n "${DSCL}" -a -n "${DSEDITGROUP}" ; then \
if ! ${DSCL} -q . -read /Groups/${RUNUSR} > /dev/null 2>&1 ; then \
if test `id -u` -eq 0; then \
echo "Creating group \"${RUNUSR}\"" ; \
${DSEDITGROUP} -q -o create ${RUNUSR} ; \
else \
echo "Not creating group \"${RUNUSR}\" (not root)" ; \
fi ; \
fi ; \
if ! ${DSCL} -q . -list /Users/${RUNUSR} > /dev/null 2>&1 ; then \
if test `id -u` -eq 0; then \
echo "Creating user \"${RUNUSR}\"" ; \
NEXTUID=501; \
while test -n "`${DSCL} -q /Search -search /Users UniqueID $$NEXTUID`"; do \
let "NEXTUID=NEXTUID+1"; \
done; \
${DSCL} -q . -create /Users/${RUNUSR} UniqueID $$NEXTUID ; \
\
${DSCL} -q . -delete /Users/${RUNUSR} AuthenticationAuthority ; \
${DSCL} -q . -delete /Users/${RUNUSR} PasswordPolicyOptions ; \
${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:KerberosKeys ; \
${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:ShadowHashData ; \
\
${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts ; \
${DSCL} -q . -create /Users/${RUNUSR} Password \* ; \
${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $$(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $$2}') ; \
${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory "${localstatedir}/macports/home" ; \
${DSCL} -q . -create /Users/${RUNUSR} UserShell /usr/bin/false ; \
else \
echo "Not creating user \"${RUNUSR}\" (not root)" ; \
fi ; \
fi ; \
if test "$$(${DSCL} -q . -read /Users/${RUNUSR} NFSHomeDirectory)" = "NFSHomeDirectory: /var/empty" ; then \
if test `id -u` -eq 0; then \
echo "Updating home directory location for user \"${RUNUSR}\"" ; \
${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory "${localstatedir}/macports/home" ; \
else \
echo "Not updating home directory location for user \"${RUNUSR}\" (not root)" ; \
fi ; \
fi ; \
if test `sw_vers -productVersion | /usr/bin/awk -F . '{print $$2}'` -eq 4 -a `id -u` -eq 0; then \
GID=`${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $$2}'` ; \
if test "`${DSCL} -q . -read /Users/${RUNUSR} PrimaryGroupID 2>/dev/null | /usr/bin/awk '{print $$2}'`" != "$$GID"; then \
echo "Fixing PrimaryGroupID for user \"${RUNUSR}\"" ; \
${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $$GID ; \
${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts ; \
fi ; \
fi ; \
else \
echo "Can't find ${DSCL} / ${DSEDITGROUP}, not creating user \"${RUNUSR}\"" ; \
fi
# Add [default] tag to the central MacPorts repository, if it isn't already
$(TCLSH) $(srcdir)/src/upgrade_sources_conf_default.tcl "${prefix}"
# Convert image directories (and direct mode installs) to image archives
$(TCLSH) $(srcdir)/src/images_to_archives.tcl
$(TCLSH) $(srcdir)/src/dedup_portfiles.tcl
endif
ifndef SELFUPDATING
@echo ""; echo "Congratulations, you have successfully installed the MacPorts system. To get the Portfiles and update the system, add ${prefix}/bin to your PATH and run:"; echo ""
@echo "sudo port -v selfupdate"; echo ""
@echo "Please read \"man port\", the MacPorts guide at http://guide.macports.org/ and Wiki at https://trac.macports.org/ for full documentation."; echo ""
else
@echo ""; echo "Congratulations, you have successfully upgraded the MacPorts system."; echo ""
endif
group::
@echo "creating a macports group..." && sudo dseditgroup -o create -n . macports && echo "done! use './configure --with-install-group=macports --with-shared-directory' if you haven't already"
rmgroup::
@echo "deleting macports group..." && sudo dseditgroup -o delete -n . macports && echo "done! use 'make group' to re-create"
clean::
rm -rf tcldox
distclean::
rm -f config.log config.status configure.lineno
rm -rf autom4te.cache ${DISTDIR}
rm -f Makefile Mk/macports.autoconf.mk portmgr/freebsd/Makefile
rm -f Doxyfile
rm -f setupenv.bash
rm -f portmgr/dmg/postflight
_gettag:
cd ${DISTDIR}; svn co ${SVNURL}/tags/${SVNTAG} ${PKGNAME}-svn
_pkgdist:
[ ! -d ${DISTDIR}/${PKGNAME} ] || rm -rf ${DISTDIR}/${PKGNAME}
cd ${DISTDIR}; svn export ${PKGNAME}-svn ${PKGNAME}
cd ${DISTDIR}; COPY_EXTENDED_ATTRIBUTES_DISABLE=true tar -c ${PKGNAME} | gzip > ${PKGNAME}.tar.gz
cd ${DISTDIR}; COPY_EXTENDED_ATTRIBUTES_DISABLE=true tar -c ${PKGNAME} | bzip2 > ${PKGNAME}.tar.bz2
cd ${DISTDIR}; for tarball in ${PKGNAME}.tar.*; do { \
for type in -md5 -sha1 -ripemd160 -sha256; do { \
openssl dgst $$type $$tarball; \
}; done >> ${DISTNAME}.chk.txt; \
}; done
_dopkg: _gettag _pkgdist
# This target fetches a tagged distribution from svn, and generates tarballs and checksums for it
distfromsvn:
@[ -n "${DISTVER}" ] || { echo Must specify DISTVER, like: make DISTVER=1.4.0 distfromsvn; exit 1; }
[ -d ${DISTDIR} ] || mkdir ${DISTDIR}
rm -f ${DISTDIR}/${DISTNAME}.chk.txt
${MAKE} SVNTAG=${DISTTAG}/base/ PKGNAME=${DISTNAME} _dopkg
ifeq ($(ARC),yes)
${MAKE} SVNTAG=${DISTARCTAG} PKGNAME=${DISTARCNAME} _dopkg
endif
tcldox:
@[ -e "${prefix}/bin/doxygen" -a -e "${prefix}/bin/tcl-dox" -a -e "${prefix}/bin/dot" ] \
|| { echo "Install doxygen, tcl-dox and graphviz with MacPorts in ${prefix} first."; exit 1; }
${prefix}/bin/doxygen
test::
.PHONY: dist _gettag _pkgdist _dopkg tcldoc tcldox