[BACK]Return to bsd.hostprog.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / mk

File: [cvs.NetBSD.org] / src / share / mk / bsd.hostprog.mk (download)

Revision, Sat Jun 6 22:10:12 2009 UTC (11 years, 4 months ago) by bouyer
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base, matt-nb5-pq3
Changes since 1.53: +2 -1 lines

Pull up following revision(s) (requested by snj in ticket #790):
	share/mk/bsd.lib.mk: revision 1.298
	share/mk/bsd.man.mk: revision 1.100
	share/mk/bsd.hostprog.mk: revision 1.55
	distrib/sets/maketars: revision 1.66
	share/zoneinfo/Makefile: revision 1.43
	share/mk/bsd.kmodule.mk: revision 1.19
	usr.bin/xinstall/xinstall.c: revisions 1.106 - 1.108 via patch
	share/mk/bsd.prog.mk: revision 1.241
	share/dict/Makefile: revision 1.17
	share/mk/bsd.README: revision 1.249
	distrib/common/parselist.awk: revision 1.16
	share/mk/bsd.links.mk: revision 1.34
Explicitly sort entries on preparing set files from METALOG.
METALOG could have different order due to install(1) race
on parallel builds, and mtree(8) doesn't sort files.
Should fix inconsistent shared sets among builds as seen in
/pub/NetBSD-daily/netbsd-5/200904010000Z/shared/ and
/pub/NetBSD-daily/netbsd-5/200904010002Z/shared/ dirs.
Okay'ed by snj@.
Changes for installing with a metalog:
* When installing hard links and using a metalog, if -o, -g, -m, or -f
  args were explicitly specified on the command line, then believe them,
  but do not implicitly believe uname/gname/mode/flags from the file
* Output fields in the same order used by mtree.
Fix -Wshadow -Wcast-qual issues
Re-calculate size and digestresult after stripping, to ensure that
correct values appear in the metalog.
Add LINKSOWN, LINKSGRP, and LINKSMODE variables for use by bsd.links.mk
when installing hard links.  They have no effect except when using a
metalog, in which case the information is added to the metalog.  In
the future, these variables may be replaced by a method for explicitly
recording hard links in a metadata log.
Also change a few things that called ${INSTALL_LINK} without going
through bsd.links.mk.
Reviewed by perry and joerg.  This should fix PR 24457 and PR 41155.

#	$NetBSD: bsd.hostprog.mk,v 2009/06/06 22:10:12 bouyer Exp $
#	@(#)bsd.prog.mk	8.2 (Berkeley) 4/2/94

.include <bsd.init.mk>
.include <bsd.sys.mk>

##### Basic targets
clean:		cleanprog

##### Default values
LIBBLUETOOTH?=	/usr/lib/libbluetooth.a
LIBBZ2?=	/usr/lib/libbz2.a
LIBC?=		/usr/lib/libc.a
LIBC_PIC?=	/usr/lib/libc_pic.a
LIBC_SO?=	/usr/lib/libc.so
LIBCOMPAT?=	/usr/lib/libcompat.a
LIBCRYPT?=	/usr/lib/libcrypt.a
LIBCURSES?=	/usr/lib/libcurses.a
LIBDBM?=	/usr/lib/libdbm.a
LIBDES?=	/usr/lib/libdes.a
LIBEDIT?=	/usr/lib/libedit.a
LIBEVENT?=	/usr/lib/libevent.a
LIBFETCH?=	/usr/lib/libfetch.a
LIBFORM?=	/usr/lib/libform.a
LIBGCC?=	/usr/lib/libgcc.a
LIBGNUMALLOC?=	/usr/lib/libgnumalloc.a
LIBINTL?=	/usr/lib/libintl.a
LIBIPSEC?=	/usr/lib/libipsec.a
LIBKVM?=	/usr/lib/libkvm.a
LIBL?=		/usr/lib/libl.a
LIBM?=		/usr/lib/libm.a
LIBMAGIC?=	/usr/lib/libmagic.a
LIBMENU?=	/usr/lib/libmenu.a
LIBMP?=		/usr/lib/libmp.a
LIBNTP?=	/usr/lib/libntp.a
LIBOBJC?=	/usr/lib/libobjc.a
LIBP2K?=	/usr/lib/libp2k.a
LIBPC?=		/usr/lib/libpc.a
LIBPCAP?=	/usr/lib/libpcap.a
LIBPCI?=	/usr/lib/libpci.a
LIBPLOT?=	/usr/lib/libplot.a
LIBPOSIX?=	/usr/lib/libposix.a
LIBPUFFS?=	/usr/lib/libpuffs.a
LIBRESOLV?=	/usr/lib/libresolv.a
LIBRPCSVC?=	/usr/lib/librpcsvc.a
LIBRUMP?=	/usr/lib/librump.a
LIBRUMPUSER?=	/usr/lib/librumpuser.a
LIBSDP?=	/usr/lib/libsdp.a
LIBSKEY?=	/usr/lib/libskey.a
LIBSSP?=	/usr/lib/libssp.a
LIBSTDCXX?=	/usr/lib/libstdc++.a
LIBSUPCXX?=	/usr/lib/libsupc++.a
LIBTERMCAP?=	/usr/lib/libtermcap.a
LIBUTIL?=	/usr/lib/libutil.a
LIBWRAP?=	/usr/lib/libwrap.a
LIBUKFS?=	/usr/lib/libukfs.a
LIBY?=		/usr/lib/liby.a
LIBZ?=		/usr/lib/libz.a

##### rump file system modules
LIBRUMPFS_CD9660FS?=	/usr/lib/librumpfs_cd9660fs.a
LIBRUMPFS_EFS?=		/usr/lib/librumpfs_efs.a
LIBRUMPFS_EXT2FS?=	/usr/lib/librumpfs_ext2fs.a
LIBRUMPFS_FFS?=		/usr/lib/librumpfs_ffs.a
LIBRUMPFS_HFS?=		/usr/lib/librumpfs_hfs.a
LIBRUMPFS_LFS?=		/usr/lib/librumpfs_lfs.a
LIBRUMPFS_MSDOSFS?=	/usr/lib/librumpfs_msdosfs.a
LIBRUMPFS_NTFS?=	/usr/lib/librumpfs_ntfs.a
LIBRUMPFS_SYSPUFFS?=	/usr/lib/librumpfs_syspuffs.a
LIBRUMPFS_TMPFS?=	/usr/lib/librumpfs_tmpfs.a
LIBRUMPFS_UDF?=		/usr/lib/librumpfs_udf.a
LIBRUMPFS_UFS?=		/usr/lib/librumpfs_ufs.a


# Override these:


##### Build rules
.if defined(HOSTPROG_CXX)

.if defined(HOSTPROG)

_YHPSRCS=	${SRCS:M*.[ly]:C/\..$/.c/} ${YHEADER:D${SRCS:M*.y:.y=.h}}

.if !empty(SRCS:N*.h:N*.sh)
OBJS+=		${SRCS:N*.h:N*.sh:R:S/$/.lo/g}
LOBJS+=		${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}

.if defined(OBJS) && !empty(OBJS)


.endif	# defined(OBJS) && !empty(OBJS)

.if !defined(MAN)
.endif	# !defined(MAN)
.endif	# defined(HOSTPROG)

realall: ${HOSTPROG}

cleanprog: .PHONY
	rm -f a.out [Ee]rrs mklog core *.core \


lint: ${LOBJS}
.if defined(LOBJS) && !empty(LOBJS)

##### Pull in related .mk logic
.include <bsd.man.mk>
.include <bsd.nls.mk>
.include <bsd.files.mk>
.include <bsd.inc.mk>
.include <bsd.links.mk>
.include <bsd.dep.mk>

${TARGETS}:	# ensure existence

# Override YACC/LEX rules so nbtool_config.h can be forced as the 1st include
	${LEX.l} -o${.TARGET} ${.IMPSRC}
	echo '#if HAVE_NBTOOL_CONFIG_H' > ${.TARGET}.1
	echo '#include "nbtool_config.h"' >> ${.TARGET}.1
	echo '#endif' >> ${.TARGET}.1
	cat ${.TARGET} >> ${.TARGET}.1
	mv ${.TARGET}.1 ${.TARGET}
	${YACC.y} -o ${.TARGET} ${.IMPSRC}
	echo '#if HAVE_NBTOOL_CONFIG_H' > ${.TARGET}.1
	echo '#include "nbtool_config.h"' >> ${.TARGET}.1
	echo '#endif' >> ${.TARGET}.1
	cat ${.TARGET} >> ${.TARGET}.1
	mv ${.TARGET}.1 ${.TARGET}