[Midnightbsd-cvs] src: BSDmakefile: Now compress man pages properly.

ctriv at midnightbsd.org ctriv at midnightbsd.org
Mon Mar 16 13:31:22 EDT 2009


Log Message:
-----------
Now compress man pages properly.  

Todo:
	* decide on the compiletime options we want.  Two big ones are 64 bit
	  support and threads
	* fix building in '.'.  Right now you have to make obj first.
	* test building when perl isn't already installed.  I think it'll
	  work...

Modified Files:
--------------
    src/usr.bin/perl:
        BSDmakefile (r1.1 -> r1.2)

-------------- next part --------------
Index: BSDmakefile
===================================================================
RCS file: /home/cvs/src/usr.bin/perl/BSDmakefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -L usr.bin/perl/BSDmakefile -L usr.bin/perl/BSDmakefile -u -r1.1 -r1.2
--- usr.bin/perl/BSDmakefile
+++ usr.bin/perl/BSDmakefile
@@ -1,9 +1,20 @@
+#
+# $MidnightBSD$
+#
+# This makefile deals with binding perl's build system to our own.
+# It is called BSDmakefile because perl's configure makes a 'Makefile',
+# and it is not possible to change the name.
+#
 .include <bsd.own.mk>
 .include <bsd.obj.mk>
-
+.include <bsd.man.mk>
 
 SRCDIR= ${.CURDIR}/../../contrib/perl
 
+#
+# mksymlinks is perl's way of building away from the src dir.  It builds a bunch of symlinks
+# so everthing is where Configure thinks it should be.  Hackish, but it works.
+#
 CONFIGURE_ARGS= -des -Dprefix=/usr -Dsiteprefix=/usr/local -Dvendorprefix=/usr \
                 -Dmksymlinks -Dsrc=${SRCDIR} 
                 
@@ -18,16 +29,39 @@
 	
 ${PERL_MAKEFILE}:
 	cd ${.OBJDIR} && ${SRCDIR}/${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
-            
+
+# if OBJDIR is ., then don't delete ourselves.            
 clean:
 	cd ${.OBJDIR} && ls -A | grep -v 'BSDmakefile' | xargs rm -r
 
-install:
-	cd ${.OBJDIR} && ${MAKE} -f ${PERL_MAKEFILE} install	
-                                        
+install: install.perl install.man
+
+install.perl:
+	cd ${.OBJDIR} && LD_LIBRARY_PATH=${.OBJDIR} ./perl installperl --destdir=${DESTDIR} 
+
+
+
+#
+# perl doesn't compress man pages, so we do a staged install
+#
+MANSECTIONS= 1 3
+	
+install.man: convertpods finalmaninstall
+
+convertpods:
+	@cd ${.OBJDIR} && LD_LIBRARY_PATH=${.OBJDIR} ./perl installman --man1dir=${.OBJDIR}/rawmans/1 --man3dir=${.OBJDIR}/rawmans/3
+
+finalmaninstall:
+.for SEC in ${MANSECTIONS}
+	@cd ${.OBJDIR}/rawmans/${SEC}; \
+	for man in `ls`; do \
+		${MCOMPRESS_CMD} $$man > $$man${MCOMPRESS_EXT}; \
+		echo ${MINSTALL} $$man${MCOMPRESS_EXT} ${DESTDIR}${MANDIR}${SEC}/$$man${MCOMPRESS_EXT}; \
+		${MINSTALL} $$man${MCOMPRESS_EXT} ${DESTDIR}${MANDIR}${SEC}/$$man${MCOMPRESS_EXT}; \
+	done
+.endfor
+	
 .PHONY: clean                                        
                                         
                                         
-                                        
-                                        
                                         
\ No newline at end of file


More information about the Midnightbsd-cvs mailing list