| 1 |
if ENABLE_DOC |
| 2 |
|
| 3 |
GUIDE_MAIN_ADOC_FILE = doc/modules/guide/bundling/cockpit-guide.adoc |
| 4 |
|
| 5 |
GUIDE_ADOC_FILES = \ |
| 6 |
doc/modules/guide/pages/api-base1.adoc \ |
| 7 |
doc/modules/guide/pages/api-cockpit.adoc \ |
| 8 |
doc/modules/guide/pages/api-logs-html.adoc \ |
| 9 |
doc/modules/guide/pages/api-shell-html.adoc \ |
| 10 |
doc/modules/guide/pages/api-shell.adoc \ |
| 11 |
doc/modules/guide/pages/api-system.adoc \ |
| 12 |
doc/modules/guide/pages/api-terminal-html.adoc \ |
| 13 |
doc/modules/guide/pages/authentication.adoc \ |
| 14 |
doc/modules/guide/pages/cert-authentication.adoc \ |
| 15 |
doc/modules/guide/pages/cockpit-cache.adoc \ |
| 16 |
doc/modules/guide/pages/cockpit-channels.adoc \ |
| 17 |
doc/modules/guide/pages/cockpit-dbus.adoc \ |
| 18 |
doc/modules/guide/pages/cockpit-error.adoc \ |
| 19 |
doc/modules/guide/pages/cockpit-file.adoc \ |
| 20 |
doc/modules/guide/pages/cockpit-http.adoc \ |
| 21 |
doc/modules/guide/pages/cockpit-locale.adoc \ |
| 22 |
doc/modules/guide/pages/cockpit-location.adoc \ |
| 23 |
doc/modules/guide/pages/cockpit-login.adoc \ |
| 24 |
doc/modules/guide/pages/cockpit-manifest.adoc \ |
| 25 |
doc/modules/guide/pages/cockpit-manual.adoc \ |
| 26 |
doc/modules/guide/pages/cockpit-metrics.adoc \ |
| 27 |
doc/modules/guide/pages/cockpit-series-data.adoc \ |
| 28 |
doc/modules/guide/pages/cockpit-spawn.adoc \ |
| 29 |
doc/modules/guide/pages/cockpit-util.adoc \ |
| 30 |
doc/modules/guide/pages/development.adoc \ |
| 31 |
doc/modules/guide/pages/embedding.adoc \ |
| 32 |
doc/modules/guide/pages/feature-firewall.adoc \ |
| 33 |
doc/modules/guide/pages/feature-journal.adoc \ |
| 34 |
doc/modules/guide/pages/feature-machines.adoc \ |
| 35 |
doc/modules/guide/pages/feature-networkmanager.adoc \ |
| 36 |
doc/modules/guide/pages/feature-packagekit.adoc \ |
| 37 |
doc/modules/guide/pages/feature-pcp.adoc \ |
| 38 |
doc/modules/guide/pages/feature-realmd.adoc \ |
| 39 |
doc/modules/guide/pages/feature-selinux.adoc \ |
| 40 |
doc/modules/guide/pages/feature-sosreport.adoc \ |
| 41 |
doc/modules/guide/pages/feature-storaged.adoc \ |
| 42 |
doc/modules/guide/pages/feature-systemd.adoc \ |
| 43 |
doc/modules/guide/pages/feature-terminal.adoc \ |
| 44 |
doc/modules/guide/pages/feature-tuned.adoc \ |
| 45 |
doc/modules/guide/pages/feature-users.adoc \ |
| 46 |
doc/modules/guide/pages/features.adoc \ |
| 47 |
doc/modules/guide/pages/https.adoc \ |
| 48 |
doc/modules/guide/pages/index.adoc \ |
| 49 |
doc/modules/guide/pages/listen.adoc \ |
| 50 |
doc/modules/guide/pages/multi-host.adoc \ |
| 51 |
doc/modules/guide/pages/packages.adoc \ |
| 52 |
doc/modules/guide/pages/privileges.adoc \ |
| 53 |
doc/modules/guide/pages/sso.adoc \ |
| 54 |
doc/modules/guide/pages/startup.adoc \ |
| 55 |
doc/modules/guide/pages/urls.adoc \ |
| 56 |
$(NULL) |
| 57 |
|
| 58 |
MAN_ADOC_FILES = \ |
| 59 |
doc/modules/man/pages/cockpit.1.adoc \ |
| 60 |
doc/modules/man/pages/cockpit-bridge.1.adoc \ |
| 61 |
doc/modules/man/pages/cockpit-desktop.1.adoc \ |
| 62 |
doc/modules/man/pages/cockpit-ws.8.adoc \ |
| 63 |
doc/modules/man/pages/cockpit-tls.8.adoc \ |
| 64 |
doc/modules/man/pages/cockpit.conf.5.adoc \ |
| 65 |
doc/modules/man/pages/pam_ssh_add.8.adoc \ |
| 66 |
$(NULL) |
| 67 |
|
| 68 |
ASCIIDOC_EXTENSIONS = \ |
| 69 |
doc/extensions/man-inline-macro.rb \ |
| 70 |
$(NULL) |
| 71 |
|
| 72 |
dist_noinst_DATA += \ |
| 73 |
$(GUIDE_MAIN_ADOC_FILE) \ |
| 74 |
$(MAN_ADOC_FILES) \ |
| 75 |
$(GUIDE_ADOC_FILES) \ |
| 76 |
$(ASCIIDOC_EXTENSIONS) \ |
| 77 |
$(NULL) |
| 78 |
|
| 79 |
GUIDE_MAN_PAGES = \ |
| 80 |
doc/output/html/cockpit-bridge.1.html \ |
| 81 |
doc/output/html/cockpit-desktop.1.html \ |
| 82 |
doc/output/html/cockpit-ws.8.html \ |
| 83 |
doc/output/html/cockpit-tls.8.html \ |
| 84 |
doc/output/html/cockpit.1.html \ |
| 85 |
doc/output/html/cockpit.conf.5.html \ |
| 86 |
doc/output/html/pam_ssh_add.8.html \ |
| 87 |
$(NULL) |
| 88 |
|
| 89 |
GUIDE_PAGES = \ |
| 90 |
doc/output/html/api-base1.html \ |
| 91 |
doc/output/html/api-cockpit.html \ |
| 92 |
doc/output/html/api-logs-html.html \ |
| 93 |
doc/output/html/api-shell-html.html \ |
| 94 |
doc/output/html/api-shell.html \ |
| 95 |
doc/output/html/api-system.html \ |
| 96 |
doc/output/html/api-terminal-html.html \ |
| 97 |
doc/output/html/authentication.html \ |
| 98 |
doc/output/html/cert-authentication.html \ |
| 99 |
doc/output/html/cockpit-cache.html \ |
| 100 |
doc/output/html/cockpit-channels.html \ |
| 101 |
doc/output/html/cockpit-dbus.html \ |
| 102 |
doc/output/html/cockpit-error.html \ |
| 103 |
doc/output/html/cockpit-file.html \ |
| 104 |
doc/output/html/cockpit-http.html \ |
| 105 |
doc/output/html/cockpit-locale.html \ |
| 106 |
doc/output/html/cockpit-location.html \ |
| 107 |
doc/output/html/cockpit-login.html \ |
| 108 |
doc/output/html/cockpit-manifest.html \ |
| 109 |
doc/output/html/cockpit-manual.html \ |
| 110 |
doc/output/html/cockpit-metrics.html \ |
| 111 |
doc/output/html/cockpit-series-data.html \ |
| 112 |
doc/output/html/cockpit-spawn.html \ |
| 113 |
doc/output/html/cockpit-util.html \ |
| 114 |
doc/output/html/embedding.html \ |
| 115 |
doc/output/html/feature-firewall.html \ |
| 116 |
doc/output/html/feature-journal.html \ |
| 117 |
doc/output/html/feature-machines.html \ |
| 118 |
doc/output/html/feature-networkmanager.html \ |
| 119 |
doc/output/html/feature-packagekit.html \ |
| 120 |
doc/output/html/feature-pcp.html \ |
| 121 |
doc/output/html/feature-realmd.html \ |
| 122 |
doc/output/html/feature-selinux.html \ |
| 123 |
doc/output/html/feature-sosreport.html \ |
| 124 |
doc/output/html/feature-storaged.html \ |
| 125 |
doc/output/html/feature-systemd.html \ |
| 126 |
doc/output/html/feature-terminal.html \ |
| 127 |
doc/output/html/feature-tuned.html \ |
| 128 |
doc/output/html/feature-users.html \ |
| 129 |
doc/output/html/features.html \ |
| 130 |
doc/output/html/https.html \ |
| 131 |
doc/output/html/listen.html \ |
| 132 |
doc/output/html/multi-host.html \ |
| 133 |
doc/output/html/packages.html \ |
| 134 |
doc/output/html/privileges.html \ |
| 135 |
doc/output/html/sso.html \ |
| 136 |
doc/output/html/startup.html \ |
| 137 |
doc/output/html/urls.html \ |
| 138 |
doc/output/html/development.html \ |
| 139 |
$(NULL) |
| 140 |
|
| 141 |
GUIDE_PAGES_INST = \ |
| 142 |
$(GUIDE_MAN_PAGES) \ |
| 143 |
$(GUIDE_PAGES) \ |
| 144 |
doc/output/html/index.html \ |
| 145 |
$(NULL) |
| 146 |
|
| 147 |
noinst_DATA += $(GUIDE_PAGES_INST) |
| 148 |
|
| 149 |
# Some distros don't have asciidoctor and we need to prebundle the docs, e.g. RHEL & CentOS |
| 150 |
EXTRA_DIST += $(GUIDE_PAGES_INST) |
| 151 |
|
| 152 |
GUIDE_ASCIIDOC_ARGS = \ |
| 153 |
-a cockpit-version=$(VERSION) \ |
| 154 |
-a toc=left \ |
| 155 |
-a toclevels=3 \ |
| 156 |
-a webfonts! \ |
| 157 |
-b html5 \ |
| 158 |
$(patsubst %,-r $(srcdir)/%,${ASCIIDOC_EXTENSIONS}) \ |
| 159 |
$(NULL) |
| 160 |
|
| 161 |
DOC_PROC = mkdir -p doc/output/html/ && $(ASCIIDOCTOR) $(GUIDE_ASCIIDOC_ARGS) -a asciidoctor -o $@ $< |
| 162 |
render-docs: $(ASCIIDOC_EXTENSIONS) $(GUIDE_ADOC_FILES) $(GUIDE_MAIN_ADOC_FILE) $(MAN_ADOC_FILES) |
| 163 |
mkdir -p doc/output/html/ |
| 164 |
$(ASCIIDOCTOR) $(GUIDE_ASCIIDOC_ARGS) -a asciidoctor -D doc/output/html $(GUIDE_ADOC_FILES) $(MAN_ADOC_FILES) |
| 165 |
$(ASCIIDOCTOR) $(GUIDE_ASCIIDOC_ARGS) -a asciidoctor -o doc/output/html/index.html $(GUIDE_MAIN_ADOC_FILE) |
| 166 |
|
| 167 |
doc/output/html/%.8.html: doc/modules/man/pages/%.8.adoc |
| 168 |
$(AM_V_GEN) $(DOC_PROC) |
| 169 |
|
| 170 |
doc/output/html/%.1.html: doc/modules/man/pages/%.1.adoc |
| 171 |
$(AM_V_GEN) $(DOC_PROC) |
| 172 |
|
| 173 |
doc/output/html/%.5.html: doc/modules/man/pages/%.5.adoc |
| 174 |
$(AM_V_GEN) $(DOC_PROC) |
| 175 |
|
| 176 |
# HACK: $(DIST_STAMP) is required here in this order for docs to work. Automake rules needs refactoring. |
| 177 |
doc/output/html/index.html: $(GUIDE_MAIN_ADOC_FILE) $(DIST_STAMP) |
| 178 |
$(AM_V_GEN) $(DOC_PROC) |
| 179 |
|
| 180 |
doc/output/html/%.html: doc/modules/guide/pages/%.adoc |
| 181 |
$(AM_V_GEN) $(DOC_PROC) |
| 182 |
|
| 183 |
CLEAN_LOCAL_TARGETS += clean-guide |
| 184 |
clean-guide: |
| 185 |
rm -rf doc/output/html |
| 186 |
|
| 187 |
INSTALL_DATA_LOCAL_TARGETS += install-guide |
| 188 |
install-guide: |
| 189 |
mkdir -p $(DESTDIR)$(htmldir) |
| 190 |
$(INSTALL_DATA) doc/output/html/* $(DESTDIR)$(htmldir) |
| 191 |
|
| 192 |
UNINSTALL_LOCAL_TARGETS += uninstall-guide |
| 193 |
uninstall-guide: |
| 194 |
rm -rf $(DESTDIR)$(htmldir) |
| 195 |
|
| 196 |
endif ENABLE_DOC |