You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@tcl.apache.org by mx...@apache.org on 2017/01/05 01:16:33 UTC

svn commit: r1777395 - in /tcl/rivet/trunk: ChangeLog Makefile.am Makefile.in configure.ac doc/Makefile.am rivet/init.tcl src/Makefile.am src/mod_rivet_ng/rivetCore.c src/parser/parserPkgInit.c src/parser/rivetParser.c src/parser/rivetParser.h

Author: mxmanghi
Date: Thu Jan  5 01:16:33 2017
New Revision: 1777395

URL: http://svn.apache.org/viewvc?rev=1777395&view=rev
Log:
    * Makefile.am,src/Makefile.am: now handling the 'dist'
    and 'distcheck' targets of the automake generated
    Makefile
    * configure.ac: add RIVET_CORE definition
    * src/mod_rivet_ng/rivetCore.c: now calls
    the alternate form of RivetParse
    * src/parser/parserPkgInit.c: altenate form of
    function Rivet_Parser elimianates the need of
    enclosing the code in the namespace ::request


Modified:
    tcl/rivet/trunk/ChangeLog
    tcl/rivet/trunk/Makefile.am
    tcl/rivet/trunk/Makefile.in
    tcl/rivet/trunk/configure.ac
    tcl/rivet/trunk/doc/Makefile.am
    tcl/rivet/trunk/rivet/init.tcl
    tcl/rivet/trunk/src/Makefile.am
    tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c
    tcl/rivet/trunk/src/parser/parserPkgInit.c
    tcl/rivet/trunk/src/parser/rivetParser.c
    tcl/rivet/trunk/src/parser/rivetParser.h

Modified: tcl/rivet/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/ChangeLog?rev=1777395&r1=1777394&r2=1777395&view=diff
==============================================================================
--- tcl/rivet/trunk/ChangeLog (original)
+++ tcl/rivet/trunk/ChangeLog Thu Jan  5 01:16:33 2017
@@ -1,3 +1,14 @@
+2017-01-04 Massimo Manghi <mx...@apache.org>
+    * Makefile.am,src/Makefile.am: now handling the 'dist'
+    and 'distcheck' targets of the automake generated
+    Makefile
+    * configure.ac: add RIVET_CORE definition
+    * src/mod_rivet_ng/rivetCore.c: now calls
+    the alternate form of RivetParse
+    * src/parser/parserPkgInit.c: altenate form of
+    function Rivet_Parser elimianates the need of
+    enclosing the code in the namespace ::request
+
 2016-12-19 Massimo Manghi <mx...@apache.org>
     * rivet/mod_rivet_ng/mod_rivet_cache.c: better wording of cache 
     functions names. 

Modified: tcl/rivet/trunk/Makefile.am
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/Makefile.am?rev=1777395&r1=1777394&r2=1777395&view=diff
==============================================================================
--- tcl/rivet/trunk/Makefile.am (original)
+++ tcl/rivet/trunk/Makefile.am Thu Jan  5 01:16:33 2017
@@ -9,10 +9,11 @@
 # 2013/01/20: removing libtool created .la files
 
 ACLOCAL_AMFLAGS = -I m4
-EXTRA_DIST = LICENSE contrib debian doc rivet win/nmakehlp.c src/testing.c src/TclWebcgi.c
+EXTRA_DIST = LICENSE contrib doc rivet win/nmakehlp.c src/testing.c src/TclWebcgi.c
 SUBDIRS = src doc
 RIVETLIB_DESTDIR = $(DESTDIR)@RIVET_TCL_TARGET@
 RIVET_PACKAGES = $(RIVETLIB_DESTDIR)/packages
+AM_DISTCHECK_CONFIGURE_FLAGS = --with-tcl=${TCL_BIN_DIR} --with-rivet-target-dir=${RIVETLIB_DESTDIR} --with-apxs=${APXS_PREFIX}/bin/apxs
 
 # I expect this symbol sooner or later to be handled by configure for arch dependent builds
 # Current value is the rivetlib directory
@@ -24,38 +25,63 @@ libtool: $(LIBTOOL_DEPS)
 install-data-local: install-binaries install-packages
 
 install-binaries:
+	echo 'running target install-binaries ($(RIVETLIB_DESTDIR))'
 	$(mkinstalldirs) $(RIVETLIB_DESTDIR)
-	cp -v rivet/init.tcl $(RIVETLIB_DESTDIR)/
-	cp -rv rivet/rivet-tcl $(RIVETLIB_DESTDIR)/
-	-(  cd $(RIVETLIB_DESTDIR); rm -f *.la; \
-        echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH) *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
+	$(mkinstalldirs) $(RIVETLIB_DESTDIR)/rivet-tcl
+	$(install_sh) -C $(builddir)/rivet/init.tcl $(RIVETLIB_DESTDIR)
+	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/rivet-tcl/*) $(RIVETLIB_DESTDIR)/rivet-tcl
+
+#cp -rv $(srcdir)/rivet/packages $(RIVETLIB_DESTDIR)/
+#-(  cd $(RIVETLIB_DESTDIR); rm -f *.la; \
+#    echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH) *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
 
 uninstall-local:
+	echo 'running target uninstall-local ($(RIVETLIB_DESTDIR))'
 	rm -f  $(RIVETLIB_DESTDIR)/init.tcl
 	rm -fr $(RIVETLIB_DESTDIR)/rivet-tcl
 	rm -f  $(RIVETLIB_DESTDIR)/librivetlib.so
 	rm -f  $(RIVETLIB_DESTDIR)/librivetparser.so
 	rm -fr $(RIVETLIB_DESTDIR)/packages
 	rm -f  $(RIVETLIB_DESTDIR)/pkgIndex.tcl
+	@if [ -z '$(wildcard $(RIVETLIB_DESTDIR)/mpm/*)' ]; then \
+		rmdir $(RIVETLIB_DESTDIR)/mpm; \
+	fi
 	@if [ -z '$(wildcard $(RIVETLIB_DESTDIR)/*)' ]; then \
 		rmdir $(RIVETLIB_DESTDIR); \
 	fi
 
 install-packages:
-	$(mkinstalldirs) $(RIVET_PACKAGES)
-	cp -rv rivet/packages/* $(RIVET_PACKAGES)
-	-(  cd  $(RIVETLIB_DESTDIR); \
+	echo 'running target install-packages ($(RIVETLIB_DESTDIR))'
+	$(mkinstalldirs) $(RIVET_PACKAGES)/asciiglyphs
+	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/asciiglyphs/*) $(RIVET_PACKAGES)/asciiglyphs/
+	$(mkinstalldirs) $(RIVET_PACKAGES)/calendar
+	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/calendar/*) $(RIVET_PACKAGES)/calendar/
+	$(mkinstalldirs) $(RIVET_PACKAGES)/dio
+	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/dio/*) $(RIVET_PACKAGES)/dio/
+	$(mkinstalldirs) $(RIVET_PACKAGES)/entities
+	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/entities/*) $(RIVET_PACKAGES)/entities/
+	$(mkinstalldirs) $(RIVET_PACKAGES)/form
+	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/form/*) $(RIVET_PACKAGES)/form/
+	$(mkinstalldirs) $(RIVET_PACKAGES)/formbroker
+	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/formbroker/*) $(RIVET_PACKAGES)/formbroker/
+	$(mkinstalldirs) $(RIVET_PACKAGES)/session
+	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/session/*) $(RIVET_PACKAGES)/session/
+	$(mkinstalldirs) $(RIVET_PACKAGES)/tclrivet
+	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/tclrivet/*) $(RIVET_PACKAGES)/tclrivet/
+	-(  cd  $(RIVETLIB_DESTDIR); rm -f *.la; \
 	    echo 'eval file delete [glob [file join packages * pkgIndex.tcl]] pkgIndex.tcl' | @TCLSH_PROG@ ; \
 	    echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH) *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
 
 uninstall-packages:
-	rm -fr $(RIVET_PACKAGES)
-	rm -f  $(RIVETLIB_DESTDIR)/pkgIndex.tcl
+	echo 'running target uninstall-packages ($(RIVETLIB_DESTDIR))'
+	rm -f	$(RIVETLIB_DESTDIR)/pkgIndex.tcl
+	rm -fr  $(RIVETLIB_DESTDIR)/packages
+	rm -fr  $(RIVETLIB_DESTDIR)/rivet-tcl
+	rm -f	$(RIVETLIB_DESTDIR)/*so
 	@if [ -z '$(wildcard $(RIVETLIB_DESTDIR)/*)' ]; then \
+		echo 'removing directory $(RIVETLIB_DESTDIR)'
 		@rmdir $(RIVETLIB_DESTDIR); \
 	fi
-	-(  cd  $(RIVETLIB_DESTDIR); \
-	    echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH) *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
 
 # 
 distclean-local:

Modified: tcl/rivet/trunk/Makefile.in
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/Makefile.in?rev=1777395&r1=1777394&r2=1777395&view=diff
==============================================================================
--- tcl/rivet/trunk/Makefile.in (original)
+++ tcl/rivet/trunk/Makefile.in Thu Jan  5 01:16:33 2017
@@ -423,10 +423,11 @@ with_apr_config = @with_apr_config@
 with_apu_config = @with_apu_config@
 with_apxs = @with_apxs@
 ACLOCAL_AMFLAGS = -I m4
-EXTRA_DIST = LICENSE contrib debian doc rivet win/nmakehlp.c src/testing.c src/TclWebcgi.c
+EXTRA_DIST = LICENSE contrib doc rivet win/nmakehlp.c src/testing.c src/TclWebcgi.c
 SUBDIRS = src doc
 RIVETLIB_DESTDIR = $(DESTDIR)@RIVET_TCL_TARGET@
 RIVET_PACKAGES = $(RIVETLIB_DESTDIR)/packages
+AM_DISTCHECK_CONFIGURE_FLAGS = --with-tcl=${TCL_BIN_DIR} --with-rivet-target-dir=${RIVETLIB_DESTDIR} --with-apxs=${APXS_PREFIX}/bin/apxs
 
 # I expect this symbol sooner or later to be handled by configure for arch dependent builds
 # Current value is the rivetlib directory
@@ -923,38 +924,63 @@ libtool: $(LIBTOOL_DEPS)
 install-data-local: install-binaries install-packages
 
 install-binaries:
+	echo 'running target install-binaries ($(RIVETLIB_DESTDIR))'
 	$(mkinstalldirs) $(RIVETLIB_DESTDIR)
-	cp -v rivet/init.tcl $(RIVETLIB_DESTDIR)/
-	cp -rv rivet/rivet-tcl $(RIVETLIB_DESTDIR)/
-	-(  cd $(RIVETLIB_DESTDIR); rm -f *.la; \
-        echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH) *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
+	$(mkinstalldirs) $(RIVETLIB_DESTDIR)/rivet-tcl
+	$(install_sh) -C $(builddir)/rivet/init.tcl $(RIVETLIB_DESTDIR)
+	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/rivet-tcl/*) $(RIVETLIB_DESTDIR)/rivet-tcl
+
+#cp -rv $(srcdir)/rivet/packages $(RIVETLIB_DESTDIR)/
+#-(  cd $(RIVETLIB_DESTDIR); rm -f *.la; \
+#    echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH) *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
 
 uninstall-local:
+	echo 'running target uninstall-local ($(RIVETLIB_DESTDIR))'
 	rm -f  $(RIVETLIB_DESTDIR)/init.tcl
 	rm -fr $(RIVETLIB_DESTDIR)/rivet-tcl
 	rm -f  $(RIVETLIB_DESTDIR)/librivetlib.so
 	rm -f  $(RIVETLIB_DESTDIR)/librivetparser.so
 	rm -fr $(RIVETLIB_DESTDIR)/packages
 	rm -f  $(RIVETLIB_DESTDIR)/pkgIndex.tcl
+	@if [ -z '$(wildcard $(RIVETLIB_DESTDIR)/mpm/*)' ]; then \
+		rmdir $(RIVETLIB_DESTDIR)/mpm; \
+	fi
 	@if [ -z '$(wildcard $(RIVETLIB_DESTDIR)/*)' ]; then \
 		rmdir $(RIVETLIB_DESTDIR); \
 	fi
 
 install-packages:
-	$(mkinstalldirs) $(RIVET_PACKAGES)
-	cp -rv rivet/packages/* $(RIVET_PACKAGES)
-	-(  cd  $(RIVETLIB_DESTDIR); \
+	echo 'running target install-packages ($(RIVETLIB_DESTDIR))'
+	$(mkinstalldirs) $(RIVET_PACKAGES)/asciiglyphs
+	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/asciiglyphs/*) $(RIVET_PACKAGES)/asciiglyphs/
+	$(mkinstalldirs) $(RIVET_PACKAGES)/calendar
+	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/calendar/*) $(RIVET_PACKAGES)/calendar/
+	$(mkinstalldirs) $(RIVET_PACKAGES)/dio
+	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/dio/*) $(RIVET_PACKAGES)/dio/
+	$(mkinstalldirs) $(RIVET_PACKAGES)/entities
+	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/entities/*) $(RIVET_PACKAGES)/entities/
+	$(mkinstalldirs) $(RIVET_PACKAGES)/form
+	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/form/*) $(RIVET_PACKAGES)/form/
+	$(mkinstalldirs) $(RIVET_PACKAGES)/formbroker
+	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/formbroker/*) $(RIVET_PACKAGES)/formbroker/
+	$(mkinstalldirs) $(RIVET_PACKAGES)/session
+	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/session/*) $(RIVET_PACKAGES)/session/
+	$(mkinstalldirs) $(RIVET_PACKAGES)/tclrivet
+	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/tclrivet/*) $(RIVET_PACKAGES)/tclrivet/
+	-(  cd  $(RIVETLIB_DESTDIR); rm -f *.la; \
 	    echo 'eval file delete [glob [file join packages * pkgIndex.tcl]] pkgIndex.tcl' | @TCLSH_PROG@ ; \
 	    echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH) *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
 
 uninstall-packages:
-	rm -fr $(RIVET_PACKAGES)
-	rm -f  $(RIVETLIB_DESTDIR)/pkgIndex.tcl
+	echo 'running target uninstall-packages ($(RIVETLIB_DESTDIR))'
+	rm -f	$(RIVETLIB_DESTDIR)/pkgIndex.tcl
+	rm -fr  $(RIVETLIB_DESTDIR)/packages
+	rm -fr  $(RIVETLIB_DESTDIR)/rivet-tcl
+	rm -f	$(RIVETLIB_DESTDIR)/*so
 	@if [ -z '$(wildcard $(RIVETLIB_DESTDIR)/*)' ]; then \
+		echo 'removing directory $(RIVETLIB_DESTDIR)'
 		@rmdir $(RIVETLIB_DESTDIR); \
 	fi
-	-(  cd  $(RIVETLIB_DESTDIR); \
-	    echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH) *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
 
 # 
 distclean-local:

Modified: tcl/rivet/trunk/configure.ac
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/configure.ac?rev=1777395&r1=1777394&r2=1777395&view=diff
==============================================================================
--- tcl/rivet/trunk/configure.ac (original)
+++ tcl/rivet/trunk/configure.ac Thu Jan  5 01:16:33 2017
@@ -861,6 +861,7 @@ AC_DEFINE_UNQUOTED(UPLOAD_DIR,"${RIVET_U
 AC_DEFINE_UNQUOTED(MAX_POST,[$MAX_POST],[Max size of data in POST operations])
 AC_DEFINE_UNQUOTED(SEPARATE_CHANNELS,0,[Separate Channels for virtual hosts])
 AC_DEFINE_UNQUOTED(CONFIGURE_CMD,"${CONFIGURE_CMD}",[configure command string])
+AC_DEFINE_UNQUOTED(RIVET_CORE,"${rivet_core}",[mod_rivet core])
 
 # We need to use the package path for the installation procedure.  On
 #Debian linux TCL_PACKAGE_PATH may have more than one path in the
@@ -873,7 +874,7 @@ AC_SUBST(TCL_PACKAGE_PATH)
 # You may alternatively have a special pkgIndex.tcl.in or other files
 # which require substituting the AC variables in.  Include these here.
 #--------------------------------------------------------------------
-AC_CONFIG_FILES([Makefile src/Makefile rivet/init.tcl src/parser/Makefile doc/Makefile doc/convert_examples.tcl])
+AC_CONFIG_FILES([Makefile src/Makefile rivet/init.tcl doc/Makefile doc/convert_examples.tcl])
 
 #case $apache_version_dir in
 #    apache-1) AC_CONFIG_FILES([Makefile src/Makefile src/apache-1/Makefile doc/Makefile]) ;;

Modified: tcl/rivet/trunk/doc/Makefile.am
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/Makefile.am?rev=1777395&r1=1777394&r2=1777395&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/Makefile.am (original)
+++ tcl/rivet/trunk/doc/Makefile.am Thu Jan  5 01:16:33 2017
@@ -77,4 +77,7 @@ distclean:
 	-rm -f graphics
 	-rm Makefile
 
+uninstall-local:
+	rm -fr $(builddir)/convert_examples.tcl
+
 .PHONY: examples

Modified: tcl/rivet/trunk/rivet/init.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/init.tcl?rev=1777395&r1=1777394&r2=1777395&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/init.tcl (original)
+++ tcl/rivet/trunk/rivet/init.tcl Thu Jan  5 01:16:33 2017
@@ -138,7 +138,7 @@ proc ::Rivet::request_handling {} {
         set script [::rivet::url_script]
         if {$script ne ""} {
             set ::Rivet::script $script
-            uplevel #0 $script
+            namespace eval ::request $script
         }
 
         set script [::rivet::inspect AfterScript]

Modified: tcl/rivet/trunk/src/Makefile.am
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/Makefile.am?rev=1777395&r1=1777394&r2=1777395&view=diff
==============================================================================
--- tcl/rivet/trunk/src/Makefile.am (original)
+++ tcl/rivet/trunk/src/Makefile.am Thu Jan  5 01:16:33 2017
@@ -22,10 +22,10 @@ lib_libexec_LTLIBRARIES = librivetparser
 #
 # Rivet Parser Library
 #
-librivetparser_la_SOURCES = parser/rivetParser.c parser/parserPkgInit.c
+librivetparser_la_SOURCES = parser/rivetParser.c parser/parserPkgInit.c parser/rivetParser.h
 librivetparser_la_LDFLAGS = @TCL_STUB_LIB_SPEC@ @APXS_LDFLAGS@ @APR_LDFLAGS@ -module -avoid-version
 librivetparser_la_LIBADD  = @APXS_LIBS@
-librivetparser_la_CPPFLAGS = @apache_include@ -I@rivet_core@ @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_INCLUDES@ @APR_CPPFLAGS@ -DSTART_TAG='"<?"' -DEND_TAG='"?>"' -DUSE_TCL_STUBS
+librivetparser_la_CPPFLAGS = @apache_include@ -I$(srcdir)/@rivet_core@ @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_INCLUDES@ @APR_CPPFLAGS@ -DSTART_TAG='"<?"' -DEND_TAG='"?>"' -DUSE_TCL_STUBS
 
 #
 # Rivet Library
@@ -33,27 +33,40 @@ librivetparser_la_CPPFLAGS = @apache_inc
 librivetlib_la_SOURCES = librivet/rivetList.c librivet/rivetCrypt.c librivet/rivetWWW.c librivet/rivetPkgInit.c
 librivetlib_la_LDFLAGS = @TCL_STUB_LIB_SPEC@ @APXS_LDFLAGS@ @APR_LDFLAGS@ @APU_LDFLAGS@ -module -avoid-version
 librivetlib_la_LIBADD  = @APXS_LIBS@
-librivetlib_la_CPPFLAGS = -I@rivet_core@ -I@apache_request@ @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_INCLUDES@ @APU_INCLUDES@ @APR_CPPFLAGS@ -DSTART_TAG='"<?"' -DEND_TAG='"?>"' -DUSE_TCL_STUBS 
+librivetlib_la_CPPFLAGS = -I$(srcdir)/@rivet_core@ -I$(srcdir)/@apache_request@ @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_INCLUDES@ @APU_INCLUDES@ @APR_CPPFLAGS@ -DSTART_TAG='"<?"' -DEND_TAG='"?>"' -DUSE_TCL_STUBS 
 
-apxs_libexecdir = @APXS_LIBEXECDIR@
+apxs_libexecdir = $(DESTDIR)@APXS_LIBEXECDIR@
 apxs_libexec_LTLIBRARIES = mod_rivet.la
 
-mod_rivet_la_SOURCES =  @rivet_core@/mod_rivet.c                            \
-                        @apache_request@/apache_multipart_buffer.c 	        \
-                        @apache_request@/apache_request.c                   \
-                        @rivet_commands@/rivetCore.c                        \
-                        @rivet_commands@/rivetInspect.c                     \
-                        @rivet_channel@/rivetChannel.c                      \
-                        parser/rivetParser.c                                \
-                        @rivet_core@/TclWebapache.c                         \
-                        @rivet_core@/apache_config.c                        \
-                        @rivet_core@/mod_rivet_common.c                     \
-                        @rivet_core@/mod_rivet_generator.c                  \
-                        @rivet_core@/mod_rivet_cache.c
+mod_rivet_la_SOURCES =  @rivet_core@/mod_rivet.c                        \
+                        @apache_request@/apache_multipart_buffer.c 	    \
+                        @apache_request@/apache_multipart_buffer.h 	    \
+                        @apache_request@/apache_request.c               \
+                        @apache_request@/apache_request.h               \
+                        @rivet_commands@/rivetCore.c                    \
+                        @rivet_commands@/rivetInspect.c                 \
+                        @rivet_channel@/rivetChannel.c                  \
+                        parser/rivetParser.c                            \
+                        @rivet_core@/TclWebapache.c                     \
+                        @rivet_core@/apache_config.c                    \
+                        @rivet_core@/mod_rivet_common.c                 \
+                        @rivet_core@/mod_rivet_generator.c              \
+                        @rivet_core@/mod_rivet_cache.c                  \
+                        @rivet_core@/apache_config.h                    \
+                        @rivet_core@/mod_rivet_cache.h                  \
+                        @rivet_core@/mod_rivet_common.h                 \
+                        @rivet_core@/mod_rivet_generator.h              \
+                        @rivet_core@/mod_rivet.h                        \
+                        @rivet_core@/rivetChannel.h                     \
+                        @rivet_core@/rivetCore.h                        \
+                        @rivet_core@/rivet_types.h                      \
+                        @rivet_core@/worker_prefork_common.h            \
+                        rivet.h                                         \
+                        TclWeb.h
 
 mod_rivet_la_LDFLAGS = @TCL_LIB_SPEC@ @APXS_LDFLAGS@ @APR_LDFLAGS@ -module -avoid-version
 mod_rivet_la_LIBADD = @TCL_LIBS@ @APXS_LIBS@ 
-mod_rivet_la_CPPFLAGS = -I@rivet_core@ -I@rivet_channel@ -I@RIVET_BASE_INCLUDE@/parser -I@apache_request@ @apache_include@ -I@RIVET_BASE_INCLUDE@ @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_CPPFLAGS@ @APR_INCLUDES@ @APU_INCLUDES@ -DSTART_TAG='"<?"' -DEND_TAG='"?>"'
+mod_rivet_la_CPPFLAGS = -I$(srcdir) -I$(srcdir)/@rivet_core@ -I$(srcdir)/@rivet_channel@ -I$(srcdir)/parser -I$(srcdir)/@apache_request@ @apache_include@ -I. @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_CPPFLAGS@ @APR_INCLUDES@ @APU_INCLUDES@ -DSTART_TAG='"<?"' -DEND_TAG='"?>"'
 
 lib_libmpmdir = @RIVET_TCL_TARGET@/mpm
 lib_libmpm_LTLIBRARIES = rivet_worker_mpm.la rivet_prefork_mpm.la rivet_lazy_mpm.la
@@ -61,22 +74,29 @@ lib_libmpm_LTLIBRARIES = rivet_worker_mp
 rivet_worker_mpm_la_SOURCES = @rivet_core@/rivet_worker_mpm.c @rivet_core@/worker_prefork_common.c
 rivet_worker_mpm_la_LDFLAGS = @TCL_STUB_LIB_SPEC@ @APXS_LDFLAGS@ -module -avoid-version
 rivet_worker_mpm_la_LIBADD  = @APXS_LIBS@
-rivet_worker_mpm_la_CPPFLAGS = @apache_include@ -I@rivet_core@ @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_CPPFLAGS@ @APR_INCLUDES@ @APU_INCLUDES@ -I@apache_request@ -I@RIVET_BASE_INCLUDE@
-
+rivet_worker_mpm_la_CPPFLAGS = @apache_include@ @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_CPPFLAGS@ @APR_INCLUDES@ @APU_INCLUDES@ -I$(srcdir)/@apache_request@ -I$(srcdir) -I$(srcdir)/@rivet_core@
+ 
 rivet_prefork_mpm_la_SOURCES = @rivet_core@/rivet_prefork_mpm.c @rivet_core@/worker_prefork_common.c
 rivet_prefork_mpm_la_LDFLAGS = @TCL_STUB_LIB_SPEC@ @APXS_LDFLAGS@ -module -avoid-version
 rivet_prefork_mpm_la_LIBADD  = @APXS_LIBS@
-rivet_prefork_mpm_la_CPPFLAGS = @apache_include@ -I@rivet_core@ @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_CPPFLAGS@ @APR_INCLUDES@ @APU_INCLUDES@ -I@apache_request@ -I@RIVET_BASE_INCLUDE@
+rivet_prefork_mpm_la_CPPFLAGS = @apache_include@ @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_CPPFLAGS@ @APR_INCLUDES@ @APU_INCLUDES@ -I$(srcdir)/@apache_request@ -I$(srcdir) -I$(srcdir)/@rivet_core@
 
 rivet_lazy_mpm_la_SOURCES = @rivet_core@/rivet_lazy_mpm.c
 rivet_lazy_mpm_la_LDFLAGS = @TCL_STUB_LIB_SPEC@ @APXS_LDFLAGS@ -module -avoid-version
 rivet_lazy_mpm_la_LIBADD  = @APXS_LIBS@
-rivet_lazy_mpm_la_CPPFLAGS = @apache_include@ -I@rivet_core@ @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_CPPFLAGS@ @APR_INCLUDES@ @APU_INCLUDES@ -I@apache_request@ -I@RIVET_BASE_INCLUDE@
+rivet_lazy_mpm_la_CPPFLAGS = @apache_include@ @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_CPPFLAGS@ @APR_INCLUDES@ @APU_INCLUDES@ -I$(srcdir)/@apache_request@ -I$(srcdir) -I$(srcdir)/@rivet_core@
 
 # Removing libtool .la files from installation
 
 install-data-hook:
-	echo 'removing unwanted libtool .la files'
-	rm -f $(DESTDIR)/$(lib_libexecdir)/*.la
-	rm -f $(DESTDIR)/$(apxs_libexecdir)/*.la
-
+	echo 'target install-data-hook: removing unwanted libtool .la files'
+	rm -f $(DESTDIR)$(lib_libexecdir)/*.la
+	rm -f $(DESTDIR)$(apxs_libexecdir)/*.la
+	rm -f $(DESTDIR)$(lib_libmpmdir)/*.la
+
+uninstall:
+	echo 'target uninstall: removing mod_rivet.so module'
+	rm -f $(DESTDIR)$(lib_libmpmdir)/*.so
+	rm -f $(DESTDIR)$(lib_libexecdir)/*.so
+	rm -f $(DESTDIR)$(apxs_libexecdir)/mod_rivet.so
+    

Modified: tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c?rev=1777395&r1=1777394&r2=1777395&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c Thu Jan  5 01:16:33 2017
@@ -294,7 +294,7 @@ TCL_CMD_HEADER( Rivet_Parse )
         script = Tcl_NewObj();
         Tcl_IncrRefCount(script);
 
-        result = Rivet_GetRivetFile(filename,0,script,interp);
+        result = Rivet_GetRivetFile(filename,script,interp);
         if (result != TCL_OK)
         {
             Tcl_AddErrorInfo(interp,apr_pstrcat(private->pool,"Could not read file ",filename,NULL));
@@ -1869,7 +1869,7 @@ TCL_CMD_HEADER( Rivet_UrlScript )
 
         if (Rivet_CheckType(private->r) == RIVET_TEMPLATE)
         {
-            result = Rivet_GetRivetFile(private->r->filename, 0, script, interp);
+            result = Rivet_GetRivetFile(private->r->filename,script,interp);
 
         } else {
 

Modified: tcl/rivet/trunk/src/parser/parserPkgInit.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/parser/parserPkgInit.c?rev=1777395&r1=1777394&r2=1777395&view=diff
==============================================================================
--- tcl/rivet/trunk/src/parser/parserPkgInit.c (original)
+++ tcl/rivet/trunk/src/parser/parserPkgInit.c Thu Jan  5 01:16:33 2017
@@ -55,6 +55,7 @@ Parse_Rivet(
     Tcl_Obj *CONST objv[])
 {
     Tcl_Obj *outbuf;
+    int     tclcode;
 
     outbuf = Tcl_NewObj();
     Tcl_IncrRefCount(outbuf);
@@ -65,10 +66,16 @@ Parse_Rivet(
         return TCL_ERROR;
     }
 
-    if (Rivet_GetRivetFile(Tcl_GetString(objv[1]),
-                           1, outbuf, interp) == TCL_ERROR) {
-        return TCL_ERROR;
-    }
+#if RIVET_CORE == mod_rivet_ng
+    Tcl_AppendToObj(outbuf, "namespace eval request {\n", -1);
+    tclcode = Rivet_GetRivetFile(Tcl_GetString(objv[1]),outbuf,interp);
+    if (tclcode == TCL_ERROR) return TCL_ERROR;
+    Tcl_AppendToObj(outbuf, "\n}\n", -1);
+#else
+    tclcode = Rivet_GetRivetFile(Tcl_GetString(objv[1]),1,outbuf,interp);
+    if (tclcode == TCL_ERROR) return TCL_ERROR;
+#endif
+
     Tcl_SetObjResult(interp, outbuf);
     Tcl_DecrRefCount(outbuf);
     return TCL_OK;

Modified: tcl/rivet/trunk/src/parser/rivetParser.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/parser/rivetParser.c?rev=1777395&r1=1777394&r2=1777395&view=diff
==============================================================================
--- tcl/rivet/trunk/src/parser/rivetParser.c (original)
+++ tcl/rivet/trunk/src/parser/rivetParser.c Thu Jan  5 01:16:33 2017
@@ -25,7 +25,7 @@
 
 /* Rivet config */
 #ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <rivet_config.h>
 #endif
 
 #include <string.h>
