This file is indexed.

/usr/bin/duneproject is in libdune-common-dev 2.2.1-2.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
#!/bin/bash

#
# TODO:
#
# * In case of an installed Dune, it should not be necessary to pass the
#   dune-common dir to autogen.sh.
# * Check module names entered as dependencies.

set -e

canonicalname(){
	if test $# -ne 1; then
		echo Usage: canonicalname path >&2
		return 1
	fi
	file="`eval echo $1`" # expand ~
	if test ! -e "$file"; then
		echo $file: file not found >&2
		return 1
	fi
    # if this is a symlink, then follow the symlink
	if test -L "$file"; then
		fdir="`dirname \"$file\"`"
		flink="`readlink \"$file\"`"
		if test -e "$flink"; then
			# these are absolute links, or links in the CWD
			canonicalname "$flink"
		else
			canonicalname "$fdir/$flink"
		fi
	else
        # if this is a file, then remember the filename and
        # canonicalize the directory name
		if test -f "$file"; then
			fdir="`dirname \"$file\"`"
			fname="`basename \"$file\"`"
			fdir="`canonicalname \"$fdir\"`"
			echo "$fdir/$fname"
		fi
        # if this is a directory, then create an absolute 
        # directory name and we are done
		if test -d "$file"; then
			(cd "$file"; pwd)
		fi
	fi
}

canonicalpath(){
  if test $# -ne 1; then
     echo Usage: canonicalpath path >&2
     return 1
  fi
  dirname $(canonicalname "$1")
}

pkg_config_dependencies(){
    if test $# -ne 1; then
	echo Usage: pkg_config_dependencies name >&2
	return 1
    fi
    name="$1"
    depends="`pkg-config --variable=DEPENDENCIES $name| sed -e 's/,/ /g'`"
    for pkg in $depends; do
	depends="$depends `pkg_config_dependencies $pkg`"
    done
    echo $depends
}

modulesexist(){
  allfound=0

  for dep in $1; do
      found=0
      for module in $2; do
	  if [ "$dep" = "$module" ]; then
	      found=1
	      break
	  fi
      done
      if [ "$found" = "0" ]; then
	  echo "ERROR:">&2
	  echo "Module with name $dep was not found" >&2
	  echo "Did you forget to specify it's location" >&2
	  echo "in the DUNE_CONTROL_PATH variable?">&2
	  echo >&2
	  allfound=1
      fi
  done
  return $allfound
}

make_unique(){
  if [ "$#" = "1" ]; then
      # take first word
      for exclude_word in $1; do
	  break;
      done
      make_unique $exclude_word "$1" 0
  else
      local exclude_word="$1"
      local words="$2"
      local pos="$3"
      local length=0
      local i=0
      local new_words=""
      local cur=0
      for word in $words; do
	  if [ $i -le $pos ]; then
	      i=$((i+1))
	      length=$((length+1))
	      new_words="$new_words $word"
	      continue
	  fi
	  if [ "$word" != "$exclude_word" ]; then
	      new_words="$new_words $word"
	      if [ "$((length-1))" = "$pos" ]; then
		  next_word="$word"
	      fi
	      length=$((length+1))
	  fi
      done
      if [ "$pos" -lt "$length" ]; then
       # process next word
	  make_unique "$next_word" "$new_words" $((pos+1))
      else
	  export UNIQUE_WORDS="$new_words"
      fi
  fi
}
       
echo
echo == Dune project/module generator ==
echo
echo duneproject will assist you in the creation of a new Dune application.
echo During this process a new directory with the name of your project will be
echo created. This directory will hold all configuration and Makefiles and a
echo simple example application.
echo

################## FIND AVAILABLE MODULES ##################

. $(canonicalpath $0)/../lib/dunemodules.lib

# create PKG_CONFIG_PATH for installed dune modules
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(canonicalpath $0)/../lib/pkgconfig"

# search for modules, both installed and src modules
find_modules_in_path

# sort modules to remove duplicates
sort_modules $FOUND_MODULES
FOUND_MODULES=$MODULES

# get the real module names
MODULES=""
for i in $FOUND_MODULES; do
  mod=$(eval echo \$NAME_$i)
  MODULES="$MODULES$mod "
done

if [ "$MODULES" = "" ]; then
  echo "ERROR:">&2
  echo "  No dune modules were found!">&2
  echo "  Did you forget to specify the places where ">&2
  echo "  you installed your modules in the ">&2
  echo "  DUNE_CONTROL_PATH environment variable">&2
  echo "  and adjusted the PKG_CONFIG_PATH environment">&2
  echo "  accordingly?" >&2
  exit 1;
fi

################## READ CMDLINE OPTIONS ##########
PROJECT="$1"
DEPENDENCIES="$2"
VERSION="$3"
MAINTAINER="$4"

################## READ OPTIONS ##################

while [ "$DATACORRECT" != "y" -a "$DATACORRECT" != "Y" ]; do
  while [ -z $PROJECT ]; do
    read -p "1) Name of your new Project? (e.g.: dune-grid): " PROJECT
    if echo "$MODULES" | grep -q ^$PROJECT$; then
      read -p "   A module named $PROJECT already exists. Continue anyway? [y/N] " CONT
      if test x$DELETE = xy -o x$DELETE = xY; then
        PROJECT=""
      fi
    fi
  done
  MODULE="$PROJECT"

  DEPOK=1

  while [ "$DEPOK" != 0 ]; do
  echo "2) Which modules should this module depend on?"
  echo "   Following modules are found:"
  echo "   $MODULES"
#  for i in $MODULES; do echo -n " $i"; done
#  echo ""
  while [ -z "$DEPENDENCIES" ]; do
      read -p "   Enter space separated list: " DEPENDENCIES
  done
  set +e
  modulesexist "$DEPENDENCIES" "$MODULES"
  DEPOK=$?
  set -e
  if [ "$DEPOK" != 0 ]; then
    DEPENDENCIES=""
  fi
  done

  while [ -z $VERSION ]; do
    read -p "3) Project/Module version? " VERSION
  done
  while [ -z $MAINTAINER ]; do
    read -p "4) Maintainers email address? " MAINTAINER
  done

  echo
  echo "creating Project \"$PROJECT\", version $VERSION "
  echo "which depends on \"$DEPENDENCIES\""
  echo "with maintainer \"$MAINTAINER\""
  read -p "Are these informations correct? [y/N] " DATACORRECT

  # reset data if necessary
  if [ "$DATACORRECT" != "y" -a "$DATACORRECT" != "Y" ]; then
    PROJECT=""
    DEPENDENCIES=""
    VERSION=""
    MAINTAINER=""
  fi
done

echo
echo "A sample code $MODULE.cc is generated in the \"$PROJECT\" directory."
echo "Look at the README and dune.module files there."
echo "Now you can run the dunecontrol script which will setup the new module."
echo "Sometimes you may have to tweak configure.ac a bit."

if test -d $PROJECT; then
  echo WARNING:
  echo "A directory with the name $PROJECT already exists."
  echo "Do you want to continue anyway?"
  read -p "Type Y to overwrite the old directory, N to abort. [y/N] " DELETE
  if test x$DELETE != xy -a x$DELETE != xY; then
    echo Abort...
    exit 1
  fi
  rm -rf "$PROJECT"
fi
mkdir "$PROJECT"

################## dune.module ##################
cat > "$PROJECT/dune.module" <<C_DELIM
################################
# Dune module information file #
################################

#Name of the module
Module: $MODULE
Version: $VERSION
Maintainer: $MAINTAINER
#depending on 
Depends: $DEPENDENCIES
C_DELIM

################## CONFIGURE.AC ##################

## Create the parameters passed to DUNE_CHECK_ALL

# save module list of dunemodules.inc
save_MODULES=$MODULES
for name in $DEPENDENCIES; do
  mod="`fix_variable_name $name`"
  if test "x$(eval echo \$HAVE_$mod)" != "x"; then
    # found via dunemodules.inc
    sort_modules "$mod"
    for mod in $MODULES; do
      M_DEPS="$M_DEPS $(eval echo \$NAME_$mod)"
    done
    MODULES=$save_MODULES
  else
    # found via pkg-config
    M_DEPS="`pkg_config_dependencies $name` $name"
  fi
  for dep in $M_DEPS; do
      CHECK="$CHECK [$dep]"
  done
done
set +x
make_unique "$CHECK"

# insert , between modules
j=0
for dep in $UNIQUE_WORDS; do
if [ "$j" = "0" ]; then
      CHECK="$dep"
      j=1
    else
      CHECK="$CHECK, $dep"
    fi
done

echo "------------------------------------------"
echo "writing initial files:"

# we need the module with _ instead of - to not confuse automake
fix_and_assign CMODULE $MODULE
NAME=`echo $PROJECT | sed -e 's/dune[_-]//' | tr '-' '_'`

################## CONFIGURE.AC ##################
echo "- $PROJECT/configure.ac"
cat > "$PROJECT/configure.ac" <<C_DELIM
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
DUNE_AC_INIT # gets module version from dune.module file
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/$CMODULE.cc])
AC_CONFIG_HEADERS([config.h])


# we need no more than the standard DE-stuff
# this module depends on $DEPENDENCIES
# this implies checking for $CHECK
DUNE_CHECK_ALL

# implicitly set the Dune-flags everywhere
AC_SUBST(AM_CPPFLAGS, \$DUNE_CPPFLAGS)
AC_SUBST(AM_LDFLAGS, \$DUNE_LDFLAGS)
LIBS="\$DUNE_LIBS"

AC_CONFIG_FILES([
  Makefile
  src/Makefile
  doc/Makefile
  doc/doxygen/Makefile
  doc/doxygen/Doxyfile
  dune/Makefile
  dune/$NAME/Makefile
  m4/Makefile
  $MODULE.pc
])
AC_OUTPUT
# finally print the summary information
DUNE_SUMMARY_ALL
C_DELIM

################## README ##################
echo "- $PROJECT/README"
cat > "$PROJECT/README" <<R_DELIM
Preparing the Sources
=========================

Additional to the software mentioned in README you'll need the
following programs installed on your system:

  automake >= 1.5

  autoconf >= 2.50

  libtool

Getting started
---------------

If these preliminaries are met, you should run 

  dunecontrol all

which will find all installed dune modules as well as all dune modules 
(not installed) which sources reside in a subdirectory of the current 
directory. Note that if dune is not installed properly you will either
have to add the directory where the dunecontrol script resides (probably 
./dune-common/bin) to your path or specify the relative path of the script.

On your project and all uninstalled DUNE source modules found the script 
will then calls the GNU autoconf/automake to create a ./configure-script 
and the Makefiles. Afterwards that configure script will be called and the
modules will be build using make all

Most probably you'll have to provide additional information to dunecontrol 
(e. g. compilers, configure options) and/or make options. 

The most convenient way is to use options files in this case. The files
defining three variables:

AUTOGEN_FLAGS    flags passed to autogen
CONFIGURE_FLAGS  flags passed to configure
MAKE_FLAGS       flags passed to make

An example options file might look like this:

#use this options to autogen, configure and make if no other options are given
AUTOGEN_FLAGS="--ac=2.50 --ac=1.8" #Forces automake 2,50 and autoconf 1.8
CONFIGURE_FLAGS="CXX=g++-3.4 --prefix=/install/path" #force g++-3.4 as compiler
MAKE_FLAGS=install #Per default run make install instead of simply make

If you save this information into example.opts you can path the opts file to
dunecontrol via the --opts option, e. g.

  dunecontrol --opts=example.opts all

To get a full list of available configure flags just run

  dunecontrol configure --help

after running at least 
  dunecontrol autogen

More info
---------

See

     dunecontrol --help
   
for further options.


The full build-system is described in the dune-common/doc/buildsystem (SVN version) or under share/doc/dune-common/buildsystem if you installed DUNE!

\$Id: duneproject 7127 2013-02-15 12:22:40Z mblatt $

R_DELIM

################## MAKEFILE.AM ##################
DISTCHECK_CONFIGURE_FLAGS=
for name in $DEPENDENCIES; do
  capital=`echo $name | tr '[a-z-]' '[A-Z_]'`
  DISTCHECK_CONFIGURE_FLAGS=$DISTCHECK_CONFIGURE_FLAGS"--with-${name}=\$(${capital}_ROOT) "
done
echo "- $PROJECT/Makefile.am"
cat> "$PROJECT/Makefile.am" << M_DELIM
# \$Id: duneproject 7127 2013-02-15 12:22:40Z mblatt $

# we need the module file to be able to build via dunecontrol
EXTRA_DIST=dune.module

SUBDIRS = src m4 dune doc

if BUILD_DOCS
# TODO: set up documentation tree automatically
#SUBDIRS += doc
endif

# don't follow the full GNU-standard
# we need automake 1.5
AUTOMAKE_OPTIONS = foreign 1.5

# pass most important options when "make distcheck" is used
DISTCHECK_CONFIGURE_FLAGS = $DISTCHECK_CONFIGURE_FLAGS CXX="\$(CXX)" CC="\$(CC)"

include \$(top_srcdir)/am/top-rules
include \$(top_srcdir)/am/global-rules

M_DELIM

################## STAMP-VC ##################
echo "- $PROJECT/stamp-vc"
echo 'A stamp file to signify that this directory comes from a version control system, not an unpacked tarball' > $PROJECT/stamp-vc

################## PROJECT.PC.IN ##################
echo "- $PROJECT/$MODULE.pc.in"
cat> "$PROJECT/$MODULE.pc.in" << CC_DELIM
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
CXX=@CXX@
CC=@CC@
DEPENDENCIES=@REQUIRES@

Name: @PACKAGE_NAME@
Version: @VERSION@
Description: $MODULE module
URL: http://dune-project.org/
Requires: ${DEPENDENCIES}
Libs: -L${libdir}
Cflags: -I${includedir}
CC_DELIM
echo "    Please remember to update your $PROJECT/$MODULE.pc.in,"
echo "    Description and URL are missing right now."

###############################################################
################## The source subdirectory ####################
###############################################################

mkdir "$PROJECT/src"

################## src/MAKEFILE.AM ##################

echo "- $PROJECT/src/Makefile.am"
cat> "$PROJECT/src/Makefile.am" << M_DELIM

SUBDIRS =

noinst_PROGRAMS = ${CMODULE}

${CMODULE}_SOURCES = $CMODULE.cc

${CMODULE}_CPPFLAGS = \$(AM_CPPFLAGS) \\
	\$(DUNEMPICPPFLAGS) \\
	\$(UG_CPPFLAGS) \\
	\$(AMIRAMESH_CPPFLAGS) \\
	\$(ALBERTA_CPPFLAGS) \\
	\$(ALUGRID_CPPFLAGS)
# The libraries have to be given in reverse order (most basic libraries
# last).  Also, due to some misunderstanding, a lot of libraries include the
# -L option in LDFLAGS instead of LIBS -- so we have to include the LDFLAGS
# here as well.
${CMODULE}_LDADD = \\
	\$(DUNE_LDFLAGS) \$(DUNE_LIBS) \\
	\$(ALUGRID_LDFLAGS) \$(ALUGRID_LIBS) \\
	\$(ALBERTA_LDFLAGS) \$(ALBERTA_LIBS) \\
	\$(AMIRAMESH_LDFLAGS) \$(AMIRAMESH_LIBS) \\
	\$(UG_LDFLAGS) \$(UG_LIBS) \\
	\$(DUNEMPILIBS)	\\
	\$(LDADD)
${CMODULE}_LDFLAGS = \$(AM_LDFLAGS) \\
	\$(DUNEMPILDFLAGS) \\
	\$(UG_LDFLAGS) \\
	\$(AMIRAMESH_LDFLAGS) \\
	\$(ALBERTA_LDFLAGS) \\
	\$(ALUGRID_LDFLAGS) \\
	\$(DUNE_LDFLAGS)

# don't follow the full GNU-standard
# we need automake 1.5
AUTOMAKE_OPTIONS = foreign 1.5

# pass most important options when "make distcheck" is used
DISTCHECK_CONFIGURE_FLAGS = $DISTCHECK_CONFIGURE_FLAGS CXX="\$(CXX)" CC="\$(CC)"

include \$(top_srcdir)/am/global-rules

M_DELIM

################## PROJECT.CC ##################
echo "- $PROJECT/src/$CMODULE.cc"
cat> "$PROJECT/src/$CMODULE.cc" << CC_DELIM
#ifdef HAVE_CONFIG_H
# include "config.h"     
#endif
#include <iostream>
#include"dune/common/mpihelper.hh" // An initializer of MPI
#include"dune/common/exceptions.hh" // We use exceptions

int main(int argc, char** argv)
{
  try{
    //Maybe initialize Mpi
    Dune::MPIHelper& helper = Dune::MPIHelper::instance(argc, argv);
    std::cout << "Hello World! This is ${PROJECT}." << std::endl;
    if(Dune::MPIHelper::isFake)
      std::cout<< "This is a sequential program." << std::endl;
    else
      std::cout<<"I am rank "<<helper.rank()<<" of "<<helper.size()
        <<" processes!"<<std::endl;
    return 0;
  }
  catch (Dune::Exception &e){
    std::cerr << "Dune reported error: " << e << std::endl;
  }
  catch (...){
    std::cerr << "Unknown exception thrown!" << std::endl;
  }
}
CC_DELIM

################## M4/MAKEFILE ####################
mkdir "$PROJECT/m4"
echo "- $PROJECT/m4/Makefile.am"
cat> "$PROJECT/m4/Makefile.am" << CC_DELIM
M4FILES = $MODULE.m4

aclocaldir = \$(datadir)/aclocal
aclocal_DATA = \$(M4FILES)

EXTRA_DIST = \$(M4FILES)

include \$(top_srcdir)/am/global-rules
CC_DELIM

################## M4/PROJECT.M4 ####################
M4_MODULE=`echo $MODULE | tr '[a-z-]' '[A-Z_]'`
echo "- $PROJECT/m4/$MODULE.m4"
cat> "$PROJECT/m4/$MODULE.m4" << CC_DELIM
dnl -*- autoconf -*-
# Macros needed to find $MODULE and dependent libraries.  They are called by
# the macros in \${top_src_dir}/dependencies.m4, which is generated by
# "dunecontrol autogen"

# Additional checks needed to build $MODULE
# This macro should be invoked by every module which depends on $MODULE, as
# well as by $MODULE itself
AC_DEFUN([${M4_MODULE}_CHECKS])

# Additional checks needed to find $MODULE
# This macro should be invoked by every module which depends on $MODULE, but
# not by $MODULE itself
AC_DEFUN([${M4_MODULE}_CHECK_MODULE],
[
  DUNE_CHECK_MODULES([$MODULE],[$NAME/$NAME.hh])
])
CC_DELIM


################################################################
################## The headers subdirectory ####################
################################################################

echo "- $PROJECT/dune/$NAME"
mkdir "$PROJECT/dune"
mkdir "$PROJECT/dune/$NAME"

################## dune/Makefile.am ####################
echo "- $PROJECT/dune/Makefile.am"
cat> $PROJECT/dune/Makefile.am <<EOF
SUBDIRS = $NAME

include \$(top_srcdir)/am/global-rules
EOF

################## dune/$NAME/Makefile.am ##############
echo "- $PROJECT/dune/$NAME/Makefile.am"
cat> $PROJECT/dune/$NAME/Makefile.am <<EOF
${NAME}includedir = \$(includedir)/dune/${NAME}
${NAME}include_HEADERS = ${NAME}.hh

include \$(top_srcdir)/am/global-rules
EOF

################## dune/$NAME/$NAME.hh #################
echo "- $PROJECT/dune/$NAME/$NAME.hh"
cat> $PROJECT/dune/$NAME/$NAME.hh <<EOF
#ifndef DUNE_$NAME.hh
#define DUNE_$NAME.hh

// add your classes here

#endif // DUNE_$NAME.hh
EOF


###############################################################
################## The doc subdirectory ####################
###############################################################

mkdir "$PROJECT/doc"

################## doc/Makefile.am ####################
echo "- $PROJECT/doc/Makefile.am"
cat> "$PROJECT/doc/Makefile.am" << CC_DELIM

SUBDIRS = doxygen
CURDIR = doc
BASEDIR = ..

# add list of html files to generate from wml
PAGES=

docdir=\$(datadir)/doc/${PROJECT}

include \$(top_srcdir)/am/webstuff
include \$(top_srcdir)/am/global-rules
CC_DELIM

###############################################################
############### The doc/doxygen subdirectory ##################
###############################################################

mkdir "$PROJECT/doc/doxygen"


#################### basic Doxylocal ##########################

echo "- $PROJECT/doc/doxygen/Doxylocal"
if [ "x`which doxygen`" == "x" ]; then
    echo "Doxygen is not installed! Your documentation will not work without."
fi
# Where to search and which files to use
cat> $PROJECT/doc/doxygen/Doxylocal << CC_DELIM
# This file contains local changes to the doxygen configuration
# please us '+=' to add file/directories to the lists

# The INPUT tag can be used to specify the files and/or directories that contain
# documented source files. You may enter file names like "myfile.cpp" or
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.

INPUT                 += @top_srcdir@/dune/
# see e.g. dune-grid for the examples of mainpage and modules
# INPUT                 += @srcdir@/mainpage \
#                          @srcdir@/modules

# The EXCLUDE tag can be used to specify files and/or directories that should
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.

# EXCLUDE               += @top_srcdir@/dune/$NAME/test

# The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see
# the \include command).

# EXAMPLE_PATH          += @top_srcdir@/src

# The IMAGE_PATH tag can be used to specify one or more files or
# directories that contain image that are included in the documentation (see
# the \image command).

# IMAGE_PATH            += @top_srcdir@/dune/$NAME/pics

CC_DELIM

################# doc/doxygen/Makefile.am #####################

echo "- $PROJECT/doc/doxygen/Makefile.am"
cat> "$PROJECT/doc/doxygen/Makefile.am" << CC_DELIM

BASEDIR=../..
CURDIR=doc/doxygen

include \$(top_srcdir)/am/doxygen
include \$(top_srcdir)/am/global-rules

CC_DELIM

## done
echo "done."
echo "------------------------------------------"
echo "For further details read the Dune Buildsystem-Howto:"
echo "http://www.dune-project.org/doc/buildsystem/buildsystem.pdf"