Anonymous avatar Anonymous committed e9c8d24

validate only files younger than timestamp, make it part of default target

Comments (0)

Files changed (1)

 GENPAGE_CONF="genpage.conf"
 WEBDIR="."
 ELCS=batch-psgml-validate.elc
+HTML_FILES=$(shell find . -name "*.html" -print)
 
 # APA: Compile any lisp file for performance (a bit simple-minded, maybe).
 %.elc: %.el
 	$(XEMACS) $(FLAGS) -f batch-byte-compile $<
 
+# APA: Now that we validate only files younger than
+# validate-time-stamp we can afford to make this the default target.
+all: htdocs validate
+
 # APA: Default target (first to occur in file):
 htdocs: index.content $(ELCS)
-	perl ./genpage/bin/genpage -d -p $(GENPAGE_CONF) -o $(WEBDIR)
+	perl ./genpage/bin/genpage -p $(GENPAGE_CONF) -o $(WEBDIR)
 
 # See batch-psgml-validate.el for details, in particular ...
 # (defun batch-psgml-validate (&optional file-or-dir)
 # (defun batch-psgml-validate-file (file &optional insert-result indent)
 # (defun batch-psgml-validate-buffer (&optional insert-result indent)
-validate:
-	$(XEMACS) $(FLAGS) -l ./batch-psgml-validate.elc -f batch-psgml-validate $(WEBDIR)
+validate: validate-time-stamp
 
-all: htdocs validate
+# APA: Validate only files younger than time-stamp file created by
+# previous validation
+validate-time-stamp: $(HTML_FILES)
+	$(XEMACS) $(FLAGS) -l ./batch-psgml-validate.elc -f batch-psgml-validate $?
+	touch validate-time-stamp
 
 # APA: We MUST NOT do this because output files are not kept separate:
 # clean:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.