Skip to content

Commit

Permalink
make markdowndir O=DIRNAME places Markdown documentation in DIRNAME.
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed Oct 18, 2017
1 parent 5c7d0c1 commit c8512cc
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 16 deletions.
20 changes: 6 additions & 14 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@ LIBOBJS
freebsd_includedir
freebsd_srcdir
FINDELEMFLAGS
all_element_groups
element_groups
linux_srcdir
linux_builddir
Expand Down Expand Up @@ -771,7 +772,6 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
Expand Down Expand Up @@ -908,7 +908,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
Expand Down Expand Up @@ -1161,15 +1160,6 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;

-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;

-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
Expand Down Expand Up @@ -1307,7 +1297,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir runstatedir
libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
Expand Down Expand Up @@ -1460,7 +1450,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
Expand Down Expand Up @@ -7201,12 +7190,15 @@ else
fi


for i in `(cd $srcdir/elements; ls | sed '/^CVS$/d;/^bsdmodule$/d;/^linuxmodule$/d;/^ns$/d;/^userlevel$/d;/^minios$/d')`; do
all_element_groups=
for i in `(cd $srcdir/elements; ls | sed '/^CVS$/d;/^\.git/d;/^bsdmodule$/d;/^linuxmodule$/d;/^ns$/d;/^userlevel$/d;/^minios$/d')`; do
enableval=`eval 'echo $'"enable_$i"`
test "x$enable_all_elements" = xyes -a "x$enableval" '!=' xno && enableval=yes
test -d "$srcdir/elements/$i" -a "$enableval" = "yes" && element_groups="$element_groups $i"
test -d "$srcdir/elements/$i" && all_element_groups="$all_element_groups$i "
done


FINDELEMFLAGS=
if test "x$enable_skip_elements" != xno -a "x$enable_skip_elements" != xyes; then
FINDELEMFLAGS="-x '$enable_skip_elements'"
Expand Down
5 changes: 4 additions & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -502,11 +502,14 @@ ELEMENTS_ARG_ENABLE(wifi, [include wifi elements and support], NO)
AC_ARG_ENABLE(experimental, [AS_HELP_STRING([--enable-experimental], [enable experimental elements in normal groups])], :, enable_experimental=no)
AC_ARG_ENABLE(skip-elements, [AS_HELP_STRING([--enable-skip-elements=ELTS], [disable comma-separated elements])], :, enable_skip_elements=no)

for i in `(cd $srcdir/elements; ls | sed '/^CVS$/d;/^bsdmodule$/d;/^linuxmodule$/d;/^ns$/d;/^userlevel$/d;/^minios$/d')`; do
all_element_groups=
for i in `(cd $srcdir/elements; ls | sed '/^CVS$/d;/^\.git/d;/^bsdmodule$/d;/^linuxmodule$/d;/^ns$/d;/^userlevel$/d;/^minios$/d')`; do
enableval=`eval 'echo $'"enable_$i"`
test "x$enable_all_elements" = xyes -a "x$enableval" '!=' xno && enableval=yes
test -d "$srcdir/elements/$i" -a "$enableval" = "yes" && element_groups="$element_groups $i"
test -d "$srcdir/elements/$i" && all_element_groups="$all_element_groups$i "
done
AC_SUBST([all_element_groups])

FINDELEMFLAGS=
if test "x$enable_skip_elements" != xno -a "x$enable_skip_elements" != xyes; then
Expand Down
18 changes: 17 additions & 1 deletion doc/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,22 @@ doxygen:
-e "s#^GENERATE_LATEX.*#GENERATE_LATEX = NO#" \
< $(srcdir)/Doxyfile | (cd $(top_srcdir); doxygen -)

MAN2MARKDOWN_ARGS = --xlink click.1=Userlevel --xlink click.o.8=Linuxmodule --xlink click.5=Language \
--xlink elements.n=Elements
MARKDOWN_PROVISIONS = userlevel linuxmodule ns @all_element_groups@ experimental \
smpclick int64 dpdk linux netmap pcap umultithread

markdowndir:
@if test -z "$(O)"; then echo 1>&2; echo "Run 'make markdowndir O=OUTPUTDIRECTORY'" 1>&2; echo 1>&2; false; fi
for i in click-align click-combine click-devirtualize click-fastclassifier click-flatten click-install click-mkmindriver click-pretty click-uncombine click-undead click-uninstall click-xform; do \
$(PERL) $(srcdir)/man2html --markdown -l $(MAN2MARKDOWN_ARGS) $(srcdir)/$$i.1 -d $(O) -o $(O)/$$i.md; \
done
$(PERL) $(srcdir)/man2html --markdown $(MAN2MARKDOWN_ARGS) -l $(srcdir)/click.1 -d $(O) -o $(O)/Userlevel.md
$(PERL) $(srcdir)/man2html --markdown $(MAN2MARKDOWN_ARGS) -l $(srcdir)/click.5 -d $(O) -o $(O)/Language.md
$(PERL) $(srcdir)/man2html --markdown $(MAN2MARKDOWN_ARGS) -l $(srcdir)/click.o.8 -d $(O) -o $(O)/Linuxmodule.md
$(PERL) $(srcdir)/man2html --markdown $(MAN2MARKDOWN_ARGS) -l $(srcdir)/elementdoc.7 -d $(O) -o $(O)/Elementdoc.md
echo $(MARKDOWN_PROVISIONS) | $(top_builddir)/bin/click-buildtool findelem -r "$(MARKDOWN_PROVISIONS)" -p $(top_srcdir) | $(PERL) $(top_srcdir)/click-mkelemmap -r "$(PROVISIONS)" -t "userlevel linuxmodule ns" -p "$(top_srcdir)" -Iinclude -s "`cd $(top_srcdir) && pwd`" | $(PERL) $(srcdir)/click-elem2man -d $(O) --markdown -l -p $(top_srcdir) -

always:
@:

Expand All @@ -99,4 +115,4 @@ distclean: clean

.PHONY: all clean distclean always \
install install-man uninstall uninstall-man \
doxygen
doxygen markdowndir

0 comments on commit c8512cc

Please sign in to comment.