[BACK]Return to Makefile.inc CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / external / bsd / kyua-cli

File: [cvs.NetBSD.org] / src / external / bsd / kyua-cli / Makefile.inc (download)

Revision 1.4, Sat Jul 5 19:22:41 2014 UTC (9 years, 9 months ago) by dholland
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, is-mlppp-base, is-mlppp, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Changes since 1.3: +2 -2 lines

Reorg docs, part 1:
Move all the reference manuals to subdirs of /usr/share/doc/reference.
We have subdirs ref1-ref9, corresponding to man page sections 1-9.

Everything that's the reference manual for a program (sections 1, 6,
8), C interface (sections 2, 3), driver or file system (section 4),
format or configuration (section 5), or kernel internal interface
(section 9) belongs in here.

Section 7 is a little less clear: some things that might go in section
7 if they were a man page aren't really reference manuals. So I'm only
putting things in reference section 7 that are (to me) clearly
reference material, rather than e.g. tutorials, guides, FAQs, etc.
This obviously leaves some room for debate, especially without first
editing the docs with this distinction in mind, but if people hate
what I've done things can always be moved again.

Note also that while roff macro man pages traditionally go in section
7, I have put all the roff documentation (macros, tools, etc.) in one
place in reference/ref1/roff. This will make it easier to find and
also easier to edit it into some kind of coherent form.

# $NetBSD: Makefile.inc,v 1.4 2014/07/05 19:22:41 dholland Exp $

.include <bsd.own.mk>

TOPDIR=		${NETBSDSRCDIR}/external/bsd/kyua-cli
SRCDIR=		${TOPDIR}/dist

# Name of the private libraries (without their lib prefix) to depend on.
KYUA_LIBS?=

# Layout of installed files.
KYUA_BINDIR=		/usr/bin
KYUA_CONFDIR=		/etc/kyua
KYUA_DOCDIR=		/usr/share/doc/reference/ref1/kyua/kyua-cli
KYUA_EXAMPLESDIR=	/usr/share/examples/kyua-cli
KYUA_MISCDIR=		/usr/share/kyua-cli/misc
KYUA_STOREDIR=		/usr/share/kyua-cli/store
KYUA_TESTERSDIR=	/usr/libexec
KYUA_TESTSDIR=		${TESTSBASE}

KYUA_TARNAME!=	grep 'define PACKAGE_TARNAME' ${TOPDIR}/config.h \
		| cut -d '"' -f 2
cookie-tarname: cookie-tarname-2
	@cmp -s cookie-tarname cookie-tarname-2 \
	    || cp cookie-tarname-2 cookie-tarname
cookie-tarname-2: .PHONY
	@echo "${KYUA_TARNAME}" >cookie-tarname-2
CLEANFILES+=	cookie-tarname cookie-tarname-2
	
KYUA_VERSION!=	grep 'define VERSION' ${TOPDIR}/config.h | cut -d '"' -f 2
cookie-version: cookie-version-2
	@cmp -s cookie-version cookie-version-2 \
	    || cp cookie-version-2 cookie-version
cookie-version-2: .PHONY
	@echo "${KYUA_VERSION}" >cookie-version-2
CLEANFILES+=	cookie-version cookie-version-2

CPPFLAGS+=	-DHAVE_CONFIG_H

# Not all source files need these settings, but it's just easier to
# set them in all cases.
CPPFLAGS+=	-DKYUA_CONFDIR=\"${KYUA_CONFDIR}\"
CPPFLAGS+=	-DKYUA_DOCDIR=\"${KYUA_DOCDIR}\"
CPPFLAGS+=	-DKYUA_EXAMPLESDIR=\"${KYUA_EXAMPLESDIR}\"
CPPFLAGS+=	-DKYUA_MISCDIR=\"${KYUA_MISCDIR}\"
CPPFLAGS+=	-DKYUA_STOREDIR=\"${KYUA_STOREDIR}\"
CPPFLAGS+=	-DKYUA_TESTERSDIR=\"${KYUA_TESTERSDIR}\"
CPPFLAGS+=	-DKYUA_TESTSDIR=\"${KYUA_TESTSDIR}\"

CPPFLAGS+=	-I${TOPDIR}		# For config.h.
CPPFLAGS+=	-I${TOPDIR}/lib		# For utils/defs.hpp.
CPPFLAGS+=	-I${SRCDIR}

.for lib in ${KYUA_LIBS}
LIBOBJDIR_${lib}!=	cd ${TOPDIR}/lib/${lib}; ${PRINTOBJDIR}
LDADD+=			${LIBOBJDIR_${lib}}/lib${lib}.a
DPADD+=			${LIBOBJDIR_${lib}}/lib${lib}.a
.endfor

.if !empty(KYUA_LIBS:Mutils)
LDADD+=		-llutok -lsqlite3
DPADD+=		${LIBLUTOK} ${LIBSQLITE}
.endif

MANPAGE_DEPS = cookie-tarname cookie-version
BUILD_MANPAGE = \
	sed -e 's,__CONFDIR__,${KYUA_CONFDIR},g' \
	    -e 's,__DOCDIR__,${KYUA_DOCDIR},g' \
	    -e 's,__EGDIR__,${KYUA_EXAMPLESDIR},g' \
	    -e 's,__MISCDIR__,${KYUA_MISCDIR},g' \
	    -e 's,__PACKAGE__,${KYUA_TARNAME},g' \
	    -e 's,__STOREDIR__,${KYUA_STOREDIR},g' \
	    -e 's,__TESTERSDIR__,${KYUA_TESTERSDIR},g' \
	    -e 's,__TESTSDIR__,${KYUA_TESTSDIR},g' \
	    -e 's,__VERSION__,${KYUA_VERSION},g' \
	    <${SRCDIR}/doc/$${name}.in >$${name}.tmp; \
	mv $${name}.tmp $${name}