Message ID | 1428584730-9862-1-git-send-email-mike.holmes@linaro.org |
---|---|
State | Superseded |
Headers | show |
On 2015-04-09 09:05, Mike Holmes wrote: > If the examples are on the src path they pollute the documentation > with their own declarations. > > The correct mechanism is to declare the examples to be seen in the > documentation in one location that is on the .dox path, and have the > EXAMPLE_PATH locate the actual example code. > > Signed-off-by: Mike Holmes <mike.holmes@linaro.org> > --- > doc/doxygen.cfg | 2 +- > doc/examples.dox | 12 ++++++++++++ > example/generator/odp_generator.c | 6 ------ > example/packet/odp_pktio.c | 6 ------ > example/timer/odp_timer_test.c | 6 ------ > 5 files changed, 13 insertions(+), 19 deletions(-) > create mode 100644 doc/examples.dox > > diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg > index 52c83a9..34a1000 100644 > --- a/doc/doxygen.cfg > +++ b/doc/doxygen.cfg > @@ -10,7 +10,7 @@ TYPEDEF_HIDES_STRUCT = NO > EXTRACT_STATIC = YES > SORT_MEMBER_DOCS = NO > WARN_NO_PARAMDOC = YES > -INPUT = $(SRCDIR)/doc $(SRCDIR)/doc/users-guide $(SRCDIR)/include $(SRCDIR)/platform/linux-generic/include/odp $(SRCDIR)/platform/$(WITH_PLATFORM)/include/odp $(SRCDIR)/helper/include $(SRCDIR)/example/packet $(SRCDIR)/example/l2fwd $(SRCDIR)/example/generator $(SRCDIR)/example/timer > +INPUT = $(SRCDIR)/doc $(SRCDIR)/doc/users-guide $(SRCDIR)/include $(SRCDIR)/platform/linux-generic/include/odp $(SRCDIR)/platform/$(WITH_PLATFORM)/include/odp $(SRCDIR)/helper/include > FILE_PATTERNS = *.h odp*.c *.dox > RECURSIVE = YES > SOURCE_BROWSER = YES > diff --git a/doc/examples.dox b/doc/examples.dox > new file mode 100644 > index 0000000..bf3d790 > --- /dev/null > +++ b/doc/examples.dox > @@ -0,0 +1,12 @@ Missing copyright header in this file. Cheers, Anders > +/** > +@example odp_generator.c > +ODP loopback demo application > +*/ > +/** > +@example odp_pktio.c > +ODP basic packet IO loopback test application > +*/ > +/** > +@example odp_timer_test.c > +ODP timer example application > +*/ > diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c > index 2ac0b47..8ae5b29 100644 > --- a/example/generator/odp_generator.c > +++ b/example/generator/odp_generator.c > @@ -4,12 +4,6 @@ > * SPDX-License-Identifier: BSD-3-Clause > */ > > -/** > - * @file > - * > - * @example odp_generator.c ODP loopback demo application > - */ > - > /** enable strtok */ > #define _POSIX_C_SOURCE 200112L > > diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c > index 61af855..f08d9f4 100644 > --- a/example/packet/odp_pktio.c > +++ b/example/packet/odp_pktio.c > @@ -4,12 +4,6 @@ > * SPDX-License-Identifier: BSD-3-Clause > */ > > -/** > - * @file > - * > - * @example odp_pktio.c ODP basic packet IO loopback test application > - */ > - > #include <stdlib.h> > #include <string.h> > #include <getopt.h> > diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c > index 6b60ec4..acac580 100644 > --- a/example/timer/odp_timer_test.c > +++ b/example/timer/odp_timer_test.c > @@ -4,12 +4,6 @@ > * SPDX-License-Identifier: BSD-3-Clause > */ > > -/** > - * @file > - * > - * @example odp_timer_test.c ODP timer example application > - */ > - > #include <string.h> > #include <stdlib.h> > > -- > 2.1.0 >
diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg index 52c83a9..34a1000 100644 --- a/doc/doxygen.cfg +++ b/doc/doxygen.cfg @@ -10,7 +10,7 @@ TYPEDEF_HIDES_STRUCT = NO EXTRACT_STATIC = YES SORT_MEMBER_DOCS = NO WARN_NO_PARAMDOC = YES -INPUT = $(SRCDIR)/doc $(SRCDIR)/doc/users-guide $(SRCDIR)/include $(SRCDIR)/platform/linux-generic/include/odp $(SRCDIR)/platform/$(WITH_PLATFORM)/include/odp $(SRCDIR)/helper/include $(SRCDIR)/example/packet $(SRCDIR)/example/l2fwd $(SRCDIR)/example/generator $(SRCDIR)/example/timer +INPUT = $(SRCDIR)/doc $(SRCDIR)/doc/users-guide $(SRCDIR)/include $(SRCDIR)/platform/linux-generic/include/odp $(SRCDIR)/platform/$(WITH_PLATFORM)/include/odp $(SRCDIR)/helper/include FILE_PATTERNS = *.h odp*.c *.dox RECURSIVE = YES SOURCE_BROWSER = YES diff --git a/doc/examples.dox b/doc/examples.dox new file mode 100644 index 0000000..bf3d790 --- /dev/null +++ b/doc/examples.dox @@ -0,0 +1,12 @@ +/** +@example odp_generator.c +ODP loopback demo application +*/ +/** +@example odp_pktio.c +ODP basic packet IO loopback test application +*/ +/** +@example odp_timer_test.c +ODP timer example application +*/ diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c index 2ac0b47..8ae5b29 100644 --- a/example/generator/odp_generator.c +++ b/example/generator/odp_generator.c @@ -4,12 +4,6 @@ * SPDX-License-Identifier: BSD-3-Clause */ -/** - * @file - * - * @example odp_generator.c ODP loopback demo application - */ - /** enable strtok */ #define _POSIX_C_SOURCE 200112L diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c index 61af855..f08d9f4 100644 --- a/example/packet/odp_pktio.c +++ b/example/packet/odp_pktio.c @@ -4,12 +4,6 @@ * SPDX-License-Identifier: BSD-3-Clause */ -/** - * @file - * - * @example odp_pktio.c ODP basic packet IO loopback test application - */ - #include <stdlib.h> #include <string.h> #include <getopt.h> diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c index 6b60ec4..acac580 100644 --- a/example/timer/odp_timer_test.c +++ b/example/timer/odp_timer_test.c @@ -4,12 +4,6 @@ * SPDX-License-Identifier: BSD-3-Clause */ -/** - * @file - * - * @example odp_timer_test.c ODP timer example application - */ - #include <string.h> #include <stdlib.h>
If the examples are on the src path they pollute the documentation with their own declarations. The correct mechanism is to declare the examples to be seen in the documentation in one location that is on the .dox path, and have the EXAMPLE_PATH locate the actual example code. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> --- doc/doxygen.cfg | 2 +- doc/examples.dox | 12 ++++++++++++ example/generator/odp_generator.c | 6 ------ example/packet/odp_pktio.c | 6 ------ example/timer/odp_timer_test.c | 6 ------ 5 files changed, 13 insertions(+), 19 deletions(-) create mode 100644 doc/examples.dox