diff GNUmakefile @ 2034:7e7edf832099

Added the generated ngx_http_api_module and separate target for it. This avoids unnecessary build steps and dependencies. The separate 'genapi' target is added to regenerate the ngx_http_api_module from yaml source. The generated file is not removed during 'clean' step.
author Vladimir Homutov <vl@nginx.com>
date Fri, 08 Sep 2017 13:58:41 +0300
parents 5c55b7054b58
children ace0ddbb2513
line wrap: on
line diff
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -169,13 +169,15 @@ xslt/%.xslt:	xsls/%.xsls
 	$(call XSLScript, $<, $@)
 
 
-xml/en/docs/http/ngx_http_api_module.xml:                                     \
-		yaml/nginx_api.yaml                                           \
-		yaml/yaml2xml.py                                              \
+API_OUT=xml/en/docs/http/ngx_http_api_module.xml
+
+genapi:					\
+		yaml/nginx_api.yaml	\
+		yaml/yaml2xml.py	\
 		xml/en/docs/http/ngx_http_api_module_head.xml
-	@cat xml/en/docs/http/ngx_http_api_module_head.xml > $@
-	@yaml/yaml2xml.py yaml/nginx_api.yaml >> $@
-	@echo "</module>" >> $@
+	@cat xml/en/docs/http/ngx_http_api_module_head.xml > $(API_OUT)
+	@yaml/yaml2xml.py yaml/nginx_api.yaml >> $(API_OUT)
+	@echo "</module>" >> $(API_OUT)
 
 
 images:									\
@@ -348,7 +350,6 @@ endif
 
 clean:
 	rm -rf $(ZIP) $(OUT) xml/*/docs/dirindex.xml dir.map 		\
-	xml/*/docs/varindex.xml \
-	xml/en/docs/http/ngx_http_api_module.xml
+	xml/*/docs/varindex.xml
 
 .DELETE_ON_ERROR: