]> rtime.felk.cvut.cz Git - omk.git/commitdiff
Fix compilation of manual
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 22 Feb 2011 16:07:11 +0000 (17:07 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 22 Feb 2011 16:07:11 +0000 (17:07 +0100)
The manual includes files from test (to ensure that the documentation
matches the real behavior). Since we converted the tests to a different
format, we have to change the way how the files are included.

doc/.gitignore
doc/Makefile
doc/omk-manual.texinfo

index 9f4f25b47ebb00df306960532e61166c057fee26..61fa62e954ddab8e708553de0b4de97914d6c07d 100644 (file)
@@ -1,4 +1,5 @@
 .version
+tests/
 omk-manual.aux
 omk-manual.cp
 omk-manual.cps
index b3774c39e5bd22773f417b6bd22fdc0136efa848..87dd9a5c2e10a340394d598b0e7a5c745fa83073 100644 (file)
@@ -13,17 +13,29 @@ endif
 PNG_FIGS = $(wildcard *.png)
 PDF_FIGS = $(patsubst %.png,%.pdf,$(PNG_FIGS))
 
+MANUAL_INCLUDES = .version tests/programs/Makefile.omk         \
+tests/libraries/Makefile.omk tests/default-config/Makefile.omk \
+tests/default-config/subdir/Makefile.omk                       \
+tests/default-config/config.omk-correct
+
+tests/%: DIR=$(shell echo $@|sed -e 's,\([^/]*/[^/]*\)/.*,\1,')
+tests/%:
+       rm -rf $(DIR) && \
+       mkdir -p $(DIR) && \
+       cd $(DIR) && \
+       sh ../../../$(DIR).files
+
 %.pdf: %.png
        convert $< -density 150 $@
 
-%.pdf: %.texinfo $(PNG_FIGS) .version
+%.pdf: %.texinfo $(PNG_FIGS) $(MANUAL_INCLUDES)
        texi2dvi --pdf $<
        texi2dvi --pdf $<
 
-%.txt: %.texinfo .version
+%.txt: %.texinfo $(MANUAL_INCLUDES)
        makeinfo --no-headers --force -o $@ $<
 
-%.html: %.texinfo .version
+%.html: %.texinfo $(MANUAL_INCLUDES)
        makeinfo --html --no-split -o $@ $<
 #      texi2html --l2h $<
 # Fix texinfo HTML output
index f695b1319e1b0ab5dec664e102ceb6e92060bdb8..94dd95e3f72cb622de1e4f9e95c75419a0f55f79 100644 (file)
@@ -320,7 +320,7 @@ In the example bellow a program @command{test} will be compiled from
 source @file{test.c}.
 
 @example
-@verbatiminclude ../tests/programs/Makefile.omk
+@verbatiminclude tests/programs/Makefile.omk
 @end example
 
 @noindent The variables are:
@@ -420,7 +420,7 @@ is defined in @file{myfunc.h}. Therefore, we export this header for use
 by other programs.
 
 @example
-@verbatiminclude ../tests/libraries/Makefile.omk
+@verbatiminclude tests/libraries/Makefile.omk
 @end example
 
 @noindent Variables for use with libraries are:
@@ -668,17 +668,17 @@ To specify names and default values of configuration parameters use the
 
 @noindent Example of using @code{default_CONFIG}. @file{Makefile.omk} reads like:
 @example
-@verbatiminclude ../tests/config/default/Makefile.omk
+@verbatiminclude tests/default-config/Makefile.omk
 @end example
 @noindent and @file{subdir/Makefile.omk} like:
 @example
-@verbatiminclude ../tests/config/default/subdir/Makefile.omk
+@verbatiminclude tests/default-config/subdir/Makefile.omk
 @end example
 
 @noindent After running @command{make default-config}, the content of
 @file{config.omk-default} will be:
 @example
-@verbatiminclude ../tests/config/default/config.omk-correct
+@verbatiminclude tests/default-config/config.omk-correct
 @end example
 
 @node Using Configuration Parameters, Common Variables, Specifying Configuration Parameters, Configuration and Conditional Compilation