Skip to content

Commit 5c0eaf9

Browse files
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 <manishsingh@acceldata.io>
1 parent a2a8f5a commit 5c0eaf9

1 file changed

Lines changed: 18 additions & 36 deletions

File tree

src/docs/Makefile

Lines changed: 18 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ BUILD_DIR=$(BUILDROOT)/docs
2222

2323
VERSION=Unknown
2424

25-
# Building documentation under CentOS causes xmlto to have issues
26-
# with validation. Disable this step.
2725
VALIDATION=$(shell ( lsb_release -d | grep CentOS > /dev/null 2>&1 ) \
2826
&& echo "--skip-validation" )
2927

@@ -40,63 +38,47 @@ MANPAGES=$(MANSOURCES:.txt=.1.gz)
4038

4139
REVDATE=$(shell date)
4240

43-
44-
website:
41+
website:
4542
mkdir -p $(WEBSITE_DIR)
46-
asciidoc --unsafe -a revnumber=$(VERSION) \
47-
-b docbook \
43+
asciidoctor -b html5 -a revnumber=$(VERSION) \
44+
-o $(WEBSITE_DIR)/SqoopUserGuide.html \
4845
user/SqoopUserGuide.txt
49-
xmlto $(VALIDATION) -o $(WEBSITE_DIR) -m web/html.xsl \
50-
html-nochunks user/SqoopUserGuide.xml
51-
asciidoc --unsafe -a revnumber=$(VERSION) \
52-
-b docbook \
46+
asciidoctor -b html5 -a revnumber=$(VERSION) \
47+
-o $(WEBSITE_DIR)/SqoopDevGuide.html \
5348
dev/SqoopDevGuide.txt
54-
xmlto $(VALIDATION) -o $(WEBSITE_DIR) -m web/html.xsl \
55-
html-nochunks dev/SqoopDevGuide.xml
56-
asciidoc --unsafe -a revnumber=$(VERSION) \
57-
-b docbook \
49+
asciidoctor -b html5 -a revnumber=$(VERSION) \
50+
-o $(WEBSITE_DIR)/index.html \
5851
web/index.txt
59-
xmlto $(VALIDATION) -o $(WEBSITE_DIR) -m web/html.xsl \
60-
html-nochunks web/index.xml
6152
cp web/docbook.css $(WEBSITE_DIR)
6253
rsync -a web/images $(WEBSITE_DIR)/
6354

6455
man: $(MANPAGES)
6556

6657
%.1.gz : %.txt
67-
asciidoc --unsafe -b docbook -d manpage -a "author=Sqoop Team" $<
68-
xmlto man $(VALIDATION) $*.xml -o man
69-
gzip $*.1
70-
rm $*.xml
58+
mkdir -p man
59+
asciidoctor --backend=manpage -a author="Sqoop Team" \
60+
-o man/$*.1 $<
61+
gzip man/$*.1
7162
mkdir -p $(BUILD_DIR)
72-
mv $@ $(BUILD_DIR)
63+
mv man/$*.1.gz $(BUILD_DIR)
7364

7465
$(BUILD_DIR)/SqoopUserGuide.html: user/*.txt
7566
mkdir -p $(BUILD_DIR)
76-
asciidoc --unsafe -a revnumber=$(VERSION) \
77-
-b docbook \
67+
asciidoctor -b html5 -a revnumber=$(VERSION) \
68+
-o $(BUILD_DIR)/SqoopUserGuide.html \
7869
user/SqoopUserGuide.txt
79-
xmlto $(VALIDATION) -o $(BUILD_DIR) -m web/html.xsl \
80-
html-nochunks user/SqoopUserGuide.xml
81-
rm user/SqoopUserGuide.xml
8270

8371
$(BUILD_DIR)/SqoopDevGuide.html: dev/*.txt
8472
mkdir -p $(BUILD_DIR)
85-
asciidoc --unsafe -a revnumber=$(VERSION) \
86-
-b docbook \
73+
asciidoctor -b html5 -a revnumber=$(VERSION) \
74+
-o $(BUILD_DIR)/SqoopDevGuide.html \
8775
dev/SqoopDevGuide.txt
88-
xmlto $(VALIDATION) -o $(BUILD_DIR) -m web/html.xsl \
89-
html-nochunks dev/SqoopDevGuide.xml
90-
rm dev/SqoopDevGuide.xml
9176

9277
$(BUILD_DIR)/index.html: web/index.txt
9378
mkdir -p $(BUILD_DIR)
94-
asciidoc --unsafe -a revnumber=$(VERSION) \
95-
-b docbook \
79+
asciidoctor -b html5 -a revnumber=$(VERSION) \
80+
-o $(BUILD_DIR)/index.html \
9681
web/index.txt
97-
xmlto $(VALIDATION) -o $(BUILD_DIR) -m web/html.xsl \
98-
html-nochunks web/index.xml
99-
rm web/index.xml
10082

10183
supportfiles:
10284
mkdir -p $(BUILD_DIR)

0 commit comments

Comments
 (0)