Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tools/compat Make tools/compat/Makefile install the library in
details: https://anonhg.NetBSD.org/src/rev/c11cb248ee63
branches: trunk
changeset: 783041:c11cb248ee63
user: apb <apb%NetBSD.org@localhost>
date: Sun Dec 02 12:34:51 2012 +0000
description:
Make tools/compat/Makefile install the library in
${TOOLDIR}/lib/libnbcompat.a, install the include files in
${TOOLDIR}/include/compat/**, and install defs.mk in
${TOOLDIR}/share/compat/defs.mk. Previously, nothing from
tools/compat was installed under TOOLDIR.
Adjust tools/compat/Makefile to use an uninstalled copy of
host-mkdep from the .OBJDIR of tools/host-mkdep, and an uninstalled
copy of the install program from the .OBJDIR of tools/binstall.
This allows it to be built after tools/host-mkdep is built but
before tools/host-mkdep is installed; and to be installed after
tools/binstall is built but before tools/binstall is installed.
diffstat:
tools/compat/Makefile | 58 +++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 52 insertions(+), 6 deletions(-)
diffs (89 lines):
diff -r 4af9d287ea5d -r c11cb248ee63 tools/compat/Makefile
--- a/tools/compat/Makefile Sun Dec 02 12:25:25 2012 +0000
+++ b/tools/compat/Makefile Sun Dec 02 12:34:51 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.60 2012/12/02 12:19:34 apb Exp $
+# $NetBSD: Makefile,v 1.61 2012/12/02 12:34:51 apb Exp $
HOSTLIB= nbcompat
@@ -55,6 +55,7 @@
DPSRCS+= defs.mk
CLEANFILES+= config.log config.status configure.lineno *.stamp
+CLEANDIRFILES+= defs.mk config.cache confdefs.h
# Get components of Berkeley DB.
_CURDIR:= ${.CURDIR}
@@ -72,14 +73,55 @@
defs.mk: config.cache
@touch ${.TARGET}
+INCFILES= nbtool_config.h
+INCSUBDIRS= sys machine rpc arpa
+CLEANDIRFILES+= ${INCFILES}
+
+# CLEANDIRFILES may not contain directory names
+cleandir: cleandir.include
+cleandir.include: .PHONY
+ rm -rf include
+
include/.stamp:
- mkdir -p include/sys include/machine include/rpc include/arpa
+ mkdir -p ${INCSUBDIRS:@d@ include/$d @}
@touch ${.TARGET}
-cleandir:
- -rm -f nbtool_config.h confdefs.h defs.mk
- -rm -r -f include
- -rm -f config.cache
+# Install rules
+
+HOST_LIBDIR= ${TOOLDIR}/lib
+HOST_INCSDIR= ${TOOLDIR}/include
+HOST_SHAREDIR= ${TOOLDIR}/share
+
+install: .PHONY install.lib install.includes install.defs.mk
+
+# Install lib${HOSTLIB}.a in ${TOOLDIR}/lib
+install.lib: .PHONY ${HOST_LIBDIR}/lib${HOSTLIB}.a
+${HOST_LIBDIR}/lib${HOSTLIB}.a: lib${HOSTLIB}.a
+ ${_MKTARGET_INSTALL}
+ ${HOST_INSTALL_DIR} ${HOST_LIBDIR}
+ ${HOST_INSTALL_FILE} -m ${LIBMODE} ${.ALLSRC} ${.TARGET}
+
+# Install include files in ${TOOLDIR}/include/compat
+install.includes: .PHONY
+ ${_MKMSG_INSTALL} "${HOST_INCSDIR}/*"
+ ${HOST_INSTALL_DIR} ${HOST_INCSDIR}
+ ${HOST_INSTALL_DIR} ${HOST_INCSDIR}/compat
+ ${HOST_INSTALL_FILE} ${INCFILES} ${HOST_INCSDIR}/compat/
+.for _d in ${INCSUBDIRS}
+ ${HOST_INSTALL_DIR} ${HOST_INCSDIR}/compat/${_d}
+ touch include/${_d}/dummy # ensure dir is not empty
+ ${HOST_INSTALL_FILE} include/${_d}/* ${HOST_INCSDIR}/compat/${_d}/
+.endfor
+
+# Install defs.mk in ${TOOLDIR}/share/compat
+install.defs.mk: .PHONY ${HOST_SHAREDIR}/compat/defs.mk
+${HOST_SHAREDIR}/compat/defs.mk: defs.mk
+ ${_MKTARGET_INSTALL}
+ ${HOST_INSTALL_DIR} ${HOST_SHAREDIR}
+ ${HOST_INSTALL_DIR} ${HOST_SHAREDIR}/compat
+ ${HOST_INSTALL_FILE} ${.ALLSRC} ${.TARGET}
+
+# bsd.hostlib.mk wants HOST_CPPFLAGS, not CPPFLAGS
HOST_CPPFLAGS:= ${CPPFLAGS}
CPPFLAGS:= # empty
@@ -91,6 +133,10 @@
HOST_MKDEP= ${HOST_MKDEP_OBJ}/host-mkdep
MKDEP= ${HOST_MKDEP}
+# Use uninstalled copy of the install program
+INSTALL_OBJ!= cd ${NETBSDSRCDIR}/tools/binstall && ${PRINTOBJDIR}
+INSTALL= ${INSTALL_OBJ}/xinstall
+
# Run "${TOOLDIR}/bin/nbmake-${MACHINE} regen" by hand after editing
# configure.ac. See more detailed instructions in configure.ac.
regen:
Home |
Main Index |
Thread Index |
Old Index