Commit b18f2c4e authored by Tollef Fog Heen's avatar Tollef Fog Heen

Get rid of autogenerated files from SVN

We now require python to build and we always regenerate the generated files.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5019 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 0a4e195c
# $Id$
INCLUDES = -I$(top_srcdir)/include
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
sbin_PROGRAMS = varnishd
......
......@@ -296,10 +296,7 @@ else
fi
AM_MISSING_HAS_RUN
AC_CHECK_PROGS(PYTHON, [python python2 python2.5 python2.6 python3 python3.1 python3.2], :)
if test "$PYTHON" = :; then
PYTHON="${am_missing_run}python"
fi
AC_CHECK_PROGS(PYTHON, [python python2 python2.5 python2.6 python3 python3.1 python3.2], [AC_MSG_ERROR([Python is needed to build Varnish, please install python.])])
# Solaris defines SO_{RCV,SND}TIMEO, but does not implement them.
# Varnish will build and run without these, but connections will not
......
......@@ -49,3 +49,10 @@ nobase_noinst_HEADERS = \
vrt.h \
vrt_obj.h \
vss.h
vcl_returns.h vcl.h vrt_obj.h: $(top_srcdir)/lib/libvcl/generate.py $(top_srcdir)/include/vmod.h $(top_srcdir)/include/vrt.h
@PYTHON@ $(top_srcdir)/lib/libvcl/generate.py $(top_srcdir) $(top_builddir)
CLEANFILES = vcl_returns.h \
vcl.h \
vrt_obj.h
/*
* $Id$
*
* NB: This file is machine generated, DO NOT EDIT!
*
* Edit and run generate.py instead
*/
struct sess;
struct cli;
typedef void vcl_init_f(struct cli *);
typedef void vcl_fini_f(struct cli *);
typedef int vcl_func_f(struct sess *sp);
/* VCL Methods */
#define VCL_MET_RECV (1U << 0)
#define VCL_MET_PIPE (1U << 1)
#define VCL_MET_PASS (1U << 2)
#define VCL_MET_HASH (1U << 3)
#define VCL_MET_MISS (1U << 4)
#define VCL_MET_HIT (1U << 5)
#define VCL_MET_FETCH (1U << 6)
#define VCL_MET_DELIVER (1U << 7)
#define VCL_MET_ERROR (1U << 8)
#define VCL_MET_MAX 9
#define VCL_MET_MASK 0x1ff
/* VCL Returns */
#define VCL_RET_DELIVER 0
#define VCL_RET_ERROR 1
#define VCL_RET_FETCH 2
#define VCL_RET_HASH 3
#define VCL_RET_LOOKUP 4
#define VCL_RET_PASS 5
#define VCL_RET_PIPE 6
#define VCL_RET_RESTART 7
#define VCL_RET_MAX 8
struct VCL_conf {
unsigned magic;
#define VCL_CONF_MAGIC 0x7406c509 /* from /dev/random */
struct director **director;
unsigned ndirector;
struct vrt_ref *ref;
unsigned nref;
unsigned busy;
unsigned discard;
unsigned nsrc;
const char **srcname;
const char **srcbody;
vcl_init_f *init_func;
vcl_fini_f *fini_func;
vcl_func_f *recv_func;
vcl_func_f *pipe_func;
vcl_func_f *pass_func;
vcl_func_f *hash_func;
vcl_func_f *miss_func;
vcl_func_f *hit_func;
vcl_func_f *fetch_func;
vcl_func_f *deliver_func;
vcl_func_f *error_func;
};
/*
* $Id$
*
* NB: This file is machine generated, DO NOT EDIT!
*
* Edit and run generate.py instead
*/
#ifdef VCL_RET_MAC
VCL_RET_MAC(deliver, DELIVER, VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER | VCL_MET_ERROR)
VCL_RET_MAC(error, ERROR, VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH)
VCL_RET_MAC(fetch, FETCH, VCL_MET_MISS)
VCL_RET_MAC(hash, HASH, VCL_MET_HASH)
VCL_RET_MAC(lookup, LOOKUP, VCL_MET_RECV)
VCL_RET_MAC(pass, PASS, VCL_MET_RECV | VCL_MET_PASS | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH)
VCL_RET_MAC(pipe, PIPE, VCL_MET_RECV | VCL_MET_PIPE)
VCL_RET_MAC(restart, RESTART, VCL_MET_PASS | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER | VCL_MET_ERROR)
#endif
#ifdef VCL_MET_MAC
VCL_MET_MAC(recv,RECV,
((1U << VCL_RET_ERROR)
| (1U << VCL_RET_PASS)
| (1U << VCL_RET_PIPE)
| (1U << VCL_RET_LOOKUP)
))
VCL_MET_MAC(pipe,PIPE,
((1U << VCL_RET_ERROR)
| (1U << VCL_RET_PIPE)
))
VCL_MET_MAC(pass,PASS,
((1U << VCL_RET_ERROR)
| (1U << VCL_RET_RESTART)
| (1U << VCL_RET_PASS)
))
VCL_MET_MAC(hash,HASH,
((1U << VCL_RET_HASH)
))
VCL_MET_MAC(miss,MISS,
((1U << VCL_RET_ERROR)
| (1U << VCL_RET_RESTART)
| (1U << VCL_RET_PASS)
| (1U << VCL_RET_FETCH)
))
VCL_MET_MAC(hit,HIT,
((1U << VCL_RET_ERROR)
| (1U << VCL_RET_RESTART)
| (1U << VCL_RET_PASS)
| (1U << VCL_RET_DELIVER)
))
VCL_MET_MAC(fetch,FETCH,
((1U << VCL_RET_ERROR)
| (1U << VCL_RET_RESTART)
| (1U << VCL_RET_PASS)
| (1U << VCL_RET_DELIVER)
))
VCL_MET_MAC(deliver,DELIVER,
((1U << VCL_RET_RESTART)
| (1U << VCL_RET_DELIVER)
))
VCL_MET_MAC(error,ERROR,
((1U << VCL_RET_RESTART)
| (1U << VCL_RET_DELIVER)
))
#endif
/*
* $Id$
*
* NB: This file is machine generated, DO NOT EDIT!
*
* Edit and run generate.py instead
*/
struct sockaddr * VRT_r_client_ip(const struct sess *);
struct sockaddr * VRT_r_server_ip(struct sess *);
const char * VRT_r_server_hostname(struct sess *);
const char * VRT_r_server_identity(struct sess *);
int VRT_r_server_port(struct sess *);
const char * VRT_r_req_request(const struct sess *);
void VRT_l_req_request(const struct sess *, const char *, ...);
const char * VRT_r_req_url(const struct sess *);
void VRT_l_req_url(const struct sess *, const char *, ...);
const char * VRT_r_req_proto(const struct sess *);
void VRT_l_req_proto(const struct sess *, const char *, ...);
struct director * VRT_r_req_backend(struct sess *);
void VRT_l_req_backend(struct sess *, struct director *);
int VRT_r_req_restarts(const struct sess *);
double VRT_r_req_grace(struct sess *);
void VRT_l_req_grace(struct sess *, double);
const char * VRT_r_req_xid(struct sess *);
unsigned VRT_r_req_esi(struct sess *);
void VRT_l_req_esi(struct sess *, unsigned);
unsigned VRT_r_req_backend_healthy(const struct sess *);
const char * VRT_r_bereq_request(const struct sess *);
void VRT_l_bereq_request(const struct sess *, const char *, ...);
const char * VRT_r_bereq_url(const struct sess *);
void VRT_l_bereq_url(const struct sess *, const char *, ...);
const char * VRT_r_bereq_proto(const struct sess *);
void VRT_l_bereq_proto(const struct sess *, const char *, ...);
double VRT_r_bereq_connect_timeout(struct sess *);
void VRT_l_bereq_connect_timeout(struct sess *, double);
double VRT_r_bereq_first_byte_timeout(struct sess *);
void VRT_l_bereq_first_byte_timeout(struct sess *, double);
double VRT_r_bereq_between_bytes_timeout(struct sess *);
void VRT_l_bereq_between_bytes_timeout(struct sess *, double);
const char * VRT_r_beresp_proto(const struct sess *);
void VRT_l_beresp_proto(const struct sess *, const char *, ...);
void VRT_l_beresp_saintmode(const struct sess *, double);
int VRT_r_beresp_status(const struct sess *);
void VRT_l_beresp_status(const struct sess *, int);
const char * VRT_r_beresp_response(const struct sess *);
void VRT_l_beresp_response(const struct sess *, const char *, ...);
unsigned VRT_r_beresp_cacheable(const struct sess *);
void VRT_l_beresp_cacheable(const struct sess *, unsigned);
double VRT_r_beresp_ttl(const struct sess *);
void VRT_l_beresp_ttl(const struct sess *, double);
double VRT_r_beresp_grace(const struct sess *);
void VRT_l_beresp_grace(const struct sess *, double);
const char * VRT_r_obj_proto(const struct sess *);
void VRT_l_obj_proto(const struct sess *, const char *, ...);
int VRT_r_obj_status(const struct sess *);
void VRT_l_obj_status(const struct sess *, int);
const char * VRT_r_obj_response(const struct sess *);
void VRT_l_obj_response(const struct sess *, const char *, ...);
int VRT_r_obj_hits(const struct sess *);
unsigned VRT_r_obj_cacheable(const struct sess *);
void VRT_l_obj_cacheable(const struct sess *, unsigned);
double VRT_r_obj_ttl(const struct sess *);
void VRT_l_obj_ttl(const struct sess *, double);
double VRT_r_obj_grace(const struct sess *);
void VRT_l_obj_grace(const struct sess *, double);
double VRT_r_obj_lastuse(const struct sess *);
const char * VRT_r_resp_proto(const struct sess *);
void VRT_l_resp_proto(const struct sess *, const char *, ...);
int VRT_r_resp_status(const struct sess *);
void VRT_l_resp_status(const struct sess *, int);
const char * VRT_r_resp_response(const struct sess *);
void VRT_l_resp_response(const struct sess *, const char *, ...);
double VRT_r_now(const struct sess *);
# $Id$
INCLUDES = -I$(top_srcdir)/include
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
lib_LTLIBRARIES = libvcl.la
......@@ -20,7 +20,7 @@ libvcl_la_SOURCES = \
vcc_dir_random.c \
vcc_dir_round_robin.c \
vcc_parse.c \
vcc_fixed_token.c \
$(builddir)/vcc_fixed_token.c \
vcc_obj.c \
vcc_string.c \
vcc_symb.c \
......@@ -31,11 +31,9 @@ libvcl_la_SOURCES = \
EXTRA_DIST = \
generate.py
$(srcdir)/vcc_obj.c: $(srcdir)/generate.py
cd $(srcdir) && @PYTHON@ generate.py || true
$(builddir)/vcc_obj.c $(builddir)/vcc_fixed_token.c $(builddir)/vcc_token_defs.h: $(srcdir)/generate.py $(top_srcdir)/include/vmod.h $(top_srcdir)/include/vrt.h
@PYTHON@ $(top_srcdir)/lib/libvcl/generate.py $(top_srcdir) $(top_builddir)
$(srcdir)/vcc_fixed_token.c: $(srcdir)/generate.py $(top_srcdir)/include/vcl.h $(top_srcdir)/include/vrt.h $(top_srcdir)/include/vrt_obj.h
cd $(srcdir) && @PYTHON@ generate.py || true
$(srcdir)/vcc_token_defs.h: $(srcdir)/generate.py $(top_srcdir)/include/vcl.h $(top_srcdir)/include/vrt.h $(top_srcdir)/include/vrt_obj.h
cd $(srcdir) && @PYTHON@ generate.py || true
CLEANFILES = $(builddir)/vcc_token_defs.h \
$(builddir)/vcc_fixed_token.c \
$(builddir)/vcc_obj.c
......@@ -40,6 +40,13 @@
# which hopefully makes for better error messages.
# XXX: does it actually do that ?
import sys
srcroot = "../.."
buildroot = "../.."
if len(sys.argv) == 3:
srcroot = sys.argv[1]
buildroot = sys.argv[2]
tokens = {
"T_INC": "++",
"T_DEC": "--",
......@@ -535,43 +542,9 @@ def file_header(fo):
#######################################################################
fo = open("vcc_fixed_token.c", "w")
file_header(fo)
fo.write("""
#include "config.h"
#include <stdio.h>
#include <ctype.h>
#include "config.h"
#include "vcc_priv.h"
#include "vsb.h"
""")
polish_tokens(tokens)
emit_vcl_fixed_token(fo, tokens)
emit_vcl_tnames(fo, tokens)
fo.write("""
void
vcl_output_lang_h(struct vsb *sb)
{
""")
emit_file(fo, "../../include/vcl.h")
emit_file(fo, "../../include/vmod.h")
emit_file(fo, "../../include/vrt.h")
emit_file(fo, "../../include/vrt_obj.h")
fo.write("""
}
""")
fo.close()
#######################################################################
fo = open("vcc_token_defs.h", "w")
fo = open(buildroot + "/lib/libvcl/vcc_token_defs.h", "w")
file_header(fo)
......@@ -596,10 +569,9 @@ for i in returns:
for j in i[1]:
rets[j] = True
#######################################################################
fo = open("../../include/vcl_returns.h", "w")
fo = open(buildroot + "/include/vcl_returns.h", "w")
file_header(fo)
......@@ -629,7 +601,7 @@ fo.close()
#######################################################################
fo = open("../../include/vcl.h", "w")
fo = open(buildroot + "/include/vcl.h", "w")
file_header(fo)
......@@ -721,10 +693,10 @@ def restrict(fo, spec):
#######################################################################
fh=open("../../include/vrt_obj.h", "w")
fh = open(buildroot + "/include/vrt_obj.h", "w")
file_header(fh)
fo=open("vcc_obj.c", "w")
fo = open(buildroot + "/lib/libvcl/vcc_obj.c", "w")
file_header(fo)
fo.write("""
......@@ -775,3 +747,39 @@ fo.write("\t{ NULL }\n};\n")
fo.close()
fh.close()
#######################################################################
fo = open(buildroot + "/lib/libvcl/vcc_fixed_token.c", "w")
file_header(fo)
fo.write("""
#include "config.h"
#include <stdio.h>
#include <ctype.h>
#include "config.h"
#include "vcc_priv.h"
#include "vsb.h"
""")
emit_vcl_fixed_token(fo, tokens)
emit_vcl_tnames(fo, tokens)
fo.write("""
void
vcl_output_lang_h(struct vsb *sb)
{
""")
emit_file(fo, buildroot + "/include/vcl.h")
emit_file(fo, srcroot + "/include/vmod.h")
emit_file(fo, srcroot + "/include/vrt.h")
emit_file(fo, buildroot + "/include/vrt_obj.h")
fo.write("""
}
""")
fo.close()
This diff is collapsed.
This diff is collapsed.
/*
* $Id$
*
* NB: This file is machine generated, DO NOT EDIT!
*
* Edit and run generate.py instead
*/
#define CNUM 128
#define CSRC 129
#define CSTR 130
#define EOI 131
#define ID 132
#define T_CAND 133
#define T_COR 134
#define T_DEC 135
#define T_DECR 136
#define T_DIV 137
#define T_ELSE 138
#define T_ELSEIF 139
#define T_ELSIF 140
#define T_EQ 141
#define T_GEQ 142
#define T_IF 143
#define T_INC 144
#define T_INCLUDE 145
#define T_INCR 146
#define T_LEQ 147
#define T_MUL 148
#define T_NEQ 149
#define T_NOMATCH 150
#define T_SHL 151
#define T_SHR 152
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment