Module Name:    othersrc
Committed By:   lukem
Date:           Sun Oct  1 03:10:51 UTC 2023

Modified Files:
        othersrc/libexec/tnftpd: ChangeLog configure.ac
        othersrc/libexec/tnftpd/src: Makefile.am

Log Message:
always use $YACC even without --enable-maintainer-mode

Provide custom rules to create ftpcmd.c from $(YACC) ftpcmd.y,
instead of relying upon automake's default rules, so that
we always use $(YACC) even without --enable-maintainer-mode,
and we ship ftpcmd.y not ftpcmd.c.

(There should be an easier way in automake to do this.)

Display YACC and YFLAGS at end of configure.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 othersrc/libexec/tnftpd/ChangeLog
cvs rdiff -u -r1.54 -r1.55 othersrc/libexec/tnftpd/configure.ac
cvs rdiff -u -r1.5 -r1.6 othersrc/libexec/tnftpd/src/Makefile.am

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

Modified files:

Index: othersrc/libexec/tnftpd/ChangeLog
diff -u othersrc/libexec/tnftpd/ChangeLog:1.66 othersrc/libexec/tnftpd/ChangeLog:1.67
--- othersrc/libexec/tnftpd/ChangeLog:1.66	Sun Oct  1 02:09:12 2023
+++ othersrc/libexec/tnftpd/ChangeLog	Sun Oct  1 03:10:51 2023
@@ -1,7 +1,9 @@
-$NetBSD: ChangeLog,v 1.66 2023/10/01 02:09:12 lukem Exp $
+$NetBSD: ChangeLog,v 1.67 2023/10/01 03:10:51 lukem Exp $
 
 Sun Oct  1 01:49:23 UTC 2023	lu...@netbsd.org
 
+	* Always use $YACC even without --enable-maintainer-mode.
+
 	* Update to NetBSD-ftpd 20230930:
 		* Fix uninitialized memory usage in count_users().
 		* Fix pam_set_item() call with proper struct passed as

Index: othersrc/libexec/tnftpd/configure.ac
diff -u othersrc/libexec/tnftpd/configure.ac:1.54 othersrc/libexec/tnftpd/configure.ac:1.55
--- othersrc/libexec/tnftpd/configure.ac:1.54	Sun Sep 24 04:54:13 2023
+++ othersrc/libexec/tnftpd/configure.ac	Sun Oct  1 03:10:51 2023
@@ -1,4 +1,4 @@
-# $NetBSD: configure.ac,v 1.54 2023/09/24 04:54:13 lukem Exp $
+# $NetBSD: configure.ac,v 1.55 2023/10/01 03:10:51 lukem Exp $
 #
 # Process this file with autoconf to produce a configure script.
 
@@ -536,6 +536,8 @@ AC_MSG_NOTICE([CFLAGS                 $C
 AC_MSG_NOTICE([CPPFLAGS               $CPPFLAGS])
 AC_MSG_NOTICE([LDFLAGS                $LDFLAGS])
 AC_MSG_NOTICE([LIBS                   $LIBS])
+AC_MSG_NOTICE([YACC                   $YACC])
+AC_MSG_NOTICE([YFLAGS                 $YFLAGS])
 AC_MSG_NOTICE([--enable-builtinls     $opt_builtinls])
 AC_MSG_NOTICE([--enable-ipv6          $opt_ipv6])
 AC_MSG_NOTICE([--with-blocklist       $with_blocklist])

Index: othersrc/libexec/tnftpd/src/Makefile.am
diff -u othersrc/libexec/tnftpd/src/Makefile.am:1.5 othersrc/libexec/tnftpd/src/Makefile.am:1.6
--- othersrc/libexec/tnftpd/src/Makefile.am:1.5	Tue Jan 29 12:51:38 2019
+++ othersrc/libexec/tnftpd/src/Makefile.am	Sun Oct  1 03:10:51 2023
@@ -1,4 +1,4 @@
-## $NetBSD: Makefile.am,v 1.5 2019/01/29 12:51:38 lukem Exp $
+## $NetBSD: Makefile.am,v 1.6 2023/10/01 03:10:51 lukem Exp $
 
 libexec_PROGRAMS = tnftpd
 
@@ -6,7 +6,6 @@ tnftpd_SOURCES = \
 	cmds.c \
 	conf.c \
 	ftpd.c \
-	ftpcmd.y \
 	pfilter.c \
 	popen.c
 
@@ -36,7 +35,6 @@ man8_MANS = \
 	tnftpd.man
 
 CLEANFILES = \
-	ftpcmd.c \
 	ftpd.conf.man \
 	ftpusers.man \
 	tnftpd.man
@@ -46,7 +44,7 @@ seddotin = \
 	    -e 's|@sysconfdir[@]|${sysconfdir}|g'
 
 .manin.man:
-	${seddotin} $< > $@
+	$(seddotin) $< > $@
 
 EXTRA_DIST = \
 	ftpd.conf.manin \
@@ -54,3 +52,29 @@ EXTRA_DIST = \
 	logutmp.c \
 	logwtmp.c \
 	tnftpd.manin
+
+
+# Custom yacc rules to always yacc ftpcmd.y,
+# even without --enable-maintainer-mode.
+
+nodist_tnftpd_SOURCES = \
+	ftpcmd.c
+
+BUILT_SOURCES = \
+	ftpcmd.c
+
+CLEANFILES += \
+	ftpcmd.c
+
+EXTRA_DIST += \
+	ftpcmd.y
+
+AUTOMAKE_OPTIONS = -Wno-portability-recursive
+
+TNFTPD_V_YACC = $(TNFTPD__V_YACC_$(V))
+TNFTPD__V_YACC_ = $(TNFTPD__V_YACC_$(AM_DEFAULT_VERBOSITY))
+TNFTPD__V_YACC_0 = @echo "  YACC    " $@;
+TNFTPD__V_YACC_1 =
+
+ftpcmd.c: $(srcdir)/ftpcmd.y
+	$(TNFTPD_V_YACC)$(YACC) $(YFLAGS) -o $@ $?

Reply via email to