OSDN Git Service

Create doxgen.cfg dynamically
authorTakashi Iwai <tiwai@suse.de>
Mon, 25 Feb 2008 13:56:51 +0000 (14:56 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 25 Feb 2008 13:56:51 +0000 (14:56 +0100)
The patch from bug#3799
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3799

The "doc" target in doc/Makefile.am assumes the build directory and
the source directory are the same and fails if they differ ... this is
because the doxygen.cfg contains relative paths (such as ../) that
only work when building in the source tree

The attached patch against hg replaces all relative paths with
@top_srcdir@ and changes doxygen.cfg to a generated file so that
configure replaces @top_srcdir@ with the appropriate configure-time
path.

Assuming people like being able to do `make -f Makefile.am doc` on
an unconfigured and having it work, i added a small `test&&sed`
that'll generate an appropriate default doxygen.cfg for them.

configure.in
doc/Makefile.am
doc/doxygen.cfg [deleted file]
doc/doxygen.cfg.in [new file with mode: 0644]

index a1ebbbf..6a9a7b1 100644 (file)
@@ -575,8 +575,8 @@ if test ! -L "$srcdir"/include/alsa ; then
   ln -sf . "$srcdir"/include/alsa
 fi
 
-AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile include/Makefile
-         include/sound/Makefile src/Versions src/Makefile \
+AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
+         include/Makefile include/sound/Makefile src/Versions src/Makefile \
           src/control/Makefile src/mixer/Makefile \
          src/pcm/Makefile src/pcm/scopes/Makefile \
          src/rawmidi/Makefile src/timer/Makefile \
index d1a357e..a5896a7 100644 (file)
@@ -5,6 +5,7 @@ EXTRA_DIST=README.1st asoundrc.txt doxygen.cfg index.doxygen
 INCLUDES=-I$(top_srcdir)/include
 
 doc:
+       test -e doxygen.cfg || sed s:@top_srcdir@:..:g doxygen.cfg.in > doxygen.cfg
        doxygen doxygen.cfg
 
 doc-pack: doc
diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg
deleted file mode 100644 (file)
index 0790fd7..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-PROJECT_NAME     = "ALSA project - the C library reference"
-OUTPUT_DIRECTORY = doxygen
-GENERATE_LATEX   = NO
-GENERATE_MAN     = NO
-GENERATE_RTF    = NO
-
-CASE_SENSE_NAMES = NO
-INPUT            = index.doxygen \
-                  ../include/asoundlib.h \
-                  ../include/version.h \
-                  ../include/global.h \
-                  ../include/asoundef.h \
-                  ../include/input.h \
-                  ../include/output.h \
-                  ../include/error.h \
-                  ../include/conf.h \
-                  ../include/control.h \
-                  ../include/pcm.h \
-                  ../include/rawmidi.h \
-                  ../include/timer.h \
-                  ../include/hwdep.h \
-                  ../include/seq.h \
-                  ../include/seq_event.h \
-                  ../include/seqmid.h \
-                  ../include/seq_midi_event.h \
-                  ../include/pcm_external.h \
-                  ../include/pcm_extplug.h \
-                  ../include/pcm_ioplug.h \
-                  ../include/control_external.h \
-                  ../include/mixer.h \
-                  ../src/error.c \
-                  ../src/dlmisc.c \
-                  ../src/async.c \
-                  ../src/input.c \
-                  ../src/output.c \
-                  ../src/conf.c \
-                  ../src/confmisc.c \
-                  ../src/names.c \
-                  ../src/shmarea.c \
-                  ../src/userfile.c \
-                  ../src/control \
-                  ../src/mixer \
-                  ../src/pcm/pcm.c \
-                  ../src/pcm/pcm_mmap.c \
-                   ../src/pcm/pcm_plugin.c \
-                  ../src/pcm/pcm_hw.c \
-                  ../src/pcm/pcm_mmap_emul.c \
-                  ../src/pcm/pcm_shm.c \
-                  ../src/pcm/pcm_null.c \
-                  ../src/pcm/pcm_copy.c \
-                  ../src/pcm/pcm_linear.c \
-                  ../src/pcm/pcm_lfloat.c \
-                  ../src/pcm/pcm_mulaw.c \
-                  ../src/pcm/pcm_alaw.c \
-                  ../src/pcm/pcm_adpcm.c \
-                  ../src/pcm/pcm_route.c \
-                  ../src/pcm/pcm_rate.c \
-                  ../src/pcm/pcm_plug.c \
-                  ../src/pcm/pcm_file.c \
-                  ../src/pcm/pcm_multi.c \
-                  ../src/pcm/pcm_share.c \
-                  ../src/pcm/pcm_hooks.c \
-                  ../src/pcm/pcm_dmix.c \
-                  ../src/pcm/pcm_dshare.c \
-                  ../src/pcm/pcm_dsnoop.c \
-                  ../src/pcm/pcm_meter.c \
-                  ../src/pcm/pcm_ladspa.c \
-                  ../src/pcm/pcm_asym.c \
-                  ../src/pcm/pcm_iec958.c \
-                  ../src/pcm/pcm_softvol.c \
-                  ../src/pcm/pcm_extplug.c \
-                  ../src/pcm/pcm_ioplug.c \
-                  ../src/pcm/pcm_empty.c \
-                  ../src/pcm/pcm_misc.c \
-                  ../src/pcm/pcm_simple.c \
-                  ../src/rawmidi \
-                  ../src/timer \
-                  ../src/hwdep \
-                  ../src/seq
-EXCLUDE                 = ../src/control/control_local.h \
-                  ../src/pcm/atomic.h \
-                  ../src/pcm/interval.h \
-                  ../src/pcm/interval_inline.h \
-                  ../src/pcm/mask.h \
-                  ../src/pcm/mask_inline.h \
-                  ../src/pcm/pcm_local.h \
-                  ../src/pcm/pcm_meter.h \
-                  ../src/pcm/pcm_plugin.h \
-                  ../src/pcm/plugin_ops.h \
-                  ../src/pcm/ladspa.h \
-                  ../src/hwdep/hwdep_local.h \
-                  ../src/mixer/mixer_local.h \
-                  ../src/rawmidi/rawmidi_local.h \
-                  ../src/seq/seq_local.h
-RECURSIVE       = YES
-FILE_PATTERNS    = *.c *.h
-EXAMPLE_PATH     = ../test
-IMAGE_PATH      = pictures
-QUIET            = YES
-
-EXTRACT_ALL     = NO
-EXTRACT_STATIC  = NO
-SHOW_INCLUDE_FILES = NO
-JAVADOC_AUTOBRIEF = NO
-INHERIT_DOCS    = YES
-ENABLED_SECTIONS = ""
-MACRO_EXPANSION  = YES
-EXPAND_ONLY_PREDEF = YES
-PREDEFINED      = DOXYGEN PIC "DOC_HIDDEN" \
-                  "ATTRIBUTE_UNUSED=" \
-                  ALSA_PCM_NEW_HW_PARAMS_API \
-                  _POSIX_C_SOURCE \
-                  "use_default_symbol_version(x,y,z)=" \
-                  "link_warning(x,y)="
-
-OPTIMIZE_OUTPUT_FOR_C = YES    # doxygen 1.2.6 option
-
-#INPUT_FILTER   = inputfilter
-#FILTER_SOURCE_FILES = YES
diff --git a/doc/doxygen.cfg.in b/doc/doxygen.cfg.in
new file mode 100644 (file)
index 0000000..4f682cf
--- /dev/null
@@ -0,0 +1,119 @@
+PROJECT_NAME     = "ALSA project - the C library reference"
+OUTPUT_DIRECTORY = doxygen
+GENERATE_LATEX   = NO
+GENERATE_MAN     = NO
+GENERATE_RTF    = NO
+
+CASE_SENSE_NAMES = NO
+INPUT            = @top_srcdir@/doc/index.doxygen \
+                  @top_srcdir@/include/asoundlib.h \
+                  @top_srcdir@/include/version.h \
+                  @top_srcdir@/include/global.h \
+                  @top_srcdir@/include/asoundef.h \
+                  @top_srcdir@/include/input.h \
+                  @top_srcdir@/include/output.h \
+                  @top_srcdir@/include/error.h \
+                  @top_srcdir@/include/conf.h \
+                  @top_srcdir@/include/control.h \
+                  @top_srcdir@/include/pcm.h \
+                  @top_srcdir@/include/rawmidi.h \
+                  @top_srcdir@/include/timer.h \
+                  @top_srcdir@/include/hwdep.h \
+                  @top_srcdir@/include/seq.h \
+                  @top_srcdir@/include/seq_event.h \
+                  @top_srcdir@/include/seqmid.h \
+                  @top_srcdir@/include/seq_midi_event.h \
+                  @top_srcdir@/include/pcm_external.h \
+                  @top_srcdir@/include/pcm_extplug.h \
+                  @top_srcdir@/include/pcm_ioplug.h \
+                  @top_srcdir@/include/control_external.h \
+                  @top_srcdir@/include/mixer.h \
+                  @top_srcdir@/src/error.c \
+                  @top_srcdir@/src/dlmisc.c \
+                  @top_srcdir@/src/async.c \
+                  @top_srcdir@/src/input.c \
+                  @top_srcdir@/src/output.c \
+                  @top_srcdir@/src/conf.c \
+                  @top_srcdir@/src/confmisc.c \
+                  @top_srcdir@/src/names.c \
+                  @top_srcdir@/src/shmarea.c \
+                  @top_srcdir@/src/userfile.c \
+                  @top_srcdir@/src/control \
+                  @top_srcdir@/src/mixer \
+                  @top_srcdir@/src/pcm/pcm.c \
+                  @top_srcdir@/src/pcm/pcm_mmap.c \
+                  @top_srcdir@/src/pcm/pcm_plugin.c \
+                  @top_srcdir@/src/pcm/pcm_hw.c \
+                  @top_srcdir@/src/pcm/pcm_mmap_emul.c \
+                  @top_srcdir@/src/pcm/pcm_shm.c \
+                  @top_srcdir@/src/pcm/pcm_null.c \
+                  @top_srcdir@/src/pcm/pcm_copy.c \
+                  @top_srcdir@/src/pcm/pcm_linear.c \
+                  @top_srcdir@/src/pcm/pcm_lfloat.c \
+                  @top_srcdir@/src/pcm/pcm_mulaw.c \
+                  @top_srcdir@/src/pcm/pcm_alaw.c \
+                  @top_srcdir@/src/pcm/pcm_adpcm.c \
+                  @top_srcdir@/src/pcm/pcm_route.c \
+                  @top_srcdir@/src/pcm/pcm_rate.c \
+                  @top_srcdir@/src/pcm/pcm_plug.c \
+                  @top_srcdir@/src/pcm/pcm_file.c \
+                  @top_srcdir@/src/pcm/pcm_multi.c \
+                  @top_srcdir@/src/pcm/pcm_share.c \
+                  @top_srcdir@/src/pcm/pcm_hooks.c \
+                  @top_srcdir@/src/pcm/pcm_dmix.c \
+                  @top_srcdir@/src/pcm/pcm_dshare.c \
+                  @top_srcdir@/src/pcm/pcm_dsnoop.c \
+                  @top_srcdir@/src/pcm/pcm_meter.c \
+                  @top_srcdir@/src/pcm/pcm_ladspa.c \
+                  @top_srcdir@/src/pcm/pcm_asym.c \
+                  @top_srcdir@/src/pcm/pcm_iec958.c \
+                  @top_srcdir@/src/pcm/pcm_softvol.c \
+                  @top_srcdir@/src/pcm/pcm_extplug.c \
+                  @top_srcdir@/src/pcm/pcm_ioplug.c \
+                  @top_srcdir@/src/pcm/pcm_empty.c \
+                  @top_srcdir@/src/pcm/pcm_misc.c \
+                  @top_srcdir@/src/pcm/pcm_simple.c \
+                  @top_srcdir@/src/rawmidi \
+                  @top_srcdir@/src/timer \
+                  @top_srcdir@/src/hwdep \
+                  @top_srcdir@/src/seq
+EXCLUDE                 = @top_srcdir@/src/control/control_local.h \
+                  @top_srcdir@/src/pcm/atomic.h \
+                  @top_srcdir@/src/pcm/interval.h \
+                  @top_srcdir@/src/pcm/interval_inline.h \
+                  @top_srcdir@/src/pcm/mask.h \
+                  @top_srcdir@/src/pcm/mask_inline.h \
+                  @top_srcdir@/src/pcm/pcm_local.h \
+                  @top_srcdir@/src/pcm/pcm_meter.h \
+                  @top_srcdir@/src/pcm/pcm_plugin.h \
+                  @top_srcdir@/src/pcm/plugin_ops.h \
+                  @top_srcdir@/src/pcm/ladspa.h \
+                  @top_srcdir@/src/hwdep/hwdep_local.h \
+                  @top_srcdir@/src/mixer/mixer_local.h \
+                  @top_srcdir@/src/rawmidi/rawmidi_local.h \
+                  @top_srcdir@/src/seq/seq_local.h
+RECURSIVE       = YES
+FILE_PATTERNS    = *.c *.h
+EXAMPLE_PATH     = @top_srcdir@/test
+IMAGE_PATH      = pictures
+QUIET            = YES
+
+EXTRACT_ALL     = NO
+EXTRACT_STATIC  = NO
+SHOW_INCLUDE_FILES = NO
+JAVADOC_AUTOBRIEF = NO
+INHERIT_DOCS    = YES
+ENABLED_SECTIONS = ""
+MACRO_EXPANSION  = YES
+EXPAND_ONLY_PREDEF = YES
+PREDEFINED      = DOXYGEN PIC "DOC_HIDDEN" \
+                  "ATTRIBUTE_UNUSED=" \
+                  ALSA_PCM_NEW_HW_PARAMS_API \
+                  _POSIX_C_SOURCE \
+                  "use_default_symbol_version(x,y,z)=" \
+                  "link_warning(x,y)="
+
+OPTIMIZE_OUTPUT_FOR_C = YES    # doxygen 1.2.6 option
+
+#INPUT_FILTER   = inputfilter
+#FILTER_SOURCE_FILES = YES