Index: head/share/mk/bsd.confs.mk =================================================================== --- head/share/mk/bsd.confs.mk (revision 296120) +++ head/share/mk/bsd.confs.mk (revision 296121) @@ -1,85 +1,87 @@ # $FreeBSD$ .if !target(____) .error bsd.conf.mk cannot be included directly. .endif CONFGROUPS?= CONFS .if !target(buildconfig) .for group in ${CONFGROUPS} buildconfig: ${${group}} .endfor .endif +.if !defined(_SKIP_BUILD) all: buildconfig +.endif .if !target(installconfig) .for group in ${CONFGROUPS} .if defined(${group}) && !empty(${group}) ${group}OWN?= ${SHAREOWN} ${group}GRP?= ${SHAREGRP} ${group}MODE?= ${CONFMODE} ${group}DIR?= ${CONFDIR} STAGE_SETS+= ${group} STAGE_DIR.${group}= ${STAGE_OBJTOP}${${group}DIR} _${group}CONFS= .for cnf in ${${group}} .if defined(${group}OWN_${cnf:T}) || defined(${group}GRP_${cnf:T}) || \ defined(${group}MODE_${cnf:T}) || defined(${group}DIR_${cnf:T}) || \ defined(${group}NAME_${cnf:T}) || defined(${group}NAME) ${group}OWN_${cnf:T}?= ${${group}OWN} ${group}GRP_${cnf:T}?= ${${group}GRP} ${group}MODE_${cnf:T}?= ${${group}MODE} ${group}DIR_${cnf:T}?= ${${group}DIR} .if defined(${group}NAME) ${group}NAME_${cnf:T}?= ${${group}NAME} .else ${group}NAME_${cnf:T}?= ${cnf:T} .endif STAGE_AS_SETS+= ${cnf:T} STAGE_AS_${cnf:T}= ${${group}NAME_${cnf:T}} # XXX {group}OWN,GRP,MODE STAGE_DIR.${cnf:T}= ${STAGE_OBJTOP}${${group}DIR_${cnf:T}} stage_as.${cnf:T}: ${cnf} installconfig: _${group}INS_${cnf:T} _${group}INS_${cnf:T}: ${cnf} ${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \ -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ ${.ALLSRC} \ ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}} .else _${group}CONFS+= ${cnf} .endif .endfor .if !empty(_${group}CONFS) stage_files.${group}: ${_${group}CONFS} installconfig: _${group}INS _${group}INS: ${_${group}CONFS} .if defined(${group}NAME) ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ ${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME} .else ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ ${.ALLSRC} ${DESTDIR}${${group}DIR}/ .endif .endif .endif # defined(${group}) && !empty(${group}) .endfor .endif # !target(installconfig) .if ${MK_STAGING} != "no" .if !empty(STAGE_SETS) buildconfig: stage_files .if !empty(STAGE_AS_SETS) buildconfig: stage_as .endif .endif .endif Index: head/share/mk/bsd.crunchgen.mk =================================================================== --- head/share/mk/bsd.crunchgen.mk (revision 296120) +++ head/share/mk/bsd.crunchgen.mk (revision 296121) @@ -1,149 +1,151 @@ ################################################################# # # Generate crunched binaries using crunchgen(1). # # General notes: # # A number of Make variables are used to generate the crunchgen config file. # # CRUNCH_SRCDIRS: lists directories to search for included programs # CRUNCH_PROGS: lists programs to be included # CRUNCH_LIBS: libraries to statically link with # CRUNCH_SHLIBS: libraries to dynamically link with # CRUNCH_BUILDOPTS: generic build options to be added to every program # CRUNCH_BUILDTOOLS: lists programs that need build tools built in the # local architecture. # # Special options can be specified for individual programs # CRUNCH_SRCDIR_${P}: base source directory for program ${P} # CRUNCH_BUILDOPTS_${P}: additional build options for ${P} # CRUNCH_ALIAS_${P}: additional names to be used for ${P} # # By default, any name appearing in CRUNCH_PROGS or CRUNCH_ALIAS_${P} # will be used to generate a hard link to the resulting binary. # Specific links can be suppressed by setting # CRUNCH_SUPPRESS_LINK_${NAME} to 1. # # If CRUNCH_GENERATE_LINKS is set to no, no links will be generated. # # $FreeBSD$ ################################################################## # The following is pretty nearly a generic crunchgen-handling makefile # CONF= ${PROG}.conf OUTMK= ${PROG}.mk OUTC= ${PROG}.c OUTPUTS=${OUTMK} ${OUTC} ${PROG}.cache CRUNCHOBJS= ${.OBJDIR} CRUNCH_GENERATE_LINKS?= yes CLEANFILES+= ${CONF} *.o *.lo *.c *.mk *.cache *.a *.h # Don't try to extract debug info from ${PROG}. MK_DEBUG_FILES= no # Set a default SRCDIR for each for simpler handling below. .for D in ${CRUNCH_SRCDIRS} .for P in ${CRUNCH_PROGS_${D}} CRUNCH_SRCDIR_${P}?= ${.CURDIR}/../../${D}/${P} .endfor .endfor # Program names and their aliases contribute hardlinks to 'rescue' executable, # except for those that get suppressed. .for D in ${CRUNCH_SRCDIRS} .for P in ${CRUNCH_PROGS_${D}} ${OUTPUTS}: ${CRUNCH_SRCDIR_${P}}/Makefile .if ${CRUNCH_GENERATE_LINKS} == "yes" .ifndef CRUNCH_SUPPRESS_LINK_${P} LINKS+= ${BINDIR}/${PROG} ${BINDIR}/${P} .endif .for A in ${CRUNCH_ALIAS_${P}} .ifndef CRUNCH_SUPPRESS_LINK_${A} LINKS+= ${BINDIR}/${PROG} ${BINDIR}/${A} .endif .endfor .endif .endfor .endfor +.if !defined(_SKIP_BUILD) all: ${PROG} +.endif exe: ${PROG} ${CONF}: Makefile echo \# Auto-generated, do not edit >${.TARGET} .ifdef CRUNCH_BUILDOPTS echo buildopts ${CRUNCH_BUILDOPTS} >>${.TARGET} .endif .ifdef CRUNCH_LIBS echo libs ${CRUNCH_LIBS} >>${.TARGET} .endif .ifdef CRUNCH_SHLIBS echo libs_so ${CRUNCH_SHLIBS} >>${.TARGET} .endif .for D in ${CRUNCH_SRCDIRS} .for P in ${CRUNCH_PROGS_${D}} echo progs ${P} >>${.TARGET} echo special ${P} srcdir ${CRUNCH_SRCDIR_${P}} >>${.TARGET} .ifdef CRUNCH_BUILDOPTS_${P} echo special ${P} buildopts DIRPRFX=${DIRPRFX}${P}/ \ ${CRUNCH_BUILDOPTS_${P}} >>${.TARGET} .else echo special ${P} buildopts DIRPRFX=${DIRPRFX}${P}/ >>${.TARGET} .endif .for A in ${CRUNCH_ALIAS_${P}} echo ln ${P} ${A} >>${.TARGET} .endfor .endfor .endfor CRUNCHGEN?= crunchgen CRUNCHENV?= MK_TESTS=no .ORDER: ${OUTPUTS} objs ${OUTPUTS}: ${CONF} .META MAKE=${MAKE} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${CRUNCHGEN} -fq \ -m ${OUTMK} -c ${OUTC} ${CONF} # These 2 targets cannot use .MAKE since they depend on the generated # ${OUTMK} above. ${PROG}: ${OUTPUTS} objs ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f ${OUTMK} exe objs: ${OUTMK} ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f ${OUTMK} objs # Someone should replace the bin/csh and bin/sh build-tools with # shell scripts so we can remove this nonsense. .for _tool in ${CRUNCH_BUILDTOOLS} build-tools-${_tool}: ${_+_}cd ${.CURDIR}/../../${_tool}; \ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools build-tools: build-tools-${_tool} .endfor # Use a separate build tree to hold files compiled for this crunchgen binary # Yes, this does seem to partly duplicate bsd.subdir.mk, but I can't # get that to cooperate with bsd.prog.mk. Besides, many of the standard # targets should NOT be propagated into the components. .for __target in clean cleandepend cleandir obj objlink .for D in ${CRUNCH_SRCDIRS} .for P in ${CRUNCH_PROGS_${D}} ${__target}_crunchdir_${P}: .PHONY .MAKE ${_+_}cd ${CRUNCH_SRCDIR_${P}} && \ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${__target} ${__target}: ${__target}_crunchdir_${P} .endfor .endfor .endfor clean: rm -f ${CLEANFILES} ${_+_}if [ -e ${.OBJDIR}/${OUTMK} ]; then \ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} \ -f ${OUTMK} clean; \ fi Index: head/share/mk/bsd.doc.mk =================================================================== --- head/share/mk/bsd.doc.mk (revision 296120) +++ head/share/mk/bsd.doc.mk (revision 296121) @@ -1,193 +1,195 @@ # from: @(#)bsd.doc.mk 5.3 (Berkeley) 1/2/91 # $FreeBSD$ # # The include file handles installing BSD troff documents. # # # +++ variables +++ # # DCOMPRESS_CMD Program to compress troff documents. Output is to stdout. # [${COMPRESS_CMD}] # # DESTDIR Change the tree where the documents get installed. [not set] # # DOC Document name. [paper] # # EXTRA Extra files (not SRCS) that make up the document. [not set] # # LPR Printer command. [lpr] # # MACROS Macro packages used to build the document. [not set] # # WITHOUT_DOCCOMPRESS If you do not want formatted troff documents to be # compressed when they are installed. [not set] # # PRINTERDEVICE Indicates which output formats will be generated # (ascii, ps, html). [ascii] # # SRCDIR Directory where source files live. [${.CURDIR}] # # SRCS List of source files. [not set] # # TRFLAGS Additional flags to groff(1). [not set] # # USE_EQN If set, preprocess with eqn(1). [not set] # # USE_PIC If set, preprocess with pic(1). [not set] # # USE_REFER If set, preprocess with refer(1). [not set] # # USE_SOELIM If set, preprocess with soelim(1). [not set] # # USE_TBL If set, preprocess with tbl(1). [not set] # # VOLUME Volume the document belongs to. [not set] .include PRINTERDEVICE?= ascii BIB?= bib GREMLIN?= grn GRIND?= vgrind -f INDXBIB?= indxbib PIC?= pic REFER?= refer .for _dev in ${PRINTERDEVICE:Mascii} ROFF.ascii?= groff -Tascii -P-c ${TRFLAGS} -mtty-char ${MACROS} ${PAGES:C/^/-o/1} .endfor .for _dev in ${PRINTERDEVICE:Nascii} ROFF.${_dev}?= groff -T${_dev} ${TRFLAGS} ${MACROS} ${PAGES:C/^/-o/1} .endfor SOELIM?= soelim TBL?= tbl DOC?= paper LPR?= lpr .if defined(USE_EQN) TRFLAGS+= -e .endif .if defined(USE_PIC) TRFLAGS+= -p .endif .if defined(USE_REFER) TRFLAGS+= -R .endif .if defined(USE_SOELIM) TRFLAGS+= -I${.CURDIR} .endif .if defined(USE_TBL) TRFLAGS+= -t .endif DCOMPRESS_EXT?= ${COMPRESS_EXT} DCOMPRESS_CMD?= ${COMPRESS_CMD} .for _dev in ${PRINTERDEVICE:Mhtml} DFILE.html= ${DOC}.html .endfor .for _dev in ${PRINTERDEVICE:Nhtml} .if ${MK_DOCCOMPRESS} == "no" DFILE.${_dev}= ${DOC}.${_dev} .else DFILE.${_dev}= ${DOC}.${_dev}${DCOMPRESS_EXT} .endif .endfor UNROFF?= unroff HTML_SPLIT?= yes UNROFFFLAGS?= -fhtml .if ${HTML_SPLIT} == "yes" UNROFFFLAGS+= split=1 .endif # Compatibility mode flag for groff. Use this when formatting documents with # Berkeley me macros (orig_me(7)). COMPAT?= -C .PATH: ${.CURDIR} ${SRCDIR} +.if !defined(_SKIP_BUILD) .for _dev in ${PRINTERDEVICE} all: ${DFILE.${_dev}} .endfor +.endif .if !target(print) .for _dev in ${PRINTERDEVICE} print: ${DFILE.${_dev}} .endfor print: .for _dev in ${PRINTERDEVICE} .if ${MK_DOCCOMPRESS} == "no" ${LPR} ${DFILE.${_dev}} .else ${DCOMPRESS_CMD} -d ${DFILE.${_dev}} | ${LPR} .endif .endfor .endif .for _dev in ${PRINTERDEVICE:Nascii:Nps:Nhtml} CLEANFILES+= ${DOC}.${_dev} ${DOC}.${_dev}${DCOMPRESS_EXT} .endfor CLEANFILES+= ${DOC}.ascii ${DOC}.ascii${DCOMPRESS_EXT} \ ${DOC}.ps ${DOC}.ps${DCOMPRESS_EXT} \ ${DOC}.html ${DOC}-*.html realinstall: .if ${PRINTERDEVICE:Mhtml} cd ${SRCDIR}; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ ${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME}/ .endif .for _dev in ${PRINTERDEVICE:Nhtml} ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ ${DFILE.${_dev}} ${DESTDIR}${BINDIR}/${VOLUME}/ .endfor spell: ${SRCS} (cd ${.CURDIR}; spell ${SRCS} ) | sort | \ comm -23 - ${.CURDIR}/spell.ok > ${DOC}.spell BINDIR?= /usr/share/doc BINMODE= 444 SRCDIR?= ${.CURDIR} .if defined(EXTRA) && !empty(EXTRA) _stamp.extra: ${EXTRA} touch ${.TARGET} .endif CLEANFILES+= _stamp.extra .for _dev in ${PRINTERDEVICE:Nhtml} .if !target(${DFILE.${_dev}}) .if target(_stamp.extra) ${DFILE.${_dev}}: _stamp.extra .endif ${DFILE.${_dev}}: ${SRCS} .if ${MK_DOCCOMPRESS} == "no" ${ROFF.${_dev}} ${.ALLSRC:N_stamp.extra} > ${.TARGET} .else ${ROFF.${_dev}} ${.ALLSRC:N_stamp.extra} | ${DCOMPRESS_CMD} > ${.TARGET} .endif .endif .endfor .for _dev in ${PRINTERDEVICE:Mhtml} .if !target(${DFILE.html}) .if target(_stamp.extra) ${DFILE.html}: _stamp.extra .endif ${DFILE.html}: ${SRCS} .if defined(MACROS) && !empty(MACROS) cd ${SRCDIR}; ${UNROFF} ${MACROS} ${UNROFFFLAGS} \ document=${DOC} ${SRCS} .else # unroff(1) requires a macro package as an argument cd ${SRCDIR}; ${UNROFF} -ms ${UNROFFFLAGS} \ document=${DOC} ${SRCS} .endif .endif .endfor DISTRIBUTION?= doc .include Index: head/share/mk/bsd.files.mk =================================================================== --- head/share/mk/bsd.files.mk (revision 296120) +++ head/share/mk/bsd.files.mk (revision 296121) @@ -1,96 +1,98 @@ # $FreeBSD$ .if !target(____) .error bsd.files.mk cannot be included directly. .endif .if !target(____) ____: FILESGROUPS?= FILES .for group in ${FILESGROUPS} # Add in foo.yes and remove duplicates from all the groups ${${group}}:= ${${group}} ${${group}.yes} ${${group}}:= ${${group}:O:u} buildfiles: ${${group}} .endfor +.if !defined(_SKIP_BUILD) all: buildfiles +.endif .for group in ${FILESGROUPS} .if defined(${group}) && !empty(${group}) installfiles: installfiles-${group} ${group}OWN?= ${SHAREOWN} ${group}GRP?= ${SHAREGRP} ${group}MODE?= ${SHAREMODE} ${group}DIR?= ${BINDIR} .if !make(buildincludes) STAGE_SETS+= ${group} .endif STAGE_DIR.${group}= ${STAGE_OBJTOP}${${group}DIR} _${group}FILES= .for file in ${${group}} .if defined(${group}OWN_${file:T}) || defined(${group}GRP_${file:T}) || \ defined(${group}MODE_${file:T}) || defined(${group}DIR_${file:T}) || \ defined(${group}NAME_${file:T}) || defined(${group}NAME) ${group}OWN_${file:T}?= ${${group}OWN} ${group}GRP_${file:T}?= ${${group}GRP} ${group}MODE_${file:T}?= ${${group}MODE} ${group}DIR_${file:T}?= ${${group}DIR} .if defined(${group}NAME) ${group}NAME_${file:T}?= ${${group}NAME} .else ${group}NAME_${file:T}?= ${file:T} .endif .if !make(buildincludes) STAGE_AS_SETS+= ${file:T} .endif STAGE_AS_${file:T}= ${${group}NAME_${file:T}} # XXX {group}OWN,GRP,MODE STAGE_DIR.${file:T}= ${STAGE_OBJTOP}${${group}DIR_${file:T}} stage_as.${file:T}: ${file} installfiles-${group}: _${group}INS_${file:T} _${group}INS_${file:T}: ${file} ${INSTALL} -o ${${group}OWN_${.ALLSRC:T}} \ -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ ${.ALLSRC} \ ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}} .else _${group}FILES+= ${file} .endif .endfor .if !empty(_${group}FILES) stage_files.${group}: ${_${group}FILES} installfiles-${group}: _${group}INS _${group}INS: ${_${group}FILES} .if defined(${group}NAME) ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \ -m ${${group}MODE} ${.ALLSRC} \ ${DESTDIR}${${group}DIR}/${${group}NAME} .else ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \ -m ${${group}MODE} ${.ALLSRC} ${DESTDIR}${${group}DIR}/ .endif .endif .endif # defined(${group}) && !empty(${group}) .endfor realinstall: installfiles .ORDER: beforeinstall installfiles .if ${MK_STAGING} != "no" .if !empty(STAGE_SETS) buildfiles: stage_files .if !empty(STAGE_AS_SETS) buildfiles: stage_as .endif .endif .endif .endif # !target(____) Index: head/share/mk/bsd.incs.mk =================================================================== --- head/share/mk/bsd.incs.mk (revision 296120) +++ head/share/mk/bsd.incs.mk (revision 296121) @@ -1,101 +1,103 @@ # $FreeBSD$ .if !target(____) .error bsd.incs.mk cannot be included directly. .endif .if ${MK_INCLUDES} != "no" INCSGROUPS?= INCS .if !target(buildincludes) .for group in ${INCSGROUPS} buildincludes: ${${group}} .endfor .endif +.if !defined(_SKIP_BUILD) all: buildincludes +.endif .if !target(installincludes) .for group in ${INCSGROUPS} .if defined(${group}) && !empty(${group}) ${group}OWN?= ${BINOWN} ${group}GRP?= ${BINGRP} ${group}MODE?= ${NOBINMODE} ${group}DIR?= ${INCLUDEDIR}${PRIVATELIB:D/private/${LIB}} STAGE_SETS+= ${group} STAGE_DIR.${group}= ${STAGE_OBJTOP}${${group}DIR} STAGE_SYMLINKS_DIR.${group}= ${STAGE_OBJTOP} _${group}INCS= .for header in ${${group}} .if defined(${group}OWN_${header:T}) || defined(${group}GRP_${header:T}) || \ defined(${group}MODE_${header:T}) || defined(${group}DIR_${header:T}) || \ defined(${group}NAME_${header:T}) || defined(${group}NAME) ${group}OWN_${header:T}?= ${${group}OWN} ${group}GRP_${header:T}?= ${${group}GRP} ${group}MODE_${header:T}?= ${${group}MODE} ${group}DIR_${header:T}?= ${${group}DIR} .if defined(${group}NAME) ${group}NAME_${header:T}?= ${${group}NAME} .else ${group}NAME_${header:T}?= ${header:T} .endif STAGE_AS_SETS+= ${header:T} STAGE_AS_${header:T}= ${${group}NAME_${header:T}} # XXX {group}OWN,GRP,MODE STAGE_DIR.${header:T}= ${STAGE_OBJTOP}${${group}DIR_${header:T}} stage_as.${header:T}: ${header} stage_includes: stage_as.${header:T} installincludes: _${group}INS_${header:T} _${group}INS_${header:T}: ${header} ${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \ -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ ${.ALLSRC} \ ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}} .else _${group}INCS+= ${header} .endif .endfor .if !empty(_${group}INCS) stage_files.${group}: ${_${group}INCS} stage_includes: stage_files.${group} installincludes: _${group}INS _${group}INS: ${_${group}INCS} .if defined(${group}NAME) ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ ${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME} .else ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ ${.ALLSRC} ${DESTDIR}${${group}DIR}/ .endif .endif .endif # defined(${group}) && !empty(${group}) .endfor .if defined(INCSLINKS) && !empty(INCSLINKS) installincludes: .for s t in ${INCSLINKS} ${INSTALL_SYMLINK} ${s} ${DESTDIR}${t} .endfor .endif .endif # !target(installincludes) realinstall: installincludes .ORDER: beforeinstall installincludes .if ${MK_STAGING} != "no" && !defined(_SKIP_BUILD) .if !defined(NO_STAGE_INCLUDES) STAGE_TARGETS+= stage_includes .if !empty(INCSLINKS) STAGE_TARGETS+= stage_symlinks STAGE_SYMLINKS.INCS= ${INCSLINKS} .endif .endif .endif .endif # ${MK_INCLUDES} != "no" Index: head/share/mk/bsd.info.mk =================================================================== --- head/share/mk/bsd.info.mk (revision 296120) +++ head/share/mk/bsd.info.mk (revision 296121) @@ -1,195 +1,196 @@ # $FreeBSD$ # # The include file handles installing GNU (tech)info files. # Texinfo is a documentation system that uses a single source # file to produce both on-line information and printed output. # # # +++ variables +++ # # CLEANFILES Additional files to remove for the clean and cleandir targets. # # DESTDIR Change the tree where the info files gets installed. [not set] # # DVIPS A program which convert a TeX DVI file to PostScript [dvips] # # DVIPS2ASCII A program to convert a PostScript file which was prior # converted from a TeX DVI file to ascii/latin1 [dvips2ascii] # # FORMATS Indicates which output formats will be generated # (info, dvi, latin1, ps, html). [info] # # ICOMPRESS_CMD Program to compress info files. Output is to # stdout. [${COMPRESS_CMD}] # # INFO texinfo files, without suffix. [set in Makefile] # # INFO2HTML A program for converting GNU info files into HTML files # [info2html] # # INFODIR Base path for GNU's hypertext system # called Info (see info(1)). [${SHAREDIR}/info] # # INFODIRFILE Top level node/index for info files. [dir] # # INFOGRP Info group. [${SHAREGRP}] # # INFOMODE Info mode. [${NOBINMODE}] # # INFOOWN Info owner. [${SHAREOWN}] # # INFOSECTION Default section (if one could not be found in # the Info file). [Miscellaneous] # # INSTALLINFO A program for installing directory entries from Info # file in the ${INFODIR}/${INFODIRFILE}. [install-info] # # INSTALLINFOFLAGS Options for ${INSTALLINFO} command. [--quiet] # # INSTALLINFODIRS ??? # # MAKEINFO A program for converting GNU Texinfo files into Info # file. [makeinfo] # # MAKEINFOFLAGS Options for ${MAKEINFO} command. [--no-split] # # NO_INFOCOMPRESS If you do not want info files be # compressed when they are installed. [not set] # # TEX A program for converting tex files into dvi files [tex] # # # +++ targets +++ # # install: # Install the info files. # # # bsd.obj.mk: cleandir and obj .include MAKEINFO?= makeinfo MAKEINFOFLAGS+= --no-split # simplify some things, e.g., compression SRCDIR?= ${.CURDIR} INFODIRFILE?= dir INSTALLINFO?= install-info INSTALLINFOFLAGS+=--quiet INFOSECTION?= Miscellaneous ICOMPRESS_CMD?= ${COMPRESS_CMD} ICOMPRESS_EXT?= ${COMPRESS_EXT} FORMATS?= info INFO2HTML?= info2html TEX?= tex DVIPS?= dvips DVIPS2ASCII?= dvips2ascii .SUFFIXES: ${ICOMPRESS_EXT} .info .texi .texinfo .dvi .ps .latin1 .html .texi.info .texinfo.info: ${MAKEINFO} ${MAKEINFOFLAGS} -I ${.CURDIR} -I ${SRCDIR} ${.IMPSRC} \ -o ${.TARGET} .texi.dvi .texinfo.dvi: TEXINPUTS=${.CURDIR}:${SRCDIR}:$$TEXINPUTS \ ${TEX} ${.IMPSRC} > ${.IMPSRC:T:R}-la.texi TEXINPUTS=${.CURDIR}:${SRCDIR}:$$TEXINPUTS \ ${TEX} ${.IMPSRC:T:R}-la.texi ${.TARGET}.new mv -f ${.TARGET}.new ${.TARGET} .dvi.ps: ${DVIPS} -o ${.TARGET} ${.IMPSRC} .info.html: ${INFO2HTML} ${.IMPSRC} ${INSTALL_LINK} ${.TARGET:R}.info.Top.html ${.TARGET} .PATH: ${.CURDIR} ${SRCDIR} .for _f in ${FORMATS} IFILENS+= ${INFO:S/$/.${_f}/} .endfor CLEANFILES+= ${IFILENS} .if !defined(NO_INFOCOMPRESS) CLEANFILES+= ${IFILENS:S/$/${ICOMPRESS_EXT}/} IFILES= ${IFILENS:S/$/${ICOMPRESS_EXT}/:S/.html${ICOMPRESS_EXT}/.html/} -all: ${IFILES} .else IFILES= ${IFILENS} +.endif +.if !defined(_SKIP_BUILD) all: ${IFILES} .endif .for x in ${IFILENS} ${x:S/$/${ICOMPRESS_EXT}/}: ${x} ${ICOMPRESS_CMD} ${.ALLSRC} > ${.TARGET} .endfor .for x in ${INFO} INSTALLINFODIRS+= ${x:S/$/-install/} ${x:S/$/-install/}: .if !empty(.MAKEFLAGS:M-j) lockf -k ${DESTDIR}${INFODIR}/${INFODIRFILE} \ ${INSTALLINFO} ${INSTALLINFOFLAGS} \ --defsection=${INFOSECTION} \ --defentry=${INFOENTRY_${x}} \ ${x}.info ${DESTDIR}${INFODIR}/${INFODIRFILE} .else ${INSTALLINFO} ${INSTALLINFOFLAGS} \ --defsection=${INFOSECTION} \ --defentry=${INFOENTRY_${x}} \ ${x}.info ${DESTDIR}${INFODIR}/${INFODIRFILE} .endif .endfor .PHONY: ${INSTALLINFODIRS} .if defined(SRCS) CLEANFILES+= ${INFO}.texi ${INFO}.texi: ${SRCS} cat ${.ALLSRC} > ${.TARGET} .endif # tex garbage .if !empty(FORMATS:Mps) || !empty(FORMATS:Mdvi) || !empty(FORMATS:Mlatin1) .for _f in aux cp fn ky log out pg toc tp vr dvi CLEANFILES+= ${INFO:S/$/.${_f}/} ${INFO:S/$/-la.${_f}/} .endfor CLEANFILES+= ${INFO:S/$/-la.texi/} .endif .if !empty(FORMATS:Mhtml) CLEANFILES+= ${INFO:S/$/.info.*.html/} ${INFO:S/$/.info/} .endif .if defined(INFO) install: ${INSTALLINFODIRS} .if !empty(IFILES:N*.html) ${INSTALL} -o ${INFOOWN} -g ${INFOGRP} -m ${INFOMODE} \ ${IFILES:N*.html} ${DESTDIR}${INFODIR}/ .endif .if !empty(FORMATS:Mhtml) ${INSTALL} -o ${INFOOWN} -g ${INFOGRP} -m ${INFOMODE} \ ${INFO:S/$/.info.*.html/} ${DESTDIR}${INFODIR}/ .endif .else # The indirection in the following is to avoid the null install rule # "install:" from being overridden by the implicit .sh rule if there # happens to be a source file named install.sh. This assumes that there # is no source file named __null_install.sh. install: __null_install __null_install: .endif .include Index: head/share/mk/bsd.progs.mk =================================================================== --- head/share/mk/bsd.progs.mk (revision 296120) +++ head/share/mk/bsd.progs.mk (revision 296121) @@ -1,130 +1,132 @@ # $FreeBSD$ # $Id: progs.mk,v 1.11 2012/11/06 17:18:54 sjg Exp $ # # @(#) Copyright (c) 2006, Simon J. Gerraty # # This file is provided in the hope that it will # be of use. There is absolutely NO WARRANTY. # Permission to copy, redistribute or otherwise # use this file is hereby granted provided that # the above copyright notice and this notice are # left intact. # # Please send copies of changes and bug-fixes to: # sjg@crufty.net # .MAIN: all .if defined(PROGS) || defined(PROGS_CXX) # we really only use PROGS below... PROGS += ${PROGS_CXX} # In meta mode, we can capture dependenices for _one_ of the progs. # if makefile doesn't nominate one, we use the first. .ifndef UPDATE_DEPENDFILE_PROG UPDATE_DEPENDFILE_PROG = ${PROGS:[1]} .export UPDATE_DEPENDFILE_PROG .endif .if defined(PROG) # just one of many PROG_OVERRIDE_VARS += BINDIR BINGRP BINOWN BINMODE DPSRCS MAN NO_WERROR \ PROGNAME SRCS WARNS PROG_VARS += CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS LDADD LIBADD LINKS \ LDFLAGS MLINKS ${PROG_OVERRIDE_VARS} .for v in ${PROG_VARS:O:u} .if empty(${PROG_OVERRIDE_VARS:M$v}) .if defined(${v}.${PROG}) $v += ${${v}.${PROG}} .elif defined(${v}_${PROG}) $v += ${${v}_${PROG}} .endif .else $v ?= .endif .endfor # for meta mode, there can be only one! .if ${PROG} == ${UPDATE_DEPENDFILE_PROG} UPDATE_DEPENDFILE ?= yes .endif UPDATE_DEPENDFILE ?= NO # prog.mk will do the rest .else # !defined(PROG) +.if !defined(_SKIP_BUILD) all: ${PROGS} +.endif # We cannot capture dependencies for meta mode here UPDATE_DEPENDFILE = NO .endif .endif # PROGS || PROGS_CXX # These are handled by the main make process. .ifdef _RECURSING_PROGS _PROGS_GLOBAL_VARS= CLEANFILES CLEANDIRS CONFGROUPS FILESGROUPS INCSGROUPS \ SCRIPTS .for v in ${_PROGS_GLOBAL_VARS} $v = .endfor .endif # handle being called [bsd.]progs.mk .include .if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) # tell progs.mk we might want to install things PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install # Find common sources among the PROGS and depend on them before building # anything. This allows parallelization without them each fighting over # the same objects. _PROGS_COMMON_SRCS= _PROGS_ALL_SRCS= .for p in ${PROGS} .for s in ${SRCS.${p}} .if ${_PROGS_ALL_SRCS:M${s}} && !${_PROGS_COMMON_SRCS:M${s}} _PROGS_COMMON_SRCS+= ${s} .else _PROGS_ALL_SRCS+= ${s} .endif .endfor .endfor .if !empty(_PROGS_COMMON_SRCS) _PROGS_COMMON_OBJS= ${_PROGS_COMMON_SRCS:M*.[dhly]} .if !empty(_PROGS_COMMON_SRCS:N*.[dhly]) _PROGS_COMMON_OBJS+= ${_PROGS_COMMON_SRCS:N*.[dhly]:R:S/$/.o/g} .endif ${PROGS}: ${_PROGS_COMMON_OBJS} .endif .for p in ${PROGS} .if defined(PROGS_CXX) && !empty(PROGS_CXX:M$p) # bsd.prog.mk may need to know this x.$p= PROG_CXX=$p .endif # Main PROG target $p ${p}_p: .PHONY .MAKE (cd ${.CURDIR} && \ DEPENDFILE=.depend.$p \ NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS=t \ PROG=$p ${x.$p}) # Pseudo targets for PROG, such as 'install'. .for t in ${PROGS_TARGETS:O:u} $p.$t: .PHONY .MAKE (cd ${.CURDIR} && \ DEPENDFILE=.depend.$p \ NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS=t \ PROG=$p ${x.$p} ${@:E}) .endfor .endfor # Depend main pseudo targets on all PROG.pseudo targets too. .for t in ${PROGS_TARGETS:O:u} .if make(${t}) $t: ${PROGS:%=%.$t} .endif .endfor .endif # !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG)