Skip to content

Commit

Permalink
ODP-1987 : Use asciidoctor tool to compile docs instead of asciidoc a…
Browse files Browse the repository at this point in the history
…nd 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 <[email protected]>
  • Loading branch information
harshith-212 and manishsinghmowall authored Aug 22, 2024
1 parent a2a8f5a commit 5c0eaf9
Showing 1 changed file with 18 additions and 36 deletions.
54 changes: 18 additions & 36 deletions src/docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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" )

Expand All @@ -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)
Expand Down

0 comments on commit 5c0eaf9

Please sign in to comment.