ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/mports/trunk/Makefile
Revision: 475
Committed: Thu Nov 2 22:27:23 2006 UTC (17 years, 6 months ago) by wintellect
File size: 5122 byte(s)
Log Message:
news/slrn added

File Contents

# Content
1 # $MidnightBSD: mports/Makefile,v 1.23 2006/10/08 12:01:48 wintellect Exp $
2 #
3
4 SUBDIR += accessibility
5 SUBDIR += archivers
6 SUBDIR += audio
7 SUBDIR += converters
8 SUBDIR += databases
9 SUBDIR += devel
10 SUBDIR += dns
11 SUBDIR += editors
12 SUBDIR += emulators
13 SUBDIR += ftp
14 SUBDIR += games
15 SUBDIR += german
16 SUBDIR += graphics
17 SUBDIR += irc
18 SUBDIR += java
19 SUBDIR += lang
20 SUBDIR += mail
21 SUBDIR += math
22 SUBDIR += misc
23 SUBDIR += multimedia
24 SUBDIR += net-im
25 SUBDIR += net-p2p
26 SUBDIR += news
27 SUBDIR += print
28 SUBDIR += security
29 SUBDIR += shells
30 SUBDIR += sysutils
31 SUBDIR += textproc
32 SUBDIR += www
33 SUBDIR += x11
34 SUBDIR += x11-clocks
35 SUBDIR += x11-fonts
36 SUBDIR += x11-fm
37 SUBDIR += x11-servers
38 SUBDIR += x11-themes
39 SUBDIR += x11-toolkits
40 SUBDIR += x11-wm
41
42 PORTSTOP= yes
43
44 .include <bsd.port.subdir.mk>
45
46 index:
47 @rm -f ${INDEXDIR}/${INDEXFILE}
48 @cd ${.CURDIR} && make ${INDEXDIR}/${INDEXFILE}
49
50 fetchindex: ${INDEXDIR}/{INDEXFILE}.bz2
51 @bunzip2 < ${INDEXDIR}/${INDEXFILE}.bz2 > ${INDEXDIR}/${INDEXFILE} && \
52 chmod a+r ${INDEXDIR}/${INDEXFILE}
53
54 ${INDEXDIR}/{INDEXFILE}.bz2: .PHONY
55 @${FETCHINDEX} ${INDEXDIR}/${INDEXFILE}.bz2 ${MASTER_SITE_INDEX}${INDEXFILE}.bz2
56
57 MASTER_SITE_INDEX?= http://www.MidnightBSD.org/ports/
58 SETENV?= /usr/bin/env
59 FETCHINDEX?= ${SETENV} ${FETCH_ENV} fetch -am -o
60 INDEX_JOBS?= 2
61
62 .if !defined(INDEX_VERBOSE)
63 INDEX_ECHO_MSG= echo > /dev/null
64 INDEX_ECHO_1ST= echo -n
65 .else
66 INDEX_ECHO_MSG= echo 1>&2
67 INDEX_ECHO_1ST= echo
68 .endif
69
70 ${INDEXDIR}/${INDEXFILE}:
71 @${INDEX_ECHO_1ST} "Generating ${INDEXFILE} - please wait.."; \
72 if [ "${INDEX_PRISTINE}" != "" ]; then \
73 export LOCALBASE=/nonexistentlocal; \
74 export X11BASE=/nonexistentx; \
75 fi; \
76 tmpdir=`/usr/bin/mktemp -d -t index` || exit 1; \
77 trap "rm -rf $${tmpdir}; exit 1" 1 2 3 5 10 13 15; \
78 ( cd ${.CURDIR} && make -j${INDEX_JOBS} INDEX_TMPDIR=$${tmpdir} BUILDING_INDEX=1 \
79 ECHO_MSG="${INDEX_ECHO_MSG}" describe ) || \
80 (rm -rf $${tmpdir} ; \
81 if [ "${INDEX_QUIET}" = "" ]; then \
82 echo; \
83 echo "********************************************************************"; \
84 echo "Before reporting this error, verify that you are running a supported"; \
85 echo "version of MidnightBSD (see http://www.MidnightBSD.org/ports/) and that you"; \
86 echo "have a complete and up-to-date ports collection. (INDEX builds are"; \
87 echo "not supported with partial or out-of-date ports collections -- in"; \
88 echo "particular, if you are using cvsup, you must cvsup the \"ports-all\""; \
89 echo "collection, and have no \"refuse\" files.) If that is the case, then"; \
90 echo "report the failure to ports@MidnightBSD.org together with relevant"; \
91 echo "details of your ports configuration (including MidnightBSD version,"; \
92 echo "your architecture, your environment, and your /etc/make.conf"; \
93 echo "settings, especially compiler flags and WITH/WITHOUT settings)."; \
94 echo; \
95 echo "Note: the latest pre-generated version of INDEX may be fetched"; \
96 echo "automatically with \"make fetchindex\"."; \
97 echo "********************************************************************"; \
98 echo; \
99 fi; \
100 exit 1); \
101 cat $${tmpdir}/${INDEXFILE}.desc.* | (cd ${.CURDIR} ; perl ${.CURDIR}/Tools/make_index) | \
102 sed -e 's/ */ /g' -e 's/| */|/g' -e 's/ *|/|/g' -e 's./..g' | \
103 sort -t '|' +1 -2 | \
104 sed -e 's../.g' > ${INDEXDIR}/${INDEXFILE}.tmp; \
105 if [ "${INDEX_PRISTINE}" != "" ]; then \
106 sed -e "s,$${LOCALBASE},/usr/local," -e "s,$${X11BASE},/usr/X11R6," \
107 ${INDEXDIR}/${INDEXFILE}.tmp > ${INDEXDIR}/${INDEXFILE}; \
108 else \
109 mv ${INDEXDIR}/${INDEXFILE}.tmp ${INDEXDIR}/${INDEXFILE}; \
110 fi; \
111 rm -rf $${tmpdir}; \
112 echo " Done."
113
114 print-index: ${INDEXDIR}/${INDEXFILE}
115 @awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nB-deps:\t%s\nR-deps:\t%s\nE-deps:\t%s\nP-deps:\t%s\nF-deps:\t%s\nWWW:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$11, $$12, $$13, $$10); }' < ${INDEXDIR}/${INDEXFILE}
116
117 CVS?= cvs
118 SUP?= cvsup
119 PORTSNAP?= portsnap
120 PORTSNAP_FLAGS?= -p ${.CURDIR}
121 .if defined(SUPHOST)
122 SUPFLAGS+= -h ${SUPHOST}
123 .endif
124 update:
125 .if defined(PORTSNAP_UPDATE)
126 @echo "--------------------------------------------------------------"
127 @echo ">>> Running ${PORTSNAP}"
128 @echo "--------------------------------------------------------------"
129 @${PORTSNAP} ${PORTSNAP_FLAGS} fetch
130 @${PORTSNAP} ${PORTSNAP_FLAGS} update
131 .elif defined(SUP_UPDATE) && defined(PORTSSUPFILE)
132 @echo "--------------------------------------------------------------"
133 @echo ">>> Running ${SUP}"
134 @echo "--------------------------------------------------------------"
135 @${SUP} ${SUPFLAGS} ${PORTSSUPFILE}
136 .elif defined(CVS_UPDATE)
137 @echo "--------------------------------------------------------------"
138 @echo ">>> Updating ${.CURDIR} from cvs repository" ${CVSROOT}
139 @echo "--------------------------------------------------------------"
140 cd ${.CURDIR}; ${CVS} -R -q update -A -P -d -I!
141 .elif defined(SUP_UPDATE) && !defined(PORTSSUPFILE)
142 @${ECHO_MSG} "Error: Please define PORTSSUPFILE before doing make update."
143 @exit 1
144 .else
145 @${ECHO_MSG} "Error: Please define either PORTSNAP_UPDATE, SUP_UPDATE, or CVS_UPDATE first."
146 .endif

Properties

Name Value
cvs2svn:cvs-rev 1.24