source: branches/gsoc13-tests/doc/Makefile @ 139170

Last change on this file since 139170 was 100532, checked in by raimue@…, 8 years ago

Create ${prefix}/man symlink with a simple entry in base.mtree
instead of the more complex way in the Makefile

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1MAN1=           port.1
2MAN5=           macports.conf.5
3MAN7=           portfile.7 portstyle.7 porthier.7 portgroup.7
4CONF=       archive_sites.conf macports.conf pubkeys.conf sources.conf variants.conf
5INSTALLDIR=     ${DESTDIR}${prefix}
6TOPSRCDIR=      ..
7
8ifneq ($(MAKECMDGOALS),distclean)
9include ../Mk/macports.autoconf.mk
10endif
11
12all: ${MAN1:.1=.1.gz} ${MAN5:.5=.5.gz} ${MAN7:.7=.7.gz}
13
14clean:
15        rm -f *.{1,5,7}.gz
16
17test:
18
19distclean: clean
20        rm -f macports.conf base.mtree macosx.mtree prefix.mtree pubkeys.conf
21
22%.1.gz: %.1
23        gzip -c $^ > $@
24
25%.5.gz: %.5
26        gzip -c $^ > $@
27
28%.7.gz: %.7
29        gzip -c $^ > $@
30
31install: all
32        $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "${INSTALLDIR}"
33        $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "${DESTDIR}${mpconfigdir}"
34
35        < prefix.mtree $(MTREE) -U -e -p "${INSTALLDIR}" > /dev/null
36        < base.mtree $(MTREE) -U -e -p "${INSTALLDIR}" > /dev/null
37
38        for f in ${CONF}; do \
39                $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$f "${DESTDIR}${mpconfigdir}/$${f}.default"; \
40                if test ! -e "${DESTDIR}${mpconfigdir}/$$f" ; then \
41                        set -x; \
42                        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 $$f "${DESTDIR}${mpconfigdir}"; \
43                fi; \
44        done
45
46        # delete old uncompressed man pages if they exist
47        for m in ${MAN1}; do rm -f "${INSTALLDIR}/share/man/man1/$$m" ; done
48        for m in ${MAN5}; do rm -f "${INSTALLDIR}/share/man/man5/$$m" ; done
49        for m in ${MAN7}; do rm -f "${INSTALLDIR}/share/man/man7/$$m" ; done
50
51        $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "${INSTALLDIR}/share/macports/install"
52        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 base.mtree "${INSTALLDIR}/share/macports/install/"
53        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 prefix.mtree "${INSTALLDIR}/share/macports/install/"
54        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 macosx.mtree "${INSTALLDIR}/share/macports/install/"
55        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 port.1.gz "${INSTALLDIR}/share/man/man1"
56        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 macports.conf.5.gz "${INSTALLDIR}/share/man/man5"
57        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 portfile.7.gz "${INSTALLDIR}/share/man/man7"
58        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 portstyle.7.gz "${INSTALLDIR}/share/man/man7"
59        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 porthier.7.gz "${INSTALLDIR}/share/man/man7"
60        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 portgroup.7.gz "${INSTALLDIR}/share/man/man7"
Note: See TracBrowser for help on using the repository browser.