Skip to content

Commit

Permalink
doc: generate web doc to specific places
Browse files Browse the repository at this point in the history
  • Loading branch information
wlemkows committed Nov 21, 2017
1 parent 809c0d2 commit 73ec987
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 10 deletions.
17 changes: 9 additions & 8 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,15 @@ md2man:
$(foreach f, $(MANPAGES_1_MD), ../utils/md2man.sh $(f) default.man $(MANPAGES_BUILDDIR)/$(basename $(notdir $(f)));)

web: | $(MANPAGES_WEBDIR_LINUX) $(MANPAGES_WEBDIR_WINDOWS)
$(foreach f, $(MANPAGES_7_MD), WEB=1 ../utils/md2man.sh $(f) default.man $(MANPAGES_WEBDIR_LINUX)/$(notdir $(f));)
$(foreach f, $(MANPAGES_5_MD), WEB=1 ../utils/md2man.sh $(f) default.man $(MANPAGES_WEBDIR_LINUX)/$(notdir $(f));)
$(foreach f, $(MANPAGES_3_MD), WEB=1 ../utils/md2man.sh $(f) default.man $(MANPAGES_WEBDIR_LINUX)/$(notdir $(f));)
$(foreach f, $(MANPAGES_1_MD), WEB=1 ../utils/md2man.sh $(f) default.man $(MANPAGES_WEBDIR_LINUX)/$(notdir $(f));)
$(foreach f, $(MANPAGES_7_MD), WEB=1 WIN32=1 ../utils/md2man.sh $(f) default.man $(MANPAGES_WEBDIR_WINDOWS)/$(notdir $(f));)
$(foreach f, $(MANPAGES_5_MD), WEB=1 WIN32=1 ../utils/md2man.sh $(f) default.man $(MANPAGES_WEBDIR_WINDOWS)/$(notdir $(f));)
$(foreach f, $(MANPAGES_3_MD), WEB=1 WIN32=1 ../utils/md2man.sh $(f) default.man $(MANPAGES_WEBDIR_WINDOWS)/$(notdir $(f));)
$(foreach f, $(MANPAGES_1_MD), WEB=1 WIN32=1 ../utils/md2man.sh $(f) default.man $(MANPAGES_WEBDIR_WINDOWS)/$(notdir $(f));)
$(MAKE) -C generated all
$(foreach f, $(MANPAGES_7_MD), WEB=1 WIN32="" ../utils/md2man.sh $(f) default.man $(MANPAGES_WEBDIR_LINUX)/$(f);)
$(foreach f, $(MANPAGES_5_MD), WEB=1 WIN32="" ../utils/md2man.sh $(f) default.man $(MANPAGES_WEBDIR_LINUX)/$(f);)
$(foreach f, $(MANPAGES_3_MD), WEB=1 WIN32="" ../utils/md2man.sh $(f) default.man $(MANPAGES_WEBDIR_LINUX)/$(f);)
$(foreach f, $(MANPAGES_1_MD), WEB=1 WIN32="" ../utils/md2man.sh $(f) default.man $(MANPAGES_WEBDIR_LINUX)/$(f);)
$(foreach f, $(MANPAGES_7_MD), WEB=1 WIN32=1 ../utils/md2man.sh $(f) default.man $(MANPAGES_WEBDIR_WINDOWS)/$(f);)
$(foreach f, $(MANPAGES_5_MD), WEB=1 WIN32=1 ../utils/md2man.sh $(f) default.man $(MANPAGES_WEBDIR_WINDOWS)/$(f);)
$(foreach f, $(MANPAGES_3_MD), WEB=1 WIN32=1 ../utils/md2man.sh $(f) default.man $(MANPAGES_WEBDIR_WINDOWS)/$(f);)
$(foreach f, $(MANPAGES_1_MD), WEB=1 WIN32=1 ../utils/md2man.sh $(f) default.man $(MANPAGES_WEBDIR_WINDOWS)/$(f);)

compress: $(GZFILES_BUILD)

Expand Down
41 changes: 41 additions & 0 deletions doc/generated/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
# Copyright 2017, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# * Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

#
# generated/Makefile -- Makefile for generate pmem.io aliases map
#

all:
../../utils/get_aliases.sh

clean:
$(RM) -rf libs_map.yml
5 changes: 3 additions & 2 deletions utils/md2man.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if [ "$TESTOPTS" != "" ]; then
else
OPTS=

if [ -v WIN32 ]; then
if [ "$WIN32" == 1 ]; then
OPTS="$OPTS -DWIN32"
else
OPTS="$OPTS -UWIN32"
Expand All @@ -76,8 +76,9 @@ else
OPTS="$OPTS -UFREEBSD"
fi

if [ -v WEB ]; then
if [ "$WEB" == 1 ]; then
OPTS="$OPTS -DWEB"
mkdir -p "$(dirname $outfile)"
m4 $OPTS macros.man $filename | sed -n -e '/---/,$p' > $outfile
else
m4 $OPTS macros.man $filename | sed -n -e '/# NAME #/,$p' |\
Expand Down

0 comments on commit 73ec987

Please sign in to comment.