# same for intermediate files for doxygen output
example-dox-prog = $(addsuffix _prog.dox,$(gen-example-names))
example-dox-plain = $(addsuffix _plain.dox,$(gen-example-names))
-
+example-plain = $(addprefix plain/,$(addsuffix .cc,$(example-names)))
# finally a target for combined Doxygen files
example-doxygen = $(addprefix doxygen/,$(addsuffix .h,$(example-names)))
| $(PERL) program2doxygen \
> $@
+$(example-plain):
+ @echo ================== Making $@
+ @cat $D/examples/$(call get_basename, $(@F))/$(@F) | $(PERL) program2plain >> $@
$(example-dox-plain):
@echo ================== Making $@
@cat generated/$(call get_basename, $@)_prog.dox >> $@
@cat $D/examples/$(call get_basename, $@)/doc/results.dox \
| $(PERL) create_anchors >> $@
- @cat generated/$(call get_basename, $@)_plain.dox >> $@
+ @echo " */" >> $@
+ @echo " /**" >> $@
+ @echo " * <a name=\"PlainProg\"></a>" >> $@
+ @echo " * <h1> The plain program</h1>" >> $@
+ @echo " * @example " $(call get_basename, $@).cc >> $@
@echo " */" >> $@
+# Previous version of the lines after the last 'create_anchor'
+# @cat generated/$(call get_basename, $@)_plain.dox >> $@
validate-xrefs:
@$(PERL) $D/common/scripts/validate-xrefs.pl \
generated/$${i}_toc.results \
generated/$${i}_toc.prog \
generated/$${i}_toc.plain ; \
+ echo plain/$$i.cc : `echo $D/examples/$${i}/*.cc` ; \
echo doxygen/$$i.h : generated/$${i}_prog.dox generated/$${i}_plain.dox \
generated/$${i}_toc.combined \
$D/examples/$$i/doc/intro.dox \
$D/examples/$$i/doc/results.dox \
- ; \
+ plain/$$i.cc ; \
echo generated/$${i}_toc.intro : \
$D/examples/$$i/doc/intro.dox \
; \
--- /dev/null
+#---------------------------------------------------------------------------
+# $Id$
+# Version: $Name$
+#
+# Copyright (C) 2010 by the deal.II authors
+#
+# This file is subject to QPL and may not be distributed
+# without copyright and license information. Please refer
+# to the file deal.II/doc/license.html for the text and
+# further information on this license.
+#
+#---------------------------------------------------------------------------
+
+# Remove all comments from the source file
+
+# The variable tracing whether we are inside a block comment
+
+my $block_comment = 0;
+while (<>) {
+ # Eliminate comment lines
+ next if (m!^\s*//!);
+ if (s!^\s*/\*.*\*/!!g)
+ {
+ print unless m/^\s*$/;
+ }
+ #Find begin of block comment
+ if (0 && s!/\*.*!!)
+ {
+ $block_comment = 1;
+ # Print unless empty
+ print unless m/^\s*$/;
+ next;
+ }
+
+ # Find end of block comment
+ if ($block_comment != 0)
+ {
+ if (s!.*\*/!!)
+ {
+ $block_comment = 0;
+ # Print unless empty
+ print unless m/^\s*$/;
+ next;
+ }
+ }
+ print;
+}
+