Date: Wed, 26 Oct 2016 15:58:41 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r307967 - head/usr.sbin/config Message-ID: <201610261558.u9QFwfCP097721@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Wed Oct 26 15:58:41 2016 New Revision: 307967 URL: https://svnweb.freebsd.org/changeset/base/307967 Log: Allow config to be compiled from another source directory, such as one for building tools. This boils down to replacing ${.CURDIR} with ${SRCDIR}, where the latter is the directory in which this makefile lives. Also allow overriding where file2c comes from using ${FILE2C}. Modified: head/usr.sbin/config/Makefile Modified: head/usr.sbin/config/Makefile ============================================================================== --- head/usr.sbin/config/Makefile Wed Oct 26 15:19:18 2016 (r307966) +++ head/usr.sbin/config/Makefile Wed Oct 26 15:58:41 2016 (r307967) @@ -1,15 +1,20 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +SRCDIR:=${.PARSEDIR:tA} + PROG= config MAN= config.5 config.8 SRCS= config.y main.c lang.l mkmakefile.c mkheaders.c \ mkoptions.c y.tab.h kernconf.c +FILE2C?=file2c + kernconf.c: kernconf.tmpl - file2c 'char kernconfstr[] = {' ',0};' < ${.CURDIR}/kernconf.tmpl > kernconf.c + ${FILE2C} 'char kernconfstr[] = {' ',0};' < \ + ${SRCDIR}/kernconf.tmpl > kernconf.c -CFLAGS+= -I. -I${.CURDIR} +CFLAGS+= -I. -I${SRCDIR} NO_WMISSING_VARIABLE_DECLARATIONS=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610261558.u9QFwfCP097721>