Skip to content

Commit

Permalink
Merge pull request #110 from yast/index_if_no_yard
Browse files Browse the repository at this point in the history
Index if no yard
  • Loading branch information
jreidinger committed Jul 19, 2016
2 parents 2f7fba4 + 46ac8c2 commit c0ef471
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 17 deletions.
45 changes: 29 additions & 16 deletions build-tools/aminclude/autodocs-ycp.ami
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
# Builds source documentation for YCP sources
# Uses ycpdoc
# PARAMETERS:
# AUTODOCS_YCP: Files that the ycp autodocs is built from
# Optional - the default is $(srcdir)/../../src/*.ycp
# AUTODOCS_PM: Files that the perl autodocs is built from
# Optional - the default is $(srcdir)/../../src/*.pm
# AUTODOCS_RB: Files that the ruby autodocs is built from (using yard)
# Optional - the default is $(srcdir)/../../src/modules/*.rb) $(srcdir)/../../src/include/*/*.rb
# AUTODOCS_SUBDIR: To install the result to $(docdir)/SUBDIR/autodocs
# Optional - the default is no subdir, $(docdir)/autodocs
# AUTODOCS_STRIP: Strip it from filenames. The remaining / are replaced by __
# Optional - the default is $(srcdir)/../../src
# AUTODOCS_YCP: Files that the ycp autodocs is built from
# Optional - the default is $(srcdir)/../../src/*.ycp
# AUTODOCS_PM: Files that the perl autodocs is built from
# Optional - the default is $(srcdir)/../../src/*.pm
# AUTODOCS_RB: Files that the ruby autodocs is built from (using yard)
# Optional - the default is $(srcdir)/../../src/modules/*.rb) $(srcdir)/../../src/include/*/*.rb
# AUTODOCS_SUBDIR: To install the result to $(docdir)/SUBDIR/autodocs
# Optional - the default is no subdir, $(docdir)/autodocs
# AUTODOCS_STRIP: Strip it from filenames. The remaining / are replaced by __
# Optional - the default is $(srcdir)/../../src

htmldir = $(docdir)/$(AUTODOCS_SUBDIR)/autodocs

Expand Down Expand Up @@ -48,9 +48,22 @@ index.html: $(AUTODOCS_YCP) $(AUTODOCS_PM) $(AUTODOCS_RB)
echo "<a href='$$b.html'>$${b/__/::}</a>" > $$b.mod.html; \
done
if [ -n "$(AUTODOCS_RB)" ]; then \
if which $(YARD) 2>/dev/null; then \
$(YARD) doc --title "@RPMNAME@ -- Development Documentation" $(YARD_OPTIONS) $(AUTODOCS_RB);\
else \
echo "yard not available, skipping"; \
fi; \
fi
if which $(YARD) 2>/dev/null; then \
$(YARD) doc --title "@RPMNAME@ -- Development Documentation" $(YARD_OPTIONS) $(AUTODOCS_RB);\
else \
echo "yard not available, skipping"; \
if [ ! -f index.html ]; then \
echo '<!DOCTYPE html>\
<html>\
<head>\
<meta charset="UTF-8">\
<title>YaST Package Documentation</title>\
</head>\
<body>\
<a href="http://yast.github.io/">Go to official YaST documentation</a>\
<p>This is just a stub, to generate the full source code documentation install the "yardoc" tool.</p>\
</body>\
</html>' > index.html;\
fi; \
fi; \
fi
7 changes: 7 additions & 0 deletions package/yast2-devtools.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Jul 19 07:14:16 UTC 2016 - jreidinger@suse.com

- Generate simple page if yard is not available (follow-up of
previous fix for building) (part of FATE#320356)
- 3.1.45

-------------------------------------------------------------------
Mon Jul 18 14:06:06 UTC 2016 - jreidinger@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-devtools.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-devtools
Version: 3.1.44
Version: 3.1.45
Release: 0
Url: http://github.com/yast/yast-devtools

Expand Down

0 comments on commit c0ef471

Please sign in to comment.