Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: Initial pandoc conversion #1586

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/quick.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ jobs:
steps:
- name: Install prerequisite packages
run: |
# required for "apt-get build-dep" to work
sudo sed --in-place -E 's/# (deb-src.*updates main)/ \1/g' /etc/apt/sources.list
sudo apt-get --quiet=2 update
sudo apt-get --quiet=2 install libtool-bin
sudo apt-get --quiet=2 build-dep squid
sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin pandoc

- name: Setup a nodejs environment
uses: actions/setup-node@v4
Expand Down Expand Up @@ -127,7 +130,7 @@ jobs:
sudo sed --in-place -E 's/# (deb-src.*updates main)/ \1/g' /etc/apt/sources.list
sudo apt-get --quiet=2 update
sudo apt-get --quiet=2 build-dep squid
sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin ${{ matrix.compiler.CC }} ccache
sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin pandoc ${{ matrix.compiler.CC }} ccache

- name: Checkout sources
uses: actions/checkout@v4
Expand Down Expand Up @@ -163,7 +166,7 @@ jobs:
sudo sed --in-place -E 's/# (deb-src.*updates main)/ \1/g' /etc/apt/sources.list
sudo apt-get --quiet=2 update
sudo apt-get --quiet=2 build-dep squid
sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin
sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin pandoc

- name: Checkout repository
uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ AC_PATH_PROG(AR, ar, $FALSE)
AR_R="$AR r"
AC_SUBST(AR_R)

AC_PATH_PROG(PANDOC, pandoc, $FALSE)
AM_CONDITIONAL(ENABLE_PANDOC_DOC, test "x${ac_cv_path_PANDOC}" != "x$FALSE")

AC_PATH_PROG(LINUXDOC, linuxdoc, $FALSE)
AM_CONDITIONAL(ENABLE_RELEASE_DOCS, test "x${ac_cv_path_LINUXDOC}" != "x$FALSE")

Expand Down
7 changes: 4 additions & 3 deletions doc/manuals/Substitute.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ SUBSTITUTE=sed "\
s%@SYSCONFDIR@%$(sysconfdir)%g;\
"

## Example of how to substitute:
## squid.8: $(srcdir)/squid.8.in Makefile
## $(SUBSTITUTE) < $(srcdir)/squid.8.in > $@
.md.8:
$(SUBSTITUTE) < $(srcdir)/`basename $<` | \
$(PANDOC) -t man -f gfm -s -o $@

yadij marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions src/Common.am
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,5 @@ COMPAT_LIB = $(top_builddir)/compat/libcompatsquid.la $(LIBPROFILER)
## Some helpers are written in Perl and need the local shell defined properly
subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/[email protected] >$@ || ($(RM) -f $@ ; exit 1)

include $(top_srcdir)/doc/manuals/Substitute.am
include $(top_srcdir)/src/TestHeaders.am
16 changes: 7 additions & 9 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@

include $(top_srcdir)/src/Common.am

dist_doc_DATA = squid.md

if ENABLE_PANDOC_DOC
man_MANS = squid.8
CLEANFILES += squid.8
endif

DNSSOURCE = \
dns_internal.cc

Expand Down Expand Up @@ -689,15 +696,6 @@ cf.data: cf.data.pre Makefile
repl_modules.cc: repl_modules.sh Makefile
$(SHELL) $(srcdir)/repl_modules.sh $(REPL_POLICIES) > repl_modules.cc

include $(top_srcdir)/doc/manuals/Substitute.am

squid.8: $(srcdir)/squid.8.in Makefile
$(SUBSTITUTE) < $(srcdir)/squid.8.in > $@

man_MANS = squid.8
EXTRA_DIST += squid.8.in
CLEANFILES += squid.8

install-data-local: install-sysconfDATA install-dataDATA
@if test -f $(DESTDIR)$(DEFAULT_MIME_TABLE) ; then \
echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_MIME_TABLE)" ; \
Expand Down
1 change: 0 additions & 1 deletion src/security/cert_generators/file/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
##

include $(top_srcdir)/src/Common.am
include $(top_srcdir)/doc/manuals/Substitute.am

security_file_certgen.8: $(srcdir)/security_file_certgen.8.in Makefile
$(SUBSTITUTE) < $(srcdir)/security_file_certgen.8.in > $@
Expand Down
289 changes: 0 additions & 289 deletions src/squid.8.in

This file was deleted.

Loading