From owner-svn-doc-all@FreeBSD.ORG Tue Jan 27 21:13:18 2015 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66112A96; Tue, 27 Jan 2015 21:13:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3864EBCB; Tue, 27 Jan 2015 21:13:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RLDIY6067445; Tue, 27 Jan 2015 21:13:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RLDIQO067444; Tue, 27 Jan 2015 21:13:18 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501272113.t0RLDIQO067444@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 27 Jan 2015 21:13:18 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r46236 - head/share/examples X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 21:13:18 -0000 Author: gjb Date: Tue Jan 27 21:13:17 2015 New Revision: 46236 URL: https://svnweb.freebsd.org/changeset/doc/46236 Log: In build_manpages(), evaluate the 'package' variable which, if zero-length, turns on NO_MLINKS mode for comparing against man-refs.ent. After processing (and updating man-refs.ent if needed), run build_manpages() again without NO_MLINKS, which then produces an archive containing manual pages that are installed as hard links (MLINKS), such as tar(1), sound(4), etc., which people do expect to be available on the website. Sponsored by: The FreeBSD Foundation Modified: head/share/examples/missing-manrefs.sh Modified: head/share/examples/missing-manrefs.sh ============================================================================== --- head/share/examples/missing-manrefs.sh Tue Jan 27 19:53:31 2015 (r46235) +++ head/share/examples/missing-manrefs.sh Tue Jan 27 21:13:17 2015 (r46236) @@ -36,12 +36,12 @@ # against man-refs.ent. # -PATH="/usr/bin:/bin:/usr/local/bin:/usr/sbin:/sbin" -export PATH +export PATH="/usr/bin:/bin:/usr/local/bin:/usr/sbin:/sbin" docs=${1} srcs=${2} sects=$(seq 1 9) +package= usage() { echo "Usage:" @@ -57,6 +57,10 @@ outdir=$(mktemp -d /tmp/manrefresh.outdi objdir=$(mktemp -d /tmp/manrefresh.objdir.XXXXXX) build_manpages() { + MAKE_FLAGS= + if [ -z "${package}" ]; then + MAKE_FLAGS="NO_MLINKS=1" + fi export MAKEOBJDIRPREFIX=${objdir} export DESTDIR=${outdir} export TESTSBASE=${DESTDIR}/usr/tests @@ -64,16 +68,18 @@ build_manpages() { make -s -C ${srcs} DESTDIR=${DESTDIR} \ SRCCONF=/dev/null __MAKE_CONF=/dev/null \ MANOWN=$USER MANGRP=$USER MANMODE=0666 \ - NO_MLINKS=1 -DNO_ROOT obj hier all-man maninstall - echo "Packaging manual pages..." - tar -zcvf ${outdir}.tgz -C ${outdir} \ - usr/share/man usr/share/openssl + ${MAKE_FLAGS} -DNO_ROOT obj hier all-man maninstall + if [ ! -z "${package}" ]; then + echo "Packaging manual pages..." + tar -zcvf ${outdir}.tgz -C ${outdir} \ + usr/share/man usr/share/openssl + fi } build_cleanup() { make -s -C ${srcs} DESTDIR=${outdir} \ SRCCONF=/dev/null __MAKE_CONF=/dev/null \ - NO_MLINKS=1 -DNO_ROOT cleandir + -DNO_ROOT cleandir } add_manref() { @@ -102,8 +108,10 @@ main() { || add_manref ${_m} done done + package=1 + build_manpages build_cleanup - rm -vr ${outdir} ${objdir} + rm -fvr ${outdir} ${objdir} echo "Packaged manual pages are in: ${outdir}.tgz" }