--- a/docs/makefile
+++ b/docs/makefile
@@ -19,7 +19,7 @@
 #                                                                          #
 ############################################################################
 
-.SILENT:
+.SUFFIXES=
 
 BUILD_DOC_SCRIPT = true
 #  When true the main documentation texinfo file will be generated from the
@@ -36,92 +36,21 @@
 		subtype generic limited access all tagged abstract renames \
 		pragma new case when null
 
-APIFILES = ../src/aws.ads.texi \
-	../src/aws-attachments.ads.texi \
-	../src/aws-client.ads.texi \
-	../src/aws-client-hotplug.ads.texi \
-	../src/aws-communication-client.ads.texi \
-	../src/aws-communication-server.ads.texi \
-	../src/aws-communication.ads.texi \
-	../src/aws-config-ini.ads.texi \
-	../src/aws-config-set.ads.texi \
-	../src/aws-config.ads.texi \
-	../src/aws-containers-tables.ads.texi \
-	../src/aws-default.ads.texi \
-	../src/aws-dispatchers-callback.ads.texi \
-	../src/aws-dispatchers.ads.texi \
-	../src/aws-exceptions.ads.texi \
-	../src/aws-headers.ads.texi \
-	../src/aws-headers-values.ads.texi \
-	../src/aws-ldap-client.ads.texi \
-	../src/aws-log.ads.texi \
-	../src/aws-messages.ads.texi \
-	../src/aws-mime.ads.texi \
-	../src/aws-net.ads.texi \
-	../src/aws-net-buffered.ads.texi \
-	../src/aws-net-log.ads.texi \
-	../src/aws-net-log-callbacks.ads.texi \
-	../src/aws-net-ssl.ads.texi \
-	../src/aws-net-ssl-certificate.ads.texi \
-	../src/aws-parameters.ads.texi \
-	../src/aws-pop.ads.texi \
-	../src/aws-resources-files.ads.texi \
-	../src/aws-resources-embedded.ads.texi \
-	../src/aws-resources-streams.ads.texi \
-	../src/aws-resources-streams-disk.ads.texi \
-	../src/aws-resources-streams-disk-once.ads.texi \
-	../src/aws-resources-streams-memory.ads.texi \
-	../src/aws-resources-streams-memory-zlib.ads.texi \
-	../src/aws-resources-streams-pipe.ads.texi \
-	../src/aws-resources.ads.texi \
-	../src/aws-response.ads.texi \
-	../src/aws-server-hotplug.ads.texi \
-	../src/aws-server-push.ads.texi \
-	../src/aws-server-status.ads.texi \
-	../src/aws-server-log.ads.texi \
-	../src/aws-server.ads.texi \
-	../src/aws-services-callbacks.ads.texi \
-	../src/aws-services-directory.ads.texi \
-	../src/aws-services-dispatchers-linker.ads.texi \
-	../src/aws-services-dispatchers-method.ads.texi \
-	../src/aws-services-dispatchers-uri.ads.texi \
-	../src/aws-services-dispatchers-virtual_host.ads.texi \
-	../src/aws-services-dispatchers.ads.texi \
-	../src/aws-services-download.ads.texi \
-	../src/aws-services-page_server.ads.texi \
-	../src/aws-services-split_pages.ads.texi \
-	../src/aws-services-split_pages-uniform.ads.texi \
-	../src/aws-services-split_pages-uniform-alpha.ads.texi \
-	../src/aws-services-split_pages-uniform-overlapping.ads.texi \
-	../src/aws-services-split_pages-alpha.ads.texi \
-	../src/aws-services-split_pages-alpha-bounded.ads.texi \
-	../src/aws-services-transient_pages.ads.texi \
-	../src/aws-services-web_block.ads.texi \
-	../src/aws-services-web_block-context.ads.texi \
-	../src/aws-services-web_block-registry.ads.texi \
-	../src/aws-session.ads.texi \
-	../src/aws-smtp-client.ads.texi \
-	../src/aws-smtp.ads.texi \
-	../src/aws-status.ads.texi \
-	../src/aws-templates.ads.texi \
-	../src/aws-translator.ads.texi \
-	../src/aws-url.ads.texi \
-	../xsrc/aws-jabber.ads.texi \
-	../soap/soap.ads.texi \
-	../soap/soap-client.ads.texi \
-	../soap/soap-dispatchers.ads.texi \
-	../soap/soap-dispatchers-callback.ads.texi \
-	../soap/soap-message-xml.ads.texi \
-	../soap/soap-message.ads.texi \
-	../soap/soap-parameters.ads.texi \
-	../soap/soap-types.ads.texi
-
-build_doc: $(APIFILES) aws_docs sg_docs
-	echo ""
-	echo AWS Documentation built with success.
-	${MAKE} -C ../templates_parser doc
+DIRS := ../src ../wsrc ../soap ../ssl ../xsrc
+vpath %.ads $(DIRS) ../include
 
-aws_docs: aws.texi aws.pdf aws.ps aws.html aws.txt aws.info
+APIREFS := $(foreach dir,$(DIRS),$(wildcard $(dir)/*.ads)) \
+     $(wildcard ../include/strings_cutter.ads) \
+     $(wildcard ../include/zlib*.ads) \
+     $(wildcard ../include/memory_streams.ads)
+
+APIFILES := $(foreach f,$(APIREFS),$(notdir $(f)).texi)
+
+build_doc: aws_docs sg_docs
+	@echo ""
+	@echo AWS Documentation built with success.
+
+aws_docs: aws.pdf aws.ps aws.html aws.txt aws.info
 
 sg_docs: style-guide.pdf style-guide.ps style-guide.html style-guide.txt \
 	style-guide.info
@@ -148,13 +77,12 @@
 %.ads.texi: %.ads ada.sed gentexifile
 	./gentexifile $< NOGROUP
 
-%.adb.texi: %.adb ada.sed gentexifile
-	./gentexifile $< NOGROUP
-
 %.dvi: %.texi
 ifneq (${TEXI2DVI},)
-	echo Building $@
-	-${TEXI2DVI} --expand --clean --quiet $<
+	@echo Building $@
+	-tmpdir=$$(mktemp -d); \
+	${TEXI2DVI} --expand --build-dir=$$tmpdir --quiet $< ; \
+	rm -r $$tmpdir
 else
 	@echo "--------------------------------------------------------"
 	@echo "texi2dvi not found, cannot build DVI or PS documentation"
@@ -163,7 +91,7 @@
 
 %.ps: %.dvi
 ifneq (${DVIPS},)
-	echo Building $@
+	@echo Building $@
 	-${DVIPS} -q $< -o $@
 else
 	@echo "------------------------------------------------------"
@@ -174,8 +102,10 @@
 %.pdf: %.texi
 ifneq (${TEXI2DVI},)
 ifneq (${PDFTEX},)
-	echo Building $@
-	${TEXI2DVI} -p --expand --clean --quiet $<
+	@echo Building $@
+	-tmpdir=$$(mktemp -d); \
+	${TEXI2DVI} -p --expand --build-dir=$$tmpdir --quiet $< ; \
+	rm -r $$tmpdir
 else
 	@echo "------------------------------------------------"
 	@echo "pdftex not found, cannot build PDF documentation"
@@ -189,8 +119,8 @@
 
 %.info: %.texi
 ifneq (${MAKEINFO},)
-	echo Building $@
-	-${MAKEINFO} $<
+	@echo Building $@
+	-${MAKEINFO} --no-split $<
 else
 	@echo "---------------------------------------------------"
 	@echo "makeinfo not found, cannot build INFO documentation"
@@ -199,7 +129,7 @@
 
 %.html: %.texi
 ifneq (${MAKEINFO},)
-	echo Building $@
+	@echo Building $@
 	-${MAKEINFO} --html --no-split --css-include=aws.css --ifinfo $<
 else
 	@echo "---------------------------------------------------"
@@ -209,7 +139,7 @@
 
 %.txt: %.texi
 ifneq (${MAKEINFO},)
-	echo Building $@
+	@echo Building $@
 	-${MAKEINFO} --plaintext --no-headers $< --output $@
 else
 	@echo "---------------------------------------------------"
@@ -225,11 +155,11 @@
 
 ifeq (${BUILD_DOC_SCRIPT},false)
 gen_texi: prog aws.texi.tmplt
-	echo build from ada
+	@echo build from ada
 	../$(BDIR)/../common/bin/build | tr -d '\r' > aws.texi
 else
 gen_texi: aws.texi.tmplt
-	echo build from script
+	@echo build from script
 	sed -f ./gen_doc.sed < aws.texi.tmplt > aws.texi
 endif
 
@@ -247,9 +177,11 @@
 	-$(CP) aws.txt $(I_DOC)
 	-$(CP) *.info* $(I_DOC)
 
+aws.info aws.pdf aws.dvi aws.txt aws.html: $(APIFILES)
+
 clean:
 	-$(GNAT) clean -XLIBRARY_TYPE=static -Pdocs
-	-$(RM) -f aws.texi aws.dvi aws.html aws.info* aws.log aws.ps aws.txt
-	-$(RM) -f $(APIFILES) *~ genout
+	-$(RM) -f aws.texi aws.dvi aws.html aws.info* aws.log aws.ps aws.txt aws.pdf
+	-$(RM) -f *.ads.texi *~ *.o *.ali genout .ads.texi ada.sed
 	-$(RM) -f style-guide.dvi style-guide.html style-guide.info* \
-		style-guide.log style-guide.ps style-guide.txt
+		style-guide.log style-guide.ps style-guide.pdf style-guide.txt
--- a/docs/aws.texi.tmplt
+++ b/docs/aws.texi.tmplt
@@ -10,6 +10,11 @@
 @afourpaper
 @end iftex
 
+@dircategory GNU Ada tools
+@direntry
+* AWS: (aws).    The Ada Web Server.
+@end direntry
+
 @c ----------------------------------------- MACRO
 
 @c Macro used for all AWS examples
--- a/docs/style-guide.texi
+++ b/docs/style-guide.texi
@@ -18,6 +18,11 @@
 @setchapternewpage off
 @c %**end of header
 
+@dircategory GNU Ada tools
+@direntry
+* AWS Style Guide: (style-guide).    AWS Coding Style.
+@end direntry
+
 @ifinfo
      @center AWS Coding Style
 
