Module Name:    src
Committed By:   christos
Date:           Sat Mar  8 00:10:54 UTC 2025

Modified Files:
        src/usr.sbin/plainrsa-gen: Makefile
        src/usr.sbin/racoon: Makefile
Added Files:
        src/usr.sbin/racoon: Makefile.racoon

Log Message:
Factor out common lex/yacc and warnings handling code.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/plainrsa-gen/Makefile
cvs rdiff -u -r1.46 -r1.47 src/usr.sbin/racoon/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.sbin/racoon/Makefile.racoon

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/plainrsa-gen/Makefile
diff -u src/usr.sbin/plainrsa-gen/Makefile:1.3 src/usr.sbin/plainrsa-gen/Makefile:1.4
--- src/usr.sbin/plainrsa-gen/Makefile:1.3	Fri Mar  7 15:07:03 2025
+++ src/usr.sbin/plainrsa-gen/Makefile	Fri Mar  7 19:10:54 2025
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2025/03/07 20:07:03 christos Exp $
+# $NetBSD: Makefile,v 1.4 2025/03/08 00:10:54 christos Exp $
 
 WARNS?=	0	# XXX third-party program, many issues
 NOCLANGERROR=	# defined
@@ -25,19 +25,7 @@ CPPFLAGS+=	-DOPENSSL_API_COMPAT=0x101000
 LDADD+= -lcrypto -lipsec
 DPADD+= ${LIBCRYPTO} ${LIBIPSEC}
 
-COPTS.plainrsa-gen.c+= -Wno-error=deprecated-declarations
-COPTS.crypto_openssl.c+= -Wno-error=deprecated-declarations
-COPTS.rsalist.c+= -Wno-error=deprecated-declarations
-COPTS.prsa_par.c+= -Wno-error=deprecated-declarations
-
-LPREFIX=prsa
-YPREFIX=prsa
-YFLAGS=-d
-LFLAGS+=--header-file=prsa_tok.h
-CLEANFILES+=prsa_tok.h
-
-prsa_tok.c: prsa_par.c
-rsa_list.c: prsa_tok.c
+.include "${.CURDIR}/../racoon/Makefile.racoon"
 
 .include <bsd.prog.mk>
 

Index: src/usr.sbin/racoon/Makefile
diff -u src/usr.sbin/racoon/Makefile:1.46 src/usr.sbin/racoon/Makefile:1.47
--- src/usr.sbin/racoon/Makefile:1.46	Fri Mar  7 15:08:21 2025
+++ src/usr.sbin/racoon/Makefile	Fri Mar  7 19:10:53 2025
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.46 2025/03/07 20:08:21 christos Exp $
+# $NetBSD: Makefile,v 1.47 2025/03/08 00:10:53 christos Exp $
 
 WARNS?=	0	# XXX third-party program, many issues
 NOCLANGERROR=	# defined
@@ -36,7 +36,7 @@ CPPFLAGS+= -DOPENSSL_API_COMPAT=0x101000
 .endif
 
 LDADD+= -ll -ly -lipsec -lutil
-DPADD+= ${LIBL} ${LIBY} ${LIBCRYPTO} ${LIBUTIL}
+DPADD+= ${LIBL} ${LIBY} ${LIBIPSEC} ${LIBUTIL}
 
 YHEADER=cfparse.h
 
@@ -65,7 +65,7 @@ DPADD+= ${LIBLDAP_DPADD}
 .endif
 
 LDADD+= -lcrypto -lcrypt
-DPADD+= ${LIBIPSEC} ${LIBCRYPT}
+DPADD+= ${LIBCRYPTO} ${LIBCRYPT}
 
 #CPPFLAGS+= -DDEBUG_RECORD_MALLOCATION
 #SRCS+= debugrm.c
@@ -75,19 +75,10 @@ DPADD+= ${LIBIPSEC} ${LIBCRYPT}
 
 .PATH:  ${NETBSDSRCDIR}/lib/libipsec ${DIST}/src/racoon
 
-prsa_tok.c prsa_tok.h: ${DIST}/src/racoon/prsa_tok.l
-	${LEX} -Pprsa --header-file=prsa_tok.h -oprsa_tok.c ${.ALLSRC}
-
-prsa_par.c: ${DIST}/src/racoon/prsa_par.y
-	${YACC} -pprsa -d -o ${.TARGET} ${.ALLSRC}
-
-CLEANFILES+=prsa_tok.h
 CWARNFLAGS.gcc+=        ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
 
 COPTS+=		-fcommon
-COPTS.crypto_openssl.c+= -Wno-error=deprecated-declarations
-COPTS.rsalist.c+= -Wno-error=deprecated-declarations
-COPTS.prsa_par.c+= -Wno-error=deprecated-declarations
-COPTS.plainrsa-gen.c+= -Wno-error=deprecated-declarations
+
+.include "${.CURDIR}/Makefile.racoon"
 
 .include <bsd.prog.mk>

Added files:

Index: src/usr.sbin/racoon/Makefile.racoon
diff -u /dev/null src/usr.sbin/racoon/Makefile.racoon:1.1
--- /dev/null	Fri Mar  7 19:10:54 2025
+++ src/usr.sbin/racoon/Makefile.racoon	Fri Mar  7 19:10:53 2025
@@ -0,0 +1,14 @@
+COPTS.plainrsa-gen.c+= -Wno-error=deprecated-declarations
+COPTS.crypto_openssl.c+= -Wno-error=deprecated-declarations
+COPTS.rsalist.c+= -Wno-error=deprecated-declarations
+COPTS.prsa_par.c+= -Wno-error=deprecated-declarations
+
+LPREFIX.prsa_tok.l=prsa
+YPREFIX.prsa_par.y=prsa
+YFLAGS=-d
+LFLAGS.prsa_tok.l+=--header-file=prsa_tok.h
+CLEANFILES+=prsa_tok.h prsa_tok.c prsa_par.c  prsa_par.h
+
+
+prsa_tok.c: prsa_par.c
+rsa_list.c: prsa_tok.c

Reply via email to