Commits

rendhalver  committed 0eb1658

automating nmazu re-index

  • Participants
  • Parent commits 8ad68e8

Comments (0)

Files changed (2)

+2002-03-09  Rendhalver (Peter Brown)  <rendhalver@xemacs.org>
+
+	* Makefile (HTML_FILES): added config var's and target for
+	namazu-re-index added it to htdocs target to reindex on site build
+	* Makefile (NAMAZU_CGI): New.
+	* Makefile (MKNMZ): New.
+	* Makefile (NAMAZU_INDEX_DIR): New.
+	* Makefile (XEMACS_WEB_DIR): New.
+	* Makefile (htdocs):
+	* Makefile (validate-time-stamp):
+	* Makefile (namazu-re-index): New.
+	* Makefile (clean):
+
 2002-03-08  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	* index.content: Fix entities that should be <>.  Thx: "Aaron
 # Please add alternative definitions for CONTENT_FILES and HTML_FILES
 # if neither of the above work on your system.
 
+# PB: setup vars for namazu reindex
+# location of namazu.cgi
+# used for testing if this system has namazu installed
+NAMAZU_CGI=~/cgi-bin/namazu.cgi
+# mknmz command
+# used to reindex the site for namazu
+MKNMZ=mknmz
+# location of namazu index files
+NAMAZU_INDEX_DIR=~/var/namazu/index
+# website directory
+XEMACS_WEB_DIR=${PWD}
+
 # APA: Compile any lisp file for performance (a bit simple-minded, maybe).
 %.elc: %.el
 	$(XEMACS) $(FLAGS) -f batch-byte-compile $<
 
 # APA: Default target (first to occur in file):
-htdocs: $(ELCS) htdocs-time-stamp
+htdocs: $(ELCS) htdocs-time-stamp namazu-re-index
 
 validate: htdocs validate-time-stamp
 
 	$(XEMACS) $(FLAGS) -l ./batch-psgml-validate.elc -f batch-psgml-validate $?
 	touch validate-time-stamp
 
+# PB: target for rebuilding the namazu index 
+namazu-re-index: FORCE
+	if test -f ${NAMAZU_CGI}; then \
+		cd ${NAMAZU_INDEX_DIR}; \
+		${MKNMZ} ${XEMACS_WEB_DIR}; \
+	fi;
+
 # APA: Remove all .html files (and backups) generated from .content
 # files.  Need to remove timestamp files as well!
 clean: