From 5c0eaf926da57fc2249750d3616c8944b23597b6 Mon Sep 17 00:00:00 2001 From: harshith gandhe <118890977+harshith-212@users.noreply.github.com> Date: Thu, 22 Aug 2024 23:32:43 +0530 Subject: [PATCH] ODP-1987 : Use asciidoctor tool to compile docs instead of asciidoc and xmlto (#6) * ODP-main migration for JDK-11 * ODP-1987 : Migrate from asciidoc to asciidoctor for docs compilation * ODP-1987 : Set ODP version to 3.3.6.0-1 * ODP-1987 : Fixed spacing * ODP-1987 : Fixed Compile failure * ODP-1987 : Fixed Makefile --------- Co-authored-by: manishsinghmowall --- src/docs/Makefile | 54 ++++++++++++++++------------------------------- 1 file changed, 18 insertions(+), 36 deletions(-) diff --git a/src/docs/Makefile b/src/docs/Makefile index 224c0234e..c82372fab 100644 --- a/src/docs/Makefile +++ b/src/docs/Makefile @@ -22,8 +22,6 @@ BUILD_DIR=$(BUILDROOT)/docs VERSION=Unknown -# Building documentation under CentOS causes xmlto to have issues -# with validation. Disable this step. VALIDATION=$(shell ( lsb_release -d | grep CentOS > /dev/null 2>&1 ) \ && echo "--skip-validation" ) @@ -40,63 +38,47 @@ MANPAGES=$(MANSOURCES:.txt=.1.gz) REVDATE=$(shell date) - -website: +website: mkdir -p $(WEBSITE_DIR) - asciidoc --unsafe -a revnumber=$(VERSION) \ - -b docbook \ + asciidoctor -b html5 -a revnumber=$(VERSION) \ + -o $(WEBSITE_DIR)/SqoopUserGuide.html \ user/SqoopUserGuide.txt - xmlto $(VALIDATION) -o $(WEBSITE_DIR) -m web/html.xsl \ - html-nochunks user/SqoopUserGuide.xml - asciidoc --unsafe -a revnumber=$(VERSION) \ - -b docbook \ + asciidoctor -b html5 -a revnumber=$(VERSION) \ + -o $(WEBSITE_DIR)/SqoopDevGuide.html \ dev/SqoopDevGuide.txt - xmlto $(VALIDATION) -o $(WEBSITE_DIR) -m web/html.xsl \ - html-nochunks dev/SqoopDevGuide.xml - asciidoc --unsafe -a revnumber=$(VERSION) \ - -b docbook \ + asciidoctor -b html5 -a revnumber=$(VERSION) \ + -o $(WEBSITE_DIR)/index.html \ web/index.txt - xmlto $(VALIDATION) -o $(WEBSITE_DIR) -m web/html.xsl \ - html-nochunks web/index.xml cp web/docbook.css $(WEBSITE_DIR) rsync -a web/images $(WEBSITE_DIR)/ man: $(MANPAGES) %.1.gz : %.txt - asciidoc --unsafe -b docbook -d manpage -a "author=Sqoop Team" $< - xmlto man $(VALIDATION) $*.xml -o man - gzip $*.1 - rm $*.xml + mkdir -p man + asciidoctor --backend=manpage -a author="Sqoop Team" \ + -o man/$*.1 $< + gzip man/$*.1 mkdir -p $(BUILD_DIR) - mv $@ $(BUILD_DIR) + mv man/$*.1.gz $(BUILD_DIR) $(BUILD_DIR)/SqoopUserGuide.html: user/*.txt mkdir -p $(BUILD_DIR) - asciidoc --unsafe -a revnumber=$(VERSION) \ - -b docbook \ + asciidoctor -b html5 -a revnumber=$(VERSION) \ + -o $(BUILD_DIR)/SqoopUserGuide.html \ user/SqoopUserGuide.txt - xmlto $(VALIDATION) -o $(BUILD_DIR) -m web/html.xsl \ - html-nochunks user/SqoopUserGuide.xml - rm user/SqoopUserGuide.xml $(BUILD_DIR)/SqoopDevGuide.html: dev/*.txt mkdir -p $(BUILD_DIR) - asciidoc --unsafe -a revnumber=$(VERSION) \ - -b docbook \ + asciidoctor -b html5 -a revnumber=$(VERSION) \ + -o $(BUILD_DIR)/SqoopDevGuide.html \ dev/SqoopDevGuide.txt - xmlto $(VALIDATION) -o $(BUILD_DIR) -m web/html.xsl \ - html-nochunks dev/SqoopDevGuide.xml - rm dev/SqoopDevGuide.xml $(BUILD_DIR)/index.html: web/index.txt mkdir -p $(BUILD_DIR) - asciidoc --unsafe -a revnumber=$(VERSION) \ - -b docbook \ + asciidoctor -b html5 -a revnumber=$(VERSION) \ + -o $(BUILD_DIR)/index.html \ web/index.txt - xmlto $(VALIDATION) -o $(BUILD_DIR) -m web/html.xsl \ - html-nochunks web/index.xml - rm web/index.xml supportfiles: mkdir -p $(BUILD_DIR)