[master] 6c14014 Fixes to get the "Makefile.phk" to work again fram Kacper.

Poul-Henning Kamp phk at FreeBSD.org
Mon Sep 21 14:24:27 CEST 2015


commit 6c14014dc1b70914e3832f0503536dd1b2d1550d
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Sep 21 12:21:50 2015 +0000

    Fixes to get the "Makefile.phk" to work again fram Kacper.
    
    Minor fixes for FreeBSD by:	phk

diff --git a/Makefile.inc.phk b/Makefile.inc.phk
index 216dcad..c864efa 100644
--- a/Makefile.inc.phk
+++ b/Makefile.inc.phk
@@ -196,6 +196,8 @@ vcc_if.c vcc_if.h: vmod.vcc $(TOPDIR)/lib/libvcc/vmodtool.py
 
 $(VMODNAME).so:	$(VMOD_OBJ)
 	$(CC) $(VMOD_LDFLAGS) -o $(VMODNAME).so $^
+	mkdir -p .libs
+	(cd .libs && ln -sf ../$(VMODNAME).so)
 
 .PHONY: vmod_install
 vmod_install:	$(VMODNAME).so
diff --git a/bin/varnishd/Makefile.phk b/bin/varnishd/Makefile.phk
index 9922d9f..e849a28 100644
--- a/bin/varnishd/Makefile.phk
+++ b/bin/varnishd/Makefile.phk
@@ -1,13 +1,14 @@
-VPATH += cache common mgt waiter storage hash
+VPATH += cache common mgt waiter storage hash http1 proxy
 
 PROG_SRC += cache/cache_acceptor.c
 PROG_SRC += cache/cache_backend.c
 PROG_SRC += cache/cache_backend_cfg.c
-PROG_SRC += cache/cache_backend_poll.c
+PROG_SRC += cache/cache_backend_tcp.c
+PROG_SRC += cache/cache_backend_probe.c
 PROG_SRC += cache/cache_ban.c
 PROG_SRC += cache/cache_busyobj.c
 PROG_SRC += cache/cache_cli.c
-PROG_SRC += cache/cache_dir.c
+PROG_SRC += cache/cache_director.c
 PROG_SRC += cache/cache_esi_deliver.c
 PROG_SRC += cache/cache_esi_fetch.c
 PROG_SRC += cache/cache_esi_parse.c
@@ -17,18 +18,23 @@ PROG_SRC += cache/cache_fetch_proc.c
 PROG_SRC += cache/cache_gzip.c
 PROG_SRC += cache/cache_hash.c
 PROG_SRC += cache/cache_http.c
-PROG_SRC += cache/cache_http1_deliver.c
-PROG_SRC += cache/cache_http1_fetch.c
-PROG_SRC += cache/cache_http1_fsm.c
-PROG_SRC += cache/cache_http1_proto.c
+PROG_SRC += http1/cache_http1_deliver.c
+PROG_SRC += http1/cache_http1_fetch.c
+PROG_SRC += http1/cache_http1_fsm.c
+PROG_SRC += http1/cache_http1_proto.c
+PROG_SRC += http1/cache_http1_pipe.c
+PROG_SRC += http1/cache_http1_line.c
+PROG_SRC += http1/cache_http1_vfp.c
 PROG_SRC += cache/cache_lck.c
 PROG_SRC += cache/cache_main.c
 PROG_SRC += cache/cache_mempool.c
 PROG_SRC += cache/cache_obj.c
 PROG_SRC += cache/cache_panic.c
-PROG_SRC += cache/cache_pipe.c
 PROG_SRC += cache/cache_pool.c
+PROG_SRC += cache/cache_range.c
+PROG_SRC += cache/cache_req.c
 PROG_SRC += cache/cache_req_fsm.c
+PROG_SRC += cache/cache_req_body.c
 PROG_SRC += cache/cache_rfc2616.c
 PROG_SRC += cache/cache_session.c
 PROG_SRC += cache/cache_shmlog.c
@@ -38,16 +44,19 @@ PROG_SRC += cache/cache_vrt.c
 PROG_SRC += cache/cache_vrt_re.c
 PROG_SRC += cache/cache_vrt_var.c
 PROG_SRC += cache/cache_vrt_vmod.c
+PROG_SRC += cache/cache_vrt_priv.c
 PROG_SRC += cache/cache_wrk.c
-PROG_SRC += cache/cache_wrw.c
 PROG_SRC += cache/cache_ws.c
+PROG_SRC += cache/cache_deliver_proc.c
+
+PROG_SRC += proxy/cache_proxy_proto.c
 
 PROG_SRC += common/common_vsc.c
 PROG_SRC += common/common_vsm.c
 
 PROG_SRC += hash/hash_classic.c
 PROG_SRC += hash/hash_critbit.c
-PROG_SRC += hash/hash_mgt.c
+PROG_SRC += hash/mgt_hash.c
 PROG_SRC += hash/hash_simple_list.c
 
 PROG_SRC += mgt/mgt_child.c
@@ -59,18 +68,21 @@ PROG_SRC += mgt/mgt_param_tbl.c
 PROG_SRC += mgt/mgt_param_tcp.c
 PROG_SRC += mgt/mgt_param_tweak.c
 PROG_SRC += mgt/mgt_pool.c
-PROG_SRC += mgt/mgt_sandbox.c
-PROG_SRC += mgt/mgt_sandbox_solaris.c
+PROG_SRC += mgt/mgt_jail.c
+PROG_SRC += mgt/mgt_jail_unix.c
+PROG_SRC += mgt/mgt_jail_solaris.c
 PROG_SRC += mgt/mgt_shmem.c
 PROG_SRC += mgt/mgt_vcc.c
+PROG_SRC += mgt/mgt_vcl.c
+PROG_SRC += mgt/mgt_acceptor.c
 
 PROG_SRC += storage/stevedore.c
-PROG_SRC += storage/stevedore_mgt.c
+PROG_SRC += storage/mgt_stevedore.c
 PROG_SRC += storage/stevedore_utils.c
 PROG_SRC += storage/storage_file.c
 PROG_SRC += storage/storage_malloc.c
 PROG_SRC += storage/storage_persistent.c
-PROG_SRC += storage/storage_persistent_mgt.c
+PROG_SRC += storage/mgt_storage_persistent.c
 PROG_SRC += storage/storage_persistent_silo.c
 PROG_SRC += storage/storage_persistent_subr.c
 PROG_SRC += storage/storage_umem.c
@@ -98,6 +110,8 @@ MADE_FILES += builtin_vcl.h
 
 TODO_INSTALL += install_etc
 
+CFLAGS	+= -DVARNISHD_IS_NOT_A_VMOD
+
 TOPDIR  = $(CURDIR)/../..
 include $(TOPDIR)/Makefile.inc.phk
 
diff --git a/bin/varnishhist/Makefile.phk b/bin/varnishhist/Makefile.phk
index 145414d..77e8c31 100644
--- a/bin/varnishhist/Makefile.phk
+++ b/bin/varnishhist/Makefile.phk
@@ -1,7 +1,10 @@
 PROG_SRC = varnishhist.c
+PROG_SRC += varnishhist_options.c
 
-LD_ADD	+= ${LIB_VARNISH}
+LD_ADD	+= ${LIB_VARNISHTOOLS}
 LD_ADD	+= ${LIB_VARNISHAPI}
+LD_ADD	+= ${LIB_VARNISH}
+LD_ADD += -lpthread -lncurses -lm ${LIB_PCRE}
 
 TOPDIR  = $(CURDIR)/../..
 include $(TOPDIR)/Makefile.inc.phk
diff --git a/bin/varnishtest/Makefile.phk b/bin/varnishtest/Makefile.phk
index 748977e..438bfed 100644
--- a/bin/varnishtest/Makefile.phk
+++ b/bin/varnishtest/Makefile.phk
@@ -7,6 +7,7 @@ PROG_SRC += vtc_main.c
 PROG_SRC += vtc_sema.c
 PROG_SRC += vtc_server.c
 PROG_SRC += vtc_varnish.c
+PROG_SRC += vtc_process.c
 
 LD_ADD	+= ${LIB_VARNISHAPI}
 LD_ADD	+= ${LIB_VARNISH}
@@ -26,4 +27,4 @@ include $(TOPDIR)/Makefile.inc.phk
 .PHONY:	all_tests
 
 all_tests:
-	./varnishtest -i -j 4 tests/*.vtc
+	./varnishtest -i -j 24 tests/*.vtc
diff --git a/bin/varnishtop/Makefile.phk b/bin/varnishtop/Makefile.phk
index 3c5684c..7f8d760 100644
--- a/bin/varnishtop/Makefile.phk
+++ b/bin/varnishtop/Makefile.phk
@@ -5,7 +5,7 @@ LD_ADD	+= ${LIB_VARNISHTOOLS}
 LD_ADD	+= ${LIB_VARNISHAPI}
 LD_ADD	+= ${LIB_VARNISH}
 LD_ADD	+= ${LIB_PCRE}
-LD_ADD	+= -lm
+LD_ADD	+= -lm -lpthread -lncurses
 
 TODO_ALL += build_man
 
diff --git a/config.phk b/config.phk
index 16c3571..760ea22 100644
--- a/config.phk
+++ b/config.phk
@@ -63,7 +63,9 @@ if true ; then
 		ncursesw/curses.h \
 		priv.h \
 		pthread_np.h \
+		edit/readline/readline.h \
 		readline/history.h \
+		editline/readline.h \
 		readline/readline.h \
 		sys/endian.h \
 		sys/filio.h \
@@ -88,7 +90,10 @@ if true ; then
 	echo "#define PACKAGE_VERSION \"${ADM_VERSION}\"" >> ${CONFIG_H}_
 
 	echo '
+    #define VARNISH_VCL_DIR         "/etc/varnish"
 		#define VARNISH_STATE_DIR       "/tmp/phk/"
+		#define VARNISH_VMOD_DIR        "/usr/lib/varnish/vmods"
+		#define VCS_Branch "master"
 	' >> ${CONFIG_H}_
 	if [ ! -f ${CONFIG_H} ] ; then
 		mv ${CONFIG_H}_ ${CONFIG_H}
@@ -107,8 +112,10 @@ VMAV=include/vmod_abi.h
 
 if [ -d ./.git ] ; then 
 	V=`git show -s --pretty=format:%h`
+	B=`git rev-parse --abbrev-ref HEAD`
 else
 	V="NOGIT"
+	B="NOGIT"
 fi
 (
 echo "/* $V */"
@@ -119,6 +126,7 @@ echo " * make(1) updates this when necessary"
 echo " *"
 echo " */"
 echo "#define VCS_Version \"$V\""
+echo "#define VCS_Branch \"$B\""
 ) > ${VCSF}_
 if [ ! -f ${VCSF} ] ; then
 	mv ${VCSF}_ ${VCSF}
diff --git a/doc/sphinx/Makefile.phk b/doc/sphinx/Makefile.phk
index 7e43fef..8ed14ae 100644
--- a/doc/sphinx/Makefile.phk
+++ b/doc/sphinx/Makefile.phk
@@ -156,7 +156,6 @@ EXTRA_DIST = \
 	users-guide/intro.rst \
 	users-guide/operation-logging.rst \
 	users-guide/operation-statistics.rst \
-	users-guide/params.rst \
 	users-guide/performance.rst \
 	users-guide/purging.rst \
 	users-guide/report.rst \
@@ -179,7 +178,19 @@ EXTRA_DIST = \
 	users-guide/vcl-saint-and-grace.rst \
 	users-guide/vcl-syntax.rst \
 	users-guide/vcl-variables.rst \
-	users-guide/vcl.rst
+	users-guide/vcl.rst \
+	include/params.rst \
+	include/varnishncsa_options.rst \
+	include/varnishncsa_synopsis.rst \
+	include/varnishlog_options.rst \
+	include/varnishlog_synopsis.rst \
+	include/varnishtop_options.rst \
+	include/varnishtop_synopsis.rst \
+	include/varnishhist_options.rst \
+	include/varnishhist_synopsis.rst \
+	reference/vmod_std.generated.rst \
+	reference/vmod_directors.generated.rst 
+
 
 dist-hook:
 	$(MAKE) html
@@ -188,6 +199,41 @@ dist-hook:
 distclean-local:
 	rm -rf $(BUILDDIR)
 
-# XXX: doesn't work...
-#reference/params.rst: $(top_builddir)/bin/varnishd/varnishd
-#	$(top_builddir)/bin/varnishd/varnishd -x dumprstparam > reference/params.rst
+# XXX: here be dragons
+include/params.rst: ../../bin/varnishd/varnishd
+	../../bin/varnishd/varnishd -x dumprstparam > $@
+
+
+# only sphinx needs the opt2rst stuff anyway
+%_opt2rst: ../../bin/%/%_options.h %_options.c
+
+include/varnishncsa_options.rst: varnishncsa_opt2rst
+	../../bin/varnishncsa/varnishncsa_opt2rst options > $@
+
+include/varnishncsa_synopsis.rst: varnishncsa_opt2rst
+	../../bin/varnishncsa/varnishncsa_opt2rst synopsis > $@
+
+include/varnishlog_options.rst: varnishlog_opt2rst
+	../../bin/varnishlog/varnishlog_opt2rst options > $@
+
+include/varnishlog_synopsis.rst: varnishlog_opt2rst
+	../../bin/varnishlog/varnishlog_opt2rst synopsis > $@
+
+include/varnishtop_options.rst: varnishtop_opt2rst
+	../../bin/varnishtop/varnishtop_opt2rst options > $@
+
+include/varnishtop_synopsis.rst: varnishtop_opt2rst
+	../../bin/varnishtop/varnishtop_opt2rst synopsis > $@
+
+include/varnishhist_options.rst: varnishhist_opt2rst
+	./varnishhist_opt2rst options > $@
+
+include/varnishhist_synopsis.rst: varnishhist_opt2rst
+	./varnishhist_opt2rst synopsis > $@
+
+reference/vmod_std.generated.rst: reference ../../lib/libvmod_std/vmod_std.rst
+	cp ../../lib/libvmod_std/vmod_std.rst $@
+
+reference/vmod_directors.generated.rst: reference ../../lib/libvmod_directors/vmod_directors.rst
+	cp ../../lib/libvmod_directors/vmod_directors.rst $@
+
diff --git a/lib/libvmod_debug/Makefile.phk b/lib/libvmod_debug/Makefile.phk
index a692640..35135cb 100644
--- a/lib/libvmod_debug/Makefile.phk
+++ b/lib/libvmod_debug/Makefile.phk
@@ -1,6 +1,7 @@
 
 VMOD_SRC += vmod_debug.c
 VMOD_SRC += vmod_debug_obj.c
+VMOD_SRC += vmod_debug_dyn.c
 
 TOPDIR= $(CURDIR)/../..
 include $(TOPDIR)/Makefile.inc.phk



More information about the varnish-commit mailing list