Hi all,
attached patch fixes the phk buildsystem as of master, except for the
sphinx doc stuff. As far as I understand the build system only takes
into account one binary per subdirectory, and the noinst_PROGRAMS
varnish{top,hist,ncsa,..}_opt2rst are giving me some greif.A discussion with Martin at the VDD concluded that a good way to clean this up would be to take the opt2rst functions into each binary as an undocumented option. I'll be happy to try that if noone objects. I've also taken a tiny look at Guillaume's build patches and I like those. Don't count myself as strongly-for-anything, even though you can definitely list autocrap in my pet peeves, but I just don't like broken things lying around.. -Kacper
From bb53b559b230225060125f253ee5bd892d3b5d94 Mon Sep 17 00:00:00 2001 From: Kacper Wysocki <[email protected]> Date: Wed, 2 Sep 2015 16:45:03 +0200 Subject: [PATCH] fix phk buildsystem --- Makefile.inc.phk | 2 ++ bin/varnishd/Makefile.phk | 40 ++++++++++++++++++---------- bin/varnishhist/Makefile.phk | 5 +++- bin/varnishtest/Makefile.phk | 3 ++- bin/varnishtop/Makefile.phk | 2 +- config.phk | 6 +++++ doc/sphinx/Makefile.phk | 56 +++++++++++++++++++++++++++++++++++---- doc/sphinx/users-guide/params.rst | 29 -------------------- lib/libvmod_debug/Makefile.phk | 1 + 9 files changed, 93 insertions(+), 51 deletions(-) delete mode 100644 doc/sphinx/users-guide/params.rst diff --git a/Makefile.inc.phk b/Makefile.inc.phk index 216dcad..60d2469 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 -s ../$(VMODNAME).so) .PHONY: vmod_install vmod_install: $(VMODNAME).so diff --git a/bin/varnishd/Makefile.phk b/bin/varnishd/Makefile.phk index 9922d9f..29dae63 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 diff --git a/bin/varnishhist/Makefile.phk b/bin/varnishhist/Makefile.phk index 145414d..c503932 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 -lpcre 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..8acfb21 100644 --- a/config.phk +++ b/config.phk @@ -88,7 +88,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 +110,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 +124,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 -- 2.5.1
_______________________________________________ varnish-dev mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