@@ -77,6 +77,62 @@ Rivet_GetTclFile(char *filename, Tcl_Obj
     return TCL_OK;
 }
 
+#if RIVET_CORE == mod_rivet_ng
+/*
+ *-----------------------------------------------------------------------------
+ * Rivet_GetRivetFileNG -- 
+ *
+ * The mod_rivet_ng core doesn't assume the parsed script to be 
+ * enclosed in the ::request namespace. The whole ::request lifecycle is
+ * devolved to the Rivet::request_handling procedure
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+int
+Rivet_GetRivetFile(char *filename, Tcl_Obj *outbuf, Tcl_Interp *interp)
+{
+    int sz = 0;
+    Tcl_Obj *inbuf;
+    Tcl_Channel rivetfile;
+
+    /*
+     * we call Tcl to read this file but the caveat exposed in 
+     * in Rivet_GetRivetFile still holds true (TODO)
+     */
+
+    rivetfile = Tcl_OpenFileChannel(interp, filename, "r", 0664);
+    if (rivetfile == NULL) {
+        /* Don't need to adderrorinfo - Tcl_OpenFileChannel takes care
+           of that for us. */
+        return TCL_ERROR;
+    }
+
+    Tcl_AppendToObj(outbuf, "puts -nonewline \"", -1);
+    inbuf = Tcl_NewObj();
+    Tcl_IncrRefCount(inbuf);
+    sz = Tcl_ReadChars(rivetfile, inbuf, -1, 0);
+
+    Tcl_Close(interp, rivetfile);
+    if (sz == -1)
+    {
+        Tcl_AddErrorInfo(interp, Tcl_PosixError(interp));
+        Tcl_DecrRefCount(inbuf);
+        return TCL_ERROR;
+    }
+
+    /* If we are not inside a <? ?> section, add the closing ". */
+    if (Rivet_Parser(outbuf, inbuf) == 0)
+    {
+        Tcl_AppendToObj(outbuf, "\"\n", 2);
+    }
+
+    Tcl_DecrRefCount(inbuf);
+    /* END PARSER  */
+    return TCL_OK;
+}
+
+#else /* traditional rivet file processing with enclosion within the ::request namespace */
 
 /*
  *-----------------------------------------------------------------------------
@@ -150,6 +206,8 @@ Rivet_GetRivetFile(char *filename, int t
     return TCL_OK;
 }
 
+#endif
+
 /*
  *-----------------------------------------------------------------------------
  *

Modified: tcl/rivet/trunk/src/parser/rivetParser.h
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/parser/rivetParser.h?rev=1777395&r1=1777394&r2=1777395&view=diff
==============================================================================
--- tcl/rivet/trunk/src/parser/rivetParser.h (original)
+++ tcl/rivet/trunk/src/parser/rivetParser.h Thu Jan  5 01:16:33 2017
@@ -25,8 +25,12 @@
 #define TCL_STORAGE_CLASS DLLEXPORT
 #endif /* BUILD_rivet */
 
-EXTERN int Rivet_GetRivetFile(char *filename, int toplevel,
-		       Tcl_Obj *outbuf, Tcl_Interp *interp);
+#if RIVET_CORE == mod_rivet_ng
+EXTERN int Rivet_GetRivetFile (char *filename, Tcl_Obj *outbuf, Tcl_Interp *interp);
+#else
+EXTERN int Rivet_GetRivetFile (char *filename, int toplevel, 
+                                Tcl_Obj *outbuf, Tcl_Interp *interp);
+#endif
 
 EXTERN int Rivet_GetTclFile(char *filename, Tcl_Obj *outbuf, Tcl_Interp *interp);
 



---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: site-cvs-help@tcl.apache.org