Commit 112dabb2 authored by Roland Levillain's avatar Roland Levillain
Browse files

Remove useless parts from the Scribo documentation machinery.

	* doc/doxyfuns.sty,
	* doc/examples-outputs.mk,
	* doc/examples.mk,
	* doc/examples/dummy.cc,
	* doc/figures.mk,
	* doc/gen-examples-outputs-mk,
	* doc/gen-figures-mk,
	* doc/gen-make-variable,
	* doc/gen-split-examples-mk,
	* doc/gen-split-outputs-mk,
	* doc/graphicx.hva,
	* doc/outputs.mk,
	* doc/outputs/dummy.txt,
	* doc/programs-examples.mk,
	* doc/scribo.sty,
	* doc/split-examples.mk,
	* doc/split-outputs.mk,
	* doc/tools/todoxygen.sh,
	* doc/tutorial.tex:
	Remove.
	* doc/Makefile.am: Adjust and remove useless bits.
parent 14be913d
2014-06-20 Roland Levillain <roland@lrde.epita.fr>
Remove useless parts from the Scribo documentation machinery.
* doc/doxyfuns.sty,
* doc/examples-outputs.mk,
* doc/examples.mk,
* doc/examples/dummy.cc,
* doc/figures.mk,
* doc/gen-examples-outputs-mk,
* doc/gen-figures-mk,
* doc/gen-make-variable,
* doc/gen-split-examples-mk,
* doc/gen-split-outputs-mk,
* doc/graphicx.hva,
* doc/outputs.mk,
* doc/outputs/dummy.txt,
* doc/programs-examples.mk,
* doc/scribo.sty,
* doc/split-examples.mk,
* doc/split-outputs.mk,
* doc/tools/todoxygen.sh,
* doc/tutorial.tex:
Remove.
* doc/Makefile.am: Adjust and remove useless bits.
2014-06-20 Roland Levillain <roland@lrde.epita.fr>
Remove mentions to trash/ directories in Scribo.
......
......@@ -5,9 +5,3 @@
/Doxyfile_devel
/devel-refman
/devel-refman.pdf
/figures/*.png
/tutorial.hh
/tutorial.pdf
/tutorial/
# Copyright (C) 2011, 2013 EPITA Research and Development Laboratory
# Copyright (C) 2011, 2013, 2014 EPITA Research and Development Laboratory
# (LRDE).
#
# This file is part of Olena.
......@@ -23,20 +23,6 @@ DOXYFILE = Doxyfile
DATA_html_dirs =
## --------------------- ##
## LaTeX configuration. ##
## --------------------- ##
include $(top_srcdir)/build-aux/tex.mk
TEXI2DVI_FLAGS += \
-I $(srcdir) -I $(srcdir)/outputs -I $(srcdir)/outputs/split \
-I $(srcdir)/img -I $(srcdir)/examples/split
# Additional files for LaTeX compilations.
DOC_PACKAGES = doxyfuns.sty scribo.sty
# ----------------------- #
# User Reference Manual. #
# ----------------------- #
......@@ -200,10 +186,7 @@ $(srcdir)/$(DEVEL_REFMAN): $(srcdir)/devel-refman.stamp
EXTRA_DIST += \
$(DATA_html_dirs) \
$(DOXYFILE).in \
doxyfuns.sty \
scribo.sty \
tools/todoxygen.sh
$(DOXYFILE).in
## ---------- ##
......
%% Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
%%
%% This file is part of Olena.
%%
%% Olena is free software: you can redistribute it and/or modify it under
%% the terms of the GNU General Public License as published by the Free
%% Software Foundation, version 2 of the License.
%%
%% Olena is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%% General Public License for more details.
%%
%% You should have received a copy of the GNU General Public License
%% along with Olena. If not, see <http://www.gnu.org/licenses/>.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Set of commands to handle Doxygen and latex output. %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% #1 - sub page ref name (one word in lower case).
% #2 - sub page title.
\newcommand{\doxychapter}[2]{%
\label{#1}
\backslash endhtmlonly%
*/
/*!
\backslash page #1 #2%
\backslash htmlonly %
}
% #1 - section ref name (one word in lower case).
% #2 - section title.
\newcommand{\doxysection}[2]{%
\vspace{1cm}
\label{#1}
\backslash endhtmlonly%
\backslash section #1 #2%
\backslash htmlonly %
}
% #1 - subsection name (one word in lower case).
% #2 - subsection title.
\newcommand{\doxysubsection}[2]{%
\label{#1}
\backslash endhtmlonly%
\backslash subsection #1 #2%
\backslash htmlonly %
}
% #1 - subsubsection name (one word in lower case).
% #2 - subsubsection title.
\newcommand{\doxysubsubsection}[2]{%
\label{#1}
\backslash endhtmlonly%
\backslash subsubsection #1 #2%
\backslash htmlonly %
}
% #1 - part number (Optional).
% #2 - sample file name.
\newcommand{\doxycode}[2][1]{
\backslash endhtmlonly%
\backslash include #2-#1.cc.raw%
\backslash htmlonly %
}
% #1 - sample file name.
\newcommand{\doxyrawcode}[1]{
\backslash endhtmlonly%
\backslash include #1.cc.raw%
\backslash htmlonly %
}
% #1 - output file name.
\newcommand{\doxyoutput}[1]{
\backslash endhtmlonly%
\backslash include #1.txt%
\backslash htmlonly %
}
% Include file '#1' from a split output.
% #1 - part number (Optional).
% #2 - sample file name.
\newcommand{\doxymoutput}[2][1]{
\backslash endhtmlonly%
\backslash include #2-#1.txt%
\backslash htmlonly %
}
% Include an output image.
% #1 - output image number.
% #2 - related sample file name.
% #3 - Size of the picture (Latex ONLY)
\newcommand{\doxyfigure}[3][1]{
\backslash endhtmlonly%
\backslash image html #2-#1.png%
\backslash htmlonly %
}
% Include an image from located in one of the path specified in IMAGE_PATH.
% #1 - image name.
% #2 - Size of the picture (Latex ONLY)
\newcommand{\doxyimg}[2]{
\backslash endhtmlonly%
\backslash image html #1.png%
\backslash htmlonly %
}
% Refer to a chapter, section...
% #1 - the reference name.
\newcommand{\doxyref}[1]{
\backslash endhtmlonly%
\backslash ref #1%
\backslash htmlonly %
}
% Refers to classes, functions, methods, variables files or URL.
% #1 - the reference name.
\newcommand{\doxysee}[1]{
\backslash endhtmlonly%
\backslash see #1%
\backslash htmlonly %
}
\newcommand{\tutotoc}[2]{%
\begin{center}%
\longleftarrow ~Go to \doxyref{#1} \hspace{1cm} | \hspace{1cm} Go to \doxyref{#2}~ \longrightarrow%
\end{center}%
}
\newcommand{\tutotocnext}[1]{%
\begin{center}%
Go to \doxyref{#1}~ \longrightarrow%
\end{center}%
}
\newcommand{\tutotocprev}[1]{%
\begin{center}%
\longleftarrow ~Go to \doxyref{#1} \hspace{1cm}%
\end{center}%
}
\newenvironment{doxymath}
{
%\backslash endhtmlonly%
%\backslash f\$
%\begin{rawtext}
$$
}
{
$$
%\end{rawtext}
%\backslash f\$
%\backslash htmlonly%
}
%
% renew the previous command for latex only documents.
%
%\begin{latexonly}
\renewcommand{\doxychapter}[2]{\chapter{#2}\label{#1}}
\renewcommand{\doxysection}[2]{\section{#2}\label{#1}}
\renewcommand{\doxysubsection}[2]{\subsection{#2}\label{#1}}
\renewcommand{\doxysubsubsection}[2]{\subsubsection{#2}\label{#1}}
\renewcommand{\doxycode}[2][1]{\lstinputlisting[frame=single]{examples/split/#2-#1.cc.raw}}
\renewcommand{\doxyrawcode}[1]{\lstinputlisting[frame=single]{examples/#1.cc.raw}}
\renewcommand{\doxyoutput}[1]{\lstinputlisting[frame=single]{outputs/#1.txt}}
\renewcommand{\doxymoutput}[2][1]{\lstinputlisting[frame=single]{outputs/split/#2-#1.txt}}
\renewcommand{\doxyfigure}[3][1]{%
\pgfimage[width=#3]{figures/#2-#1}%
\label{#1}%
}
\renewcommand{\doxyimg}[2]{%
\pgfimage[width=#2]{#1}%
\label{#1}%
}
\renewcommand{\doxyref}[1]{\ref{#1}}
\renewcommand{\doxysee}[1]{\ref{#1}}
\renewcommand{\tutotoc}[2]{}
\renewcommand{\tutotocnext}[1]{}
\renewcommand{\tutotocprev}[1]{}
\renewenvironment{doxymath}
{
$$
}
{
$$
}
%\end{latexonly}
\newcommand{\code}[1]{%
\textit{#1}%
}
\newcommand{\var}[1]{%
\textit{$#1$}%
}
\newcommand{\val}[1]{%
\textit{#1}%
}
\newcommand{\type}[1]{%
\textit{#1}%
}
\newcommand{\namespace}[1]{%
\textit{#1}%
}
\newcommand{\header}[1]{%
\textit{#1}%
}
\newcommand{\hpath}[1]{%
\textit{#1}%
}
\newcommand{\must}{%
\textbf{must}
}
\newcommand{\should}{%
\textbf{should}
}
\newcommand{\dir}[1]{
\textbf{\textit{#1}}
}
\newcommand{\B}[1]{
\textbf{#1}
}
## Generated by gen-make-variable. Do not edit by hand.
EXAMPLES = \
$(srcdir)/examples/dummy.cc
#! /bin/sh
# Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE).
#
# This file is part of Olena.
#
# Olena is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, version 2 of the License.
#
# Olena is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
# To be used from milena/doc/'s source directory.
me=`basename $0`
test $# -ne 0 || { echo "usage: $me SOURCES..."; exit 1; }
cat<<EOF
## Generated by $me. Do not edit by hand.
EOF
for source; do
base=`basename "$source" .cc`
source_dir=`dirname "$source"`
timestamp="\$(srcdir)/$source_dir/$base.stamp"
# FIXME: Programs of which sources are located in a subdirectory of
# examples/ take the path as prefix of their name. This is a pain.
# It'd be much simpler to have all sources in the same directory.
canonical_name=`echo "$source" \
| sed -e 's,examples/,,' \
-e 'y,/,_,' \
-e 's,\.cc$,,'`
program="$canonical_name\$(EXEEXT)"
output="\$(srcdir)/outputs/$canonical_name.txt"
# Programs generate a textual output, and possibly one or several
# images (as a ``side effect''). Use a timestamp to keep track of
# these multiple outputs.
#
# Also, have outputs depend on sources rather than programs, and
# recompile the latter to regen the former only when needed. This
# way, we can ship generated outputs without forcing the user of the
# distribution to recompile the programs.
cat<<EOF
$timestamp: $source
@rm -f \$@.tmp
@touch \$@.tmp
\$(MAKE) \$(AM_MAKEFLAGS) $program
./$program >$output.tmp
mv $output.tmp $output
@mv -f \$@.tmp \$@
EXTRA_DIST += $timestamp
MAINTAINERCLEANFILES += $timestamp
$output: $timestamp
## Recover from the removal of \$@
@if test -f \$@; then :; else \\
rm -f \$<; \\
\$(MAKE) \$(AM_MAKEFLAGS) \$<; \\
fi
EOF
done
#! /bin/sh
# Copyright (C) 2010, 2014 EPITA Research and Development Laboratory (LRDE).
#
# This file is part of Olena.
#
# Olena is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, version 2 of the License.
#
# Olena is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
me=`basename $0`
# Use the C locale to have a deterministic sort.
export LC_ALL=C
# Get this list as argument?
inputs()
{
# Remove the .cc extension before sorting file names.
find examples -name \*.cc \
| sed 's/.cc$//' \
| sort \
| sed 's/$/.cc/'
}
# get_outputs FILE
# ----------------
get_outputs()
{
local outputs=
local i=1
# Use Perl instead of sed for portability reasons.
for output in `perl -ne \
"print if s|^\\s*doc::(p.m)save\\s*\\([^;]+,\\s*\"([^\"]+)\"\\);\$|\\2.\\1|" \
"$1"`
do
# Add a number to the file name.
# FIXME: Maybe we should let the Perl script above do this...
num_output=`echo $output | sed "s,\\(.p.m\\),-$i\\1,"`
if test -z "$outputs"; then
outputs="$num_output"
else
outputs="$outputs $num_output"
fi
i=`expr $i + 1`
done
echo "$outputs"
}
# upcase STRING
# -------------
upcase()
{
# Use enumerated sets to be portable.
echo "$1" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
}
# canonicalize STRING
# -------------------
canonicalize()
{
echo "$1" | tr .- _
}
# backslashify
# ------------
# Read lines from the standard input and write them on the standard
# output with an extra trailing backslash, except for the last line.
backslashify()
{
# Set IFS to nothing to prevent `read' from trimming spaces or tabs.
IFS= read last_line
while IFS= read line; do
echo "$last_line \\"
last_line=$line
done
echo "$last_line"
}
# List of generated figures.
fig_vars=
# gen_var VARIABLE [ITEMS...]
# ---------------------------
# Generate a Make variable named VARIABLE containing ITEMS.
gen_var()
{
local v
{
echo "$1 ="
shift
for v; do
echo " $v"
done
} | backslashify
}
# List of paths to PBM figures.
pbm_fig_paths=
# List of paths to PGM figures.
pgg_fig_paths=
# List of paths to PPM figures.
ppm_fig_paths=
cat<<EOF
## Generated by $me. Do not edit by hand.
## Figures depend on the timestamp associated with their generator.
## See also examples-outputs.mk.
EOF
for file in `inputs`; do
# FIXME: Ugly hack to handle the case of examples/ima-save.cc, since
# this program does not use a `doc::p?msave' routine...
if test "X$file" = "Xexamples/ima-save.cc"; then
# Hard-coded value.
figures="ima_save.pbm"
else
figures=`get_outputs "$file"`
fi
if test -n "$figures"; then
# FIXME: Programs of which sources are located in a subdirectory of
# examples/ take the path as prefix of their name. This is a pain.
# It'd be much simpler to have all sources in the same directory.
canonical_name=`echo "$file" \
| sed -e 's,examples/,,' \
-e 'y,/,_,' \
-e 's,\.cc$,,'`
canonical_var=`canonicalize "$canonical_name"`
fig_var="`upcase "$canonical_var"`_FIGURES"
# Populate the list of variables of figures.
fig_vars="$fig_vars \$($fig_var)"
# Populate the list of paths to figures of a given format.
for figure in $figures; do
fig_path=" \$(srcdir)/figures/$figure"
case "$figure" in
*.pbm) pbm_fig_paths="$pbm_fig_paths $fig_path";;
*.pgm) pgm_fig_paths="$pgm_fig_paths $fig_path";;
*.ppm) ppm_fig_paths="$ppm_fig_paths $fig_path";;
esac
done
# Generate a Make variable for the figures produced by FILE.
{
echo "$fig_var ="
for figure in $figures; do
fig_path=" \$(srcdir)/figures/$figure"
echo "$fig_path"
done
} | backslashify
# Generate a Make rule to regen the figures produced by FILE.
base=`basename "$file" .cc`
dir=`dirname "$file"`
timestamp="\$(srcdir)/$dir/$base.stamp"
cat <<EOF
\$($fig_var): $timestamp
## Recover from the removal of \$@
@if test -f \$@; then :; else \\
rm -f \$<; \\
\$(MAKE) \$(AM_MAKEFLAGS) \$<; \\
fi
EOF
fi
done
# More Make variables.
echo "# The list of all generated figures."
gen_var FIGURES $fig_vars
echo
echo "# The list of all generated PBM figures."
gen_var PBM_FIGURES $pbm_fig_paths
echo
echo "# The list of all generated PGM figures."
gen_var PGM_FIGURES $pgm_fig_paths
echo
echo "# The list of all generated PPM figures."
gen_var PPM_FIGURES $ppm_fig_paths
#! /bin/sh
# Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE).
#
# This file is part of Olena.
#
# Olena is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, version 2 of the License.
#
# Olena is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
me=`basename $0`
# Use the C locale to have a deterministic sort.
export LC_ALL=C
test $# -gt 1 || { echo "usage: $me VARIABLE FILES..."; exit 1; }
# backslashify
# ------------
# Read lines from the standard input and write them on the standard
# output with an extra trailing backslash, except for the last line.
backslashify()
{
# Set IFS to nothing to prevent `read' from trimming spaces or tabs.
IFS= read last_line
while IFS= read line; do
echo "$last_line \\"
last_line=$line
done
echo "$last_line"
}
cat<<EOF
## Generated by $me. Do not edit by hand.
EOF