]> err.no Git - varnish/commitdiff
Regenerate generated .c files if we have tclsh installed
authortfheen <tfheen@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 17 Sep 2008 07:49:28 +0000 (07:49 +0000)
committertfheen <tfheen@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 17 Sep 2008 07:49:28 +0000 (07:49 +0000)
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
varnish-cache/lib/libvcl/Makefile.am

index 951400ab7ffa97ca11f3ee5aa80242dd5117e8f0..28a78ca7cc056a51fe8ea88ac1e90fb7a9f3e776 100644 (file)
@@ -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
index 77b719c7a83ff80fe041d396cb8111fee79a09b9..abdfbfb48988baaccf80de456d228bb9ce22af29 100644 (file)
@@ -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