From ce16616694afe5da1eaab3962ce6f42483b8e3ea Mon Sep 17 00:00:00 2001 From: tfheen Date: Wed, 17 Sep 2008 07:49:28 +0000 Subject: [PATCH] Regenerate generated .c files if we have tclsh installed As well as the above, add .tcl files to EXTRA_DIST so we can regenerate them and make distcheck works. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3196 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/configure.ac | 6 ++++++ varnish-cache/lib/libvcl/Makefile.am | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/varnish-cache/configure.ac b/varnish-cache/configure.ac index 951400ab..28a78ca7 100644 --- a/varnish-cache/configure.ac +++ b/varnish-cache/configure.ac @@ -218,6 +218,12 @@ else ac_cv_func_port_create=no fi +AM_MISSING_HAS_RUN +AC_CHECK_PROGS(TCLSH, [tclsh tclsh8.4 tclsh8.5], false) +if test "$TCLSH" = :; then + TCLSH=${am_missing_run}tclsh +fi + # Solaris defines SO_{RCV,SND}TIMEO, but does not implement them. # Varnish will build and run without these, but connections will not # time out, which may leave Varnish vulnerable to denail-of-service diff --git a/varnish-cache/lib/libvcl/Makefile.am b/varnish-cache/lib/libvcl/Makefile.am index 77b719c7..abdfbfb4 100644 --- a/varnish-cache/lib/libvcl/Makefile.am +++ b/varnish-cache/lib/libvcl/Makefile.am @@ -24,3 +24,15 @@ libvcl_la_SOURCES = \ vcc_token.c \ vcc_var.c \ vcc_xref.c + +EXTRA_DIST = vcc_gen_obj.tcl \ + vcc_gen_fixed_token.tcl + +vcc_obj.c: $(srcdir)/vcc_gen_obj.tcl + cd $(srcdir) && @TCLSH@ vcc_gen_obj.tcl + +vcc_fixed_token.c: $(srcdir)/vcc_gen_fixed_token.tcl + cd $(srcdir) && @TCLSH@ vcc_gen_fixed_token.tcl + +vcc_token_defs.h: $(srcdir)/vcc_gen_fixed_token.tcl + cd $(srcdir) && @TCLSH@ vcc_gen_fixed_token.tcl -- 2.39.5