svn commit: r189535 - projects/jbuild/usr.sbin/config

John Birrell jb at FreeBSD.org
Sun Mar 8 09:16:56 PDT 2009


Author: jb
Date: Sun Mar  8 16:16:55 2009
New Revision: 189535
URL: http://svn.freebsd.org/changeset/base/189535

Log:
  Port to jbuild. We don't use the default name, y.tab.h

Added:
  projects/jbuild/usr.sbin/config/Buildfile
  projects/jbuild/usr.sbin/config/Buildfile.dirdep
Modified:
  projects/jbuild/usr.sbin/config/lang.l
  projects/jbuild/usr.sbin/config/main.c
  projects/jbuild/usr.sbin/config/mkheaders.c
  projects/jbuild/usr.sbin/config/mkmakefile.c
  projects/jbuild/usr.sbin/config/mkoptions.c

Added: projects/jbuild/usr.sbin/config/Buildfile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/jbuild/usr.sbin/config/Buildfile	Sun Mar  8 16:16:55 2009	(r189535)
@@ -0,0 +1,27 @@
+# $FreeBSD$
+
+PROG = config
+
+SRCS = \
+	cconfig.y \
+	main.c \
+	lang.l \
+	mkmakefile.c \
+	mkheaders.c \
+	mkoptions.c \
+	kernconf.c
+
+WARNS ?= 6
+
+CFLAGS+= -I. -I${.CURDIR}
+
+LDADD += -ll -lsbuf
+
+cconfig.y : config.y
+	cp ${.ALLSRC} ${.TARGET}
+
+kernconf.c: kernconf.tmpl
+	file2c 'char kernconfstr[] = {' ',0};' < ${.ALLSRC} > ${.TARGET}
+
+DIRDEP= gnu/lib/csu gnu/lib/libgcc include lib/csu/MACHINE_ARCH lib/libc lib/libsbuf stage sys/MACHINE_ARCH/include sys/sys usr.bin/lex/lib
+.include <bsd.prog.mk>

Added: projects/jbuild/usr.sbin/config/Buildfile.dirdep
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/jbuild/usr.sbin/config/Buildfile.dirdep	Sun Mar  8 16:16:55 2009	(r189535)
@@ -0,0 +1,176 @@
+# This file is automatically generated. DO NOT EDIT!
+.if !defined(NODIRDEP)
+# DIRDEP= gnu/lib/csu gnu/lib/libgcc include lib/csu/MACHINE_ARCH lib/libc lib/libsbuf stage sys/MACHINE_ARCH/include sys/sys usr.bin/lex/lib
+.if empty(D_INC_DONE:Mgnu/lib/csu)
+D_INC_DONE+= gnu/lib/csu
+D_INC_DONE:= ${D_INC_DONE}
+.if exists(${.SRCTOP}/gnu/lib/csu/Buildfile.dirdep)
+.include "${.SRCTOP}/gnu/lib/csu/Buildfile.dirdep"
+.endif
+.endif
+
+.if empty(D_INC_DONE:Mgnu/lib/libgcc)
+D_INC_DONE+= gnu/lib/libgcc
+D_INC_DONE:= ${D_INC_DONE}
+.if exists(${.SRCTOP}/gnu/lib/libgcc/Buildfile.dirdep)
+.include "${.SRCTOP}/gnu/lib/libgcc/Buildfile.dirdep"
+.endif
+.endif
+
+.if empty(D_INC_DONE:Minclude)
+D_INC_DONE+= include
+D_INC_DONE:= ${D_INC_DONE}
+.if exists(${.SRCTOP}/include/Buildfile.dirdep)
+.include "${.SRCTOP}/include/Buildfile.dirdep"
+.endif
+.endif
+
+.if empty(D_INC_DONE:Mlib/libc)
+D_INC_DONE+= lib/libc
+D_INC_DONE:= ${D_INC_DONE}
+.if exists(${.SRCTOP}/lib/libc/Buildfile.dirdep)
+.include "${.SRCTOP}/lib/libc/Buildfile.dirdep"
+.endif
+.endif
+
+.if empty(D_INC_DONE:Mlib/libsbuf)
+D_INC_DONE+= lib/libsbuf
+D_INC_DONE:= ${D_INC_DONE}
+.if exists(${.SRCTOP}/lib/libsbuf/Buildfile.dirdep)
+.include "${.SRCTOP}/lib/libsbuf/Buildfile.dirdep"
+.endif
+.endif
+
+.if empty(D_INC_DONE:Mstage)
+D_INC_DONE+= stage
+D_INC_DONE:= ${D_INC_DONE}
+.if exists(${.SRCTOP}/stage/Buildfile.dirdep)
+.include "${.SRCTOP}/stage/Buildfile.dirdep"
+.endif
+.endif
+
+.if empty(D_INC_DONE:Msys/sys)
+D_INC_DONE+= sys/sys
+D_INC_DONE:= ${D_INC_DONE}
+.if exists(${.SRCTOP}/sys/sys/Buildfile.dirdep)
+.include "${.SRCTOP}/sys/sys/Buildfile.dirdep"
+.endif
+.endif
+
+.if empty(D_INC_DONE:Musr.bin/lex/lib)
+D_INC_DONE+= usr.bin/lex/lib
+D_INC_DONE:= ${D_INC_DONE}
+.if exists(${.SRCTOP}/usr.bin/lex/lib/Buildfile.dirdep)
+.include "${.SRCTOP}/usr.bin/lex/lib/Buildfile.dirdep"
+.endif
+.endif
+
+.for t in ${MACHINE_LIST}
+_d=lib/csu/MACHINE_ARCH
+.if empty(D_INC_DONE:M${_d:S,MACHINE_ARCH,${MACHINE_ARCH.${t}},g})
+D_INC_DONE+= ${_d:S,MACHINE_ARCH,${MACHINE_ARCH.${t}},g}
+D_INC_DONE:= ${D_INC_DONE}
+.if exists(${.SRCTOP}/${_d:S,MACHINE_ARCH,${MACHINE_ARCH.${t}},g}/Buildfile.dirdep)
+.include "${.SRCTOP}/${_d:S,MACHINE_ARCH,${MACHINE_ARCH.${t}},g}/Buildfile.dirdep"
+.endif
+.endif
+
+.endfor
+.for t in ${MACHINE_LIST}
+_d=sys/MACHINE_ARCH/include
+.if empty(D_INC_DONE:M${_d:S,MACHINE_ARCH,${MACHINE_ARCH.${t}},g})
+D_INC_DONE+= ${_d:S,MACHINE_ARCH,${MACHINE_ARCH.${t}},g}
+D_INC_DONE:= ${D_INC_DONE}
+.if exists(${.SRCTOP}/${_d:S,MACHINE_ARCH,${MACHINE_ARCH.${t}},g}/Buildfile.dirdep)
+.include "${.SRCTOP}/${_d:S,MACHINE_ARCH,${MACHINE_ARCH.${t}},g}/Buildfile.dirdep"
+.endif
+.endif
+
+.endfor
+.endif
+
+.for t in ${MACHINE_LIST}
+D_TGTS_${t}=
+.endfor
+
+.if !defined(NODIRDEP)
+_MACHINE_LIST:= ${MACHINE_LIST}
+.if exists(${.SRCTOP}/gnu/lib/csu/Buildfile.dirdep)
+.for _t in ${_MACHINE_LIST}
+D_TGTS_${_t}+= ${.OBJROOT}/${_t}/gnu/lib/csu/all
+D_TGTS_${_t}:= ${D_TGTS_${_t}}
+.endfor
+.endif
+
+.if exists(${.SRCTOP}/gnu/lib/libgcc/Buildfile.dirdep)
+.for _t in ${_MACHINE_LIST}
+D_TGTS_${_t}+= ${.OBJROOT}/${_t}/gnu/lib/libgcc/all
+D_TGTS_${_t}:= ${D_TGTS_${_t}}
+.endfor
+.endif
+
+.if exists(${.SRCTOP}/include/Buildfile.dirdep)
+.for _t in ${_MACHINE_LIST}
+D_TGTS_${_t}+= ${.OBJROOT}/${_t}/include/all
+D_TGTS_${_t}:= ${D_TGTS_${_t}}
+.endfor
+.endif
+
+.if exists(${.SRCTOP}/lib/libc/Buildfile.dirdep)
+.for _t in ${_MACHINE_LIST}
+D_TGTS_${_t}+= ${.OBJROOT}/${_t}/lib/libc/all
+D_TGTS_${_t}:= ${D_TGTS_${_t}}
+.endfor
+.endif
+
+.if exists(${.SRCTOP}/lib/libsbuf/Buildfile.dirdep)
+.for _t in ${_MACHINE_LIST}
+D_TGTS_${_t}+= ${.OBJROOT}/${_t}/lib/libsbuf/all
+D_TGTS_${_t}:= ${D_TGTS_${_t}}
+.endfor
+.endif
+
+.if exists(${.SRCTOP}/stage/Buildfile.dirdep)
+.for _t in ${_MACHINE_LIST}
+D_TGTS_${_t}+= ${.OBJROOT}/${_t}/stage/all
+D_TGTS_${_t}:= ${D_TGTS_${_t}}
+.endfor
+.endif
+
+.if exists(${.SRCTOP}/sys/sys/Buildfile.dirdep)
+.for _t in ${_MACHINE_LIST}
+D_TGTS_${_t}+= ${.OBJROOT}/${_t}/sys/sys/all
+D_TGTS_${_t}:= ${D_TGTS_${_t}}
+.endfor
+.endif
+
+.if exists(${.SRCTOP}/usr.bin/lex/lib/Buildfile.dirdep)
+.for _t in ${_MACHINE_LIST}
+D_TGTS_${_t}+= ${.OBJROOT}/${_t}/usr.bin/lex/lib/all
+D_TGTS_${_t}:= ${D_TGTS_${_t}}
+.endfor
+.endif
+
+.for t in ${_MACHINE_LIST}
+_d=lib/csu/MACHINE_ARCH
+.if exists(${.SRCTOP}/${_d:S,MACHINE_ARCH,${MACHINE_ARCH.${t}},g}/Buildfile.dirdep)
+D_TGTS_${t}+= ${.OBJROOT}/${t}/${_d:S,MACHINE_ARCH,${MACHINE_ARCH.${t}},g}/all
+D_TGTS_${t}:= ${D_TGTS_${t}}
+.endif
+
+.endfor
+.for t in ${_MACHINE_LIST}
+_d=sys/MACHINE_ARCH/include
+.if exists(${.SRCTOP}/${_d:S,MACHINE_ARCH,${MACHINE_ARCH.${t}},g}/Buildfile.dirdep)
+D_TGTS_${t}+= ${.OBJROOT}/${t}/${_d:S,MACHINE_ARCH,${MACHINE_ARCH.${t}},g}/all
+D_TGTS_${t}:= ${D_TGTS_${t}}
+.endif
+
+.endfor
+
+.endif
+.for t in ${MACHINE_LIST}
+${.OBJROOT}/${t}/usr.sbin/config/all : ${D_TGTS_${t}} .PHONY
+	echo Checking ${.OBJROOT}/${t}/usr.sbin/config
+	cd ${.SRCTOP}/usr.sbin/config && MACHINE=${t} ${MAKE} ${.MAKEFLAGS:NMACHINE=*:N-DALLMACHINES} all
+.endfor

Modified: projects/jbuild/usr.sbin/config/lang.l
==============================================================================
--- projects/jbuild/usr.sbin/config/lang.l	Sun Mar  8 14:28:40 2009	(r189534)
+++ projects/jbuild/usr.sbin/config/lang.l	Sun Mar  8 16:16:55 2009	(r189535)
@@ -34,7 +34,11 @@
 #include <assert.h>
 #include <ctype.h>
 #include <string.h>
+#ifdef JBUILD
+#include "cconfig.h"
+#else
 #include "y.tab.h"
+#endif
 #include "config.h"
 
 #define YY_NO_UNPUT

Modified: projects/jbuild/usr.sbin/config/main.c
==============================================================================
--- projects/jbuild/usr.sbin/config/main.c	Sun Mar  8 14:28:40 2009	(r189534)
+++ projects/jbuild/usr.sbin/config/main.c	Sun Mar  8 16:16:55 2009	(r189535)
@@ -56,7 +56,11 @@ static const char rcsid[] =
 #include <sysexits.h>
 #include <unistd.h>
 #include <dirent.h>
+#ifdef JBUILD
+#include "cconfig.h"
+#else
 #include "y.tab.h"
+#endif
 #include "config.h"
 #include "configvers.h"
 

Modified: projects/jbuild/usr.sbin/config/mkheaders.c
==============================================================================
--- projects/jbuild/usr.sbin/config/mkheaders.c	Sun Mar  8 14:28:40 2009	(r189534)
+++ projects/jbuild/usr.sbin/config/mkheaders.c	Sun Mar  8 16:16:55 2009	(r189535)
@@ -45,7 +45,11 @@ static const char rcsid[] =
 #include <string.h>
 #include <sys/param.h>
 #include "config.h"
+#ifdef JBUILD
+#include "cconfig.h"
+#else
 #include "y.tab.h"
+#endif
 
 void
 headers(void)

Modified: projects/jbuild/usr.sbin/config/mkmakefile.c
==============================================================================
--- projects/jbuild/usr.sbin/config/mkmakefile.c	Sun Mar  8 14:28:40 2009	(r189534)
+++ projects/jbuild/usr.sbin/config/mkmakefile.c	Sun Mar  8 16:16:55 2009	(r189535)
@@ -46,7 +46,11 @@ static const char rcsid[] =
 #include <stdio.h>
 #include <string.h>
 #include <sys/param.h>
+#ifdef JBUILD
+#include "cconfig.h"
+#else
 #include "y.tab.h"
+#endif
 #include "config.h"
 #include "configvers.h"
 

Modified: projects/jbuild/usr.sbin/config/mkoptions.c
==============================================================================
--- projects/jbuild/usr.sbin/config/mkoptions.c	Sun Mar  8 14:28:40 2009	(r189534)
+++ projects/jbuild/usr.sbin/config/mkoptions.c	Sun Mar  8 16:16:55 2009	(r189535)
@@ -46,7 +46,11 @@ static const char rcsid[] =
 #include <string.h>
 #include <sys/param.h>
 #include "config.h"
+#ifdef JBUILD
+#include "cconfig.h"
+#else
 #include "y.tab.h"
+#endif
 
 static	struct users {
 	int	u_default;


More information about the svn-src-projects mailing list