[35812] trunk/base/doc/Makefile

raimue at macports.org raimue at macports.org
Sun Apr 6 19:09:24 PDT 2008


Revision: 35812
          http://trac.macosforge.org/projects/macports/changeset/35812
Author:   raimue at macports.org
Date:     2008-04-06 19:09:22 -0700 (Sun, 06 Apr 2008)

Log Message:
-----------
doc/Makefile:
Compress man pages before installation, see #14668.

Modified Paths:
--------------
    trunk/base/doc/Makefile

Modified: trunk/base/doc/Makefile
===================================================================
--- trunk/base/doc/Makefile	2008-04-07 01:40:37 UTC (rev 35811)
+++ trunk/base/doc/Makefile	2008-04-07 02:09:22 UTC (rev 35812)
@@ -11,13 +11,23 @@
 all:
 
 clean:
+	rm -f *.{1,5,7}.gz
 
 test:
 
 distclean: clean
 	rm -f prefix.mtree macports.conf macosx.mtree
 
-install:
+%.1.gz: %.1
+	gzip -c $^ > $@
+
+%.5.gz: %.5
+	gzip -c $^ > $@
+
+%.7.gz: %.7
+	gzip -c $^ > $@
+
+install: ${MAN1:.1=.1.gz} ${MAN5:.5=.5.gz} ${MAN7:.7=.7.gz}
 	$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
 	$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${DESTDIR}${mpconfigdir}
 
@@ -43,12 +53,17 @@
 		$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 variants.conf ${DESTDIR}${mpconfigdir}; \
 	fi
 
+	# delete old uncompressed man pages if they exist
+	for m in ${MAN1}; do rm -f ${INSTALLDIR}/share/man/man1/$$m ; done
+	for m in ${MAN5}; do rm -f ${INSTALLDIR}/share/man/man5/$$m ; done
+	for m in ${MAN7}; do rm -f ${INSTALLDIR}/share/man/man7/$$m ; done
+
 	$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}/share/macports/resources/port1.0/install
 	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 prefix.mtree ${INSTALLDIR}/share/macports/resources/port1.0/install/
 	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 macosx.mtree ${INSTALLDIR}/share/macports/resources/port1.0/install/
-	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 port.1 ${INSTALLDIR}/share/man/man1
-	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 macports.conf.5 ${INSTALLDIR}/share/man/man5
-	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 portfile.7 ${INSTALLDIR}/share/man/man7
-	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 portstyle.7 ${INSTALLDIR}/share/man/man7
-	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 porthier.7 ${INSTALLDIR}/share/man/man7
-	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 portgroup.7 ${INSTALLDIR}/share/man/man7
+	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 port.1.gz ${INSTALLDIR}/share/man/man1
+	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 macports.conf.5.gz ${INSTALLDIR}/share/man/man5
+	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 portfile.7.gz ${INSTALLDIR}/share/man/man7
+	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 portstyle.7.gz ${INSTALLDIR}/share/man/man7
+	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 porthier.7.gz ${INSTALLDIR}/share/man/man7
+	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 portgroup.7.gz ${INSTALLDIR}/share/man/man7

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080406/e178b10a/attachment.html


More information about the macports-changes mailing list