Re: [nft PATCH v3 11/11] Makefile: Enable support for 'make check'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 04, 2025 at 05:24:59PM +0200, Pablo Neira Ayuso wrote:
> On Wed, Sep 03, 2025 at 07:22:59PM +0200, Phil Sutter wrote:
[...]
> > diff --git a/Makefile.am b/Makefile.am
> > index 5190a49ae69f1..9112faa2d5c04 100644
> > --- a/Makefile.am
> > +++ b/Makefile.am
> > @@ -23,6 +23,7 @@ libnftables_LIBVERSION = 2:0:1
> >  ###############################################################################
> >  
> >  ACLOCAL_AMFLAGS = -I m4
> > +AM_DISTCHECK_CONFIGURE_FLAGS = --enable-distcheck
> >  
> >  EXTRA_DIST =
> >  BUILT_SOURCES =
> > @@ -429,3 +430,11 @@ doc_DATA = files/nftables/main.nft
> >  tools/nftables.service: tools/nftables.service.in ${top_builddir}/config.status
> >  	${AM_V_GEN}${MKDIR_P} tools
> >  	${AM_V_at}sed -e 's|@''sbindir''@|${sbindir}|g;s|@''pkgsysconfdir''@|${pkgsysconfdir}|g' <${srcdir}/tools/nftables.service.in >$@
> > +
> > +if !BUILD_DISTCHECK
> > +TESTS = tests/build/run-tests.sh \
> > +	tests/json_echo/run-test.py \
> > +	tests/monitor/run-tests.sh \
> > +	tests/py/nft-test.py \
> > +	tests/shell/run-tests.sh
> > +endif
> > diff --git a/configure.ac b/configure.ac
> > index da16a6e257c91..8073d4d8193e2 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -155,6 +155,11 @@ AC_CONFIG_COMMANDS([nftversion.h], [
> >  AC_SUBST([MAKE_STAMP], ["\$(shell date +%s)"])
> >  CFLAGS="${CFLAGS} -DMAKE_STAMP=\${MAKE_STAMP}"
> >  
> > +AC_ARG_ENABLE([distcheck],
> > +	      AS_HELP_STRING([--enable-distcheck], [Build for distcheck]),
> > +	      [enable_distcheck=yes], [])
> > +AM_CONDITIONAL([BUILD_DISTCHECK], [test "x$enable_distcheck" = "xyes"])
> 
> Oh no, with distcheck-hook: this is a lot cleaner.

Hmm, I really don't see how it could be used for this purpose: It is
called before starting the VPATH build, here's an excerpt:

| mkdir nftables-1.1.5/_build nftables-1.1.5/_build/sub nftables-1.1.5/_inst
| chmod a-w nftables-1.1.5
| test -d nftables-1.1.5/_build || exit 0; \
| dc_install_base=`CDPATH="${ZSH_VERSION+.}:" && cd nftables-1.1.5/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|   && dc_destdir="${TMPDIR-/tmp}/am-dc-$$/" \
|   && make  distcheck-hook \
|   && am__cwd=`pwd` \
|   && CDPATH="${ZSH_VERSION+.}:" && cd nftables-1.1.5/_build/sub \
|   && ../../configure \
|       --enable-distcheck \
|          \
|       --srcdir=../.. --prefix="$dc_install_base" \
|   && make  \
|   && make  dvi \
|   && make  check \

So by the time distcheck-hook runs, there is no Makefile(.in) I could
modify, only the top-level ones (which are tracked in git). What am I
missing here?

Cheers, Phil




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux