files. This fixes up parallel builds in the default case.
FreeBSD does something similar.
okay millert@
%{
-/* $OpenBSD: lex.l,v 1.4 2009/10/27 23:59:23 deraadt Exp $ */
+/* $OpenBSD: lex.l,v 1.5 2017/07/09 14:04:50 espie Exp $ */
/* $NetBSD: lex.l,v 1.3 1995/03/21 15:04:15 cgd Exp $ */
/*-
* For more info on this and all of my stuff, mail edjames@berkeley.edu.
*/
-#include "y.tab.h"
+#include "grammar.h"
extern int line;
-/* $OpenBSD: map_scan.l,v 1.6 2015/11/19 19:48:27 tedu Exp $ */
+/* $OpenBSD: map_scan.l,v 1.7 2017/07/09 14:04:50 espie Exp $ */
/* $NetBSD: map_scan.l 1.1 1998/12/28 14:01:17 hannken Exp $ */
/*-
#include <limits.h>
#include <err.h>
#include "wsconsctl.h"
-#include "y.tab.h"
+#include "map_parse.h"
void
map_scan_setinput(char *str)
-# $OpenBSD: bsd.dep.mk,v 1.20 2017/07/05 13:30:01 espie Exp $
+# $OpenBSD: bsd.dep.mk,v 1.21 2017/07/09 14:04:50 espie Exp $
# $NetBSD: bsd.dep.mk,v 1.12 1995/09/27 01:15:09 christos Exp $
.if !target(depend)
${i:R:S/$/.o/} ${i:R:S/$/.po/} ${i:R:S/$/.so/} ${i:R:S/$/.do/}: $i
.endfor
+# give us better rules for yacc
+
+.if ${YFLAGS:M-d}
+# loop may not trigger
+. for f in ${SRCS:M*.y}
+${f:.y=.c} ${f:.y=.h}: $f
+ ${YACC.y} -o ${f:.y=.c} ${.IMPSRC}
+. endfor
+CLEANFILES += ${SRCS:M*.y:.y=.h}
+.endif
+
CLEANFILES += ${DEPS} .depend
BUILDFIRST ?=
-# $OpenBSD: bsd.sys.mk,v 1.12 2017/07/05 13:31:40 espie Exp $
+# $OpenBSD: bsd.sys.mk,v 1.13 2017/07/09 14:04:50 espie Exp $
# $NetBSD: bsd.sys.mk,v 1.2 1995/12/13 01:25:07 cgd Exp $
#
# Overrides used for OpenBSD source tree builds.
CXXFLAGS+= -idirafter ${DESTDIR}/usr/include/g++
.endif
-.if defined(PARALLEL)
-# Yacc
-.y:
- ${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} ${.TARGET:R}.tab.c ${LDLIBS}
- rm -f ${.TARGET:R}.tab.c
.y.c:
- ${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
- mv ${.TARGET:R}.tab.c ${.TARGET}
-.y.o:
- ${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} ${.TARGET:R}.tab.c
- rm -f ${.TARGET:R}.tab.c
- if test -f ${.TARGET:R}.d; then sed -i -e 's,${.TARGET:R}.tab.c,${.IMPSRC},' ${.TARGET:R}.d; fi
-.endif
+ ${YACC.y} -o ${.TARGET} ${.IMPSRC}
-# $OpenBSD: Makefile,v 1.15 2017/07/04 08:39:57 espie Exp $
+# $OpenBSD: Makefile,v 1.16 2017/07/09 14:04:50 espie Exp $
# -DEXTENDED
# if you want the paste & spaste macros.
SRCS= eval.c expr.c look.c main.c misc.c gnum4.c trace.c tokenizer.l parser.y
MAN= m4.1
-parser.c parser.h: parser.y
- ${YACC} -o parser.c -d ${.ALLSRC}
-
-tokenizer.o: parser.h
-
-CLEANFILES+=parser.c parser.h tokenizer.o
-
.include <bsd.prog.mk>
-# $OpenBSD: Makefile,v 1.19 2014/07/12 03:32:00 guenther Exp $
+# $OpenBSD: Makefile,v 1.20 2017/07/09 14:04:50 espie Exp $
PROG= rdist
CFLAGS+=-I. -I${.CURDIR}
SRCS= gram.y child.c client.c common.c distopt.c docmd.c expand.c \
isexec.c lookup.c message.c rdist.c
-CLEANFILES+=gram.c y.tab.h
WARNINGS=yes
.include <bsd.prog.mk>
-/* $OpenBSD: client.c,v 1.35 2015/12/09 19:39:10 mmcc Exp $ */
+/* $OpenBSD: client.c,v 1.36 2017/07/09 14:04:50 espie Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
#include <unistd.h>
#include "client.h"
-#include "y.tab.h"
+#include "gram.h"
/*
* Routines used in client mode to communicate with remove server.
-/* $OpenBSD: docmd.c,v 1.32 2015/01/20 09:00:16 guenther Exp $ */
+/* $OpenBSD: docmd.c,v 1.33 2017/07/09 14:04:50 espie Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
#include <unistd.h>
#include "client.h"
-#include "y.tab.h"
+#include "gram.h"
/*
* Functions for rdist that do command (cmd) related activities.
-/* $OpenBSD: rdist.c,v 1.30 2015/02/08 23:40:34 deraadt Exp $ */
+/* $OpenBSD: rdist.c,v 1.31 2017/07/09 14:04:50 espie Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
#include <unistd.h>
#include "client.h"
-#include "y.tab.h"
+#include "gram.h"
/*
%{
-/* $OpenBSD: scan.l,v 1.23 2015/11/19 19:48:27 tedu Exp $ */
+/* $OpenBSD: scan.l,v 1.24 2017/07/09 14:04:50 espie Exp $ */
/* $NetBSD: scan.l,v 1.13 1997/02/02 21:12:37 thorpej Exp $ */
/*
#include <string.h>
#include <unistd.h>
#include "config.h"
-#include "y.tab.h"
+#include "gram.h"
int yyline;
const char *yyfile;