Skip to content

Commit 05af6f5

Browse files
committed
Add a target to generate Doxygen documentation
Relates to sebsauvage#95 Customizations for PHP/Shaarli: - add project information - index PHP files - index global functions - exclude directories Usage $ make doxygen $ firefox doxygen/index.html & Notes - classes can be found under "Data Structures" - global functions can be found under "Files > Globals > Functions" Signed-off-by: VirtualTam <virtualtam@flibidi.net>
1 parent 9b87c27 commit 05af6f5

File tree

3 files changed

+48
-28
lines changed

3 files changed

+48
-28
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ pagecache
1616
composer.lock
1717
/vendor/
1818

19-
# Ignore test data & output
19+
# Ignore development and test resources
2020
coverage
21+
doxygen
2122
tests/datastore.php
2223
tests/dummycache/
2324
phpmd.html

Doxyfile

Lines changed: 41 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
3232
# title of most generated pages and in a few other places.
3333
# The default value is: My Project.
3434

35-
PROJECT_NAME = "My Project"
35+
PROJECT_NAME = Shaarli
3636

3737
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
3838
# could be handy for archiving the generated documentation or if some version
@@ -44,21 +44,21 @@ PROJECT_NUMBER =
4444
# for a project that appears at the top of each page and should give viewer a
4545
# quick idea about the purpose of the project. Keep the description short.
4646

47-
PROJECT_BRIEF =
47+
PROJECT_BRIEF = "The personal, minimalist, super-fast, no-database delicious clone"
4848

4949
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
5050
# in the documentation. The maximum height of the logo should not exceed 55
5151
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
5252
# the logo to the output directory.
5353

54-
PROJECT_LOGO =
54+
PROJECT_LOGO = images/logo.png
5555

5656
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
5757
# into which the generated documentation will be written. If a relative path is
5858
# entered, it will be relative to the location where doxygen was started. If
5959
# left blank the current directory will be used.
6060

61-
OUTPUT_DIRECTORY =
61+
OUTPUT_DIRECTORY = .
6262

6363
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
6464
# directories (in 2 levels) under the output directory of each output format and
@@ -118,7 +118,17 @@ REPEAT_BRIEF = YES
118118
# the entity):The $name class, The $name widget, The $name file, is, provides,
119119
# specifies, contains, represents, a, an and the.
120120

121-
ABBREVIATE_BRIEF =
121+
ABBREVIATE_BRIEF = "The $name class" \
122+
"The $name widget" \
123+
"The $name file" \
124+
is \
125+
provides \
126+
specifies \
127+
contains \
128+
represents \
129+
a \
130+
an \
131+
the
122132

123133
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
124134
# doxygen will generate a detailed section even if there is only a brief
@@ -242,7 +252,7 @@ TCL_SUBST =
242252
# members will be omitted, etc.
243253
# The default value is: NO.
244254

245-
OPTIMIZE_OUTPUT_FOR_C = NO
255+
OPTIMIZE_OUTPUT_FOR_C = YES
246256

247257
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
248258
# Python sources only. Doxygen will then generate output that is more tailored
@@ -409,25 +419,25 @@ LOOKUP_CACHE_SIZE = 0
409419
# normally produced when WARNINGS is set to YES.
410420
# The default value is: NO.
411421

412-
EXTRACT_ALL = NO
422+
EXTRACT_ALL = YES
413423

414424
# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
415425
# be included in the documentation.
416426
# The default value is: NO.
417427

418-
EXTRACT_PRIVATE = NO
428+
EXTRACT_PRIVATE = YES
419429

420430
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
421431
# scope will be included in the documentation.
422432
# The default value is: NO.
423433

424-
EXTRACT_PACKAGE = NO
434+
EXTRACT_PACKAGE = YES
425435

426436
# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
427437
# included in the documentation.
428438
# The default value is: NO.
429439

430-
EXTRACT_STATIC = NO
440+
EXTRACT_STATIC = YES
431441

432442
# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
433443
# locally in source files will be included in the documentation. If set to NO,
@@ -443,7 +453,7 @@ EXTRACT_LOCAL_CLASSES = YES
443453
# included.
444454
# The default value is: NO.
445455

446-
EXTRACT_LOCAL_METHODS = NO
456+
EXTRACT_LOCAL_METHODS = YES
447457

448458
# If this flag is set to YES, the members of anonymous namespaces will be
449459
# extracted and appear in the documentation as a namespace called
@@ -452,7 +462,7 @@ EXTRACT_LOCAL_METHODS = NO
452462
# are hidden.
453463
# The default value is: NO.
454464

455-
EXTRACT_ANON_NSPACES = NO
465+
EXTRACT_ANON_NSPACES = YES
456466

457467
# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
458468
# undocumented members inside documented classes or files. If set to NO these
@@ -498,14 +508,14 @@ INTERNAL_DOCS = NO
498508
# and Mac users are advised to set this option to NO.
499509
# The default value is: system dependent.
500510

501-
CASE_SENSE_NAMES = YES
511+
CASE_SENSE_NAMES = NO
502512

503513
# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
504514
# their full class and namespace scopes in the documentation. If set to YES, the
505515
# scope will be hidden.
506516
# The default value is: NO.
507517

508-
HIDE_SCOPE_NAMES = NO
518+
HIDE_SCOPE_NAMES = YES
509519

510520
# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
511521
# append additional text to a page's title, such as Class Reference. If set to
@@ -654,7 +664,7 @@ SHOW_FILES = YES
654664
# Folder Tree View (if specified).
655665
# The default value is: YES.
656666

657-
SHOW_NAMESPACES = YES
667+
SHOW_NAMESPACES = NO
658668

659669
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
660670
# doxygen should invoke to get the current version for each file (typically from
@@ -758,7 +768,7 @@ WARN_LOGFILE =
758768
# spaces.
759769
# Note: If this tag is empty the current directory is searched.
760770

761-
INPUT =
771+
INPUT = .
762772

763773
# This tag can be used to specify the character encoding of the source files
764774
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -778,13 +788,13 @@ INPUT_ENCODING = UTF-8
778788
# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
779789
# *.qsf, *.as and *.js.
780790

781-
FILE_PATTERNS =
791+
FILE_PATTERNS = *.php
782792

783793
# The RECURSIVE tag can be used to specify whether or not subdirectories should
784794
# be searched for input files as well.
785795
# The default value is: NO.
786796

787-
RECURSIVE = NO
797+
RECURSIVE = YES
788798

789799
# The EXCLUDE tag can be used to specify files and/or directories that should be
790800
# excluded from the INPUT source files. This way you can easily exclude a
@@ -793,14 +803,18 @@ RECURSIVE = NO
793803
# Note that relative paths are relative to the directory from which doxygen is
794804
# run.
795805

796-
EXCLUDE =
806+
EXCLUDE = vendor \
807+
tpl \
808+
inc \
809+
doc \
810+
tmp
797811

798812
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
799813
# directories that are symbolic links (a Unix file system feature) are excluded
800814
# from the input.
801815
# The default value is: NO.
802816

803-
EXCLUDE_SYMLINKS = NO
817+
EXCLUDE_SYMLINKS = YES
804818

805819
# If the value of the INPUT tag contains directories, you can use the
806820
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
@@ -833,7 +847,7 @@ EXAMPLE_PATH =
833847
# *.h) to filter out the source-files in the directories. If left blank all
834848
# files are included.
835849

836-
EXAMPLE_PATTERNS =
850+
EXAMPLE_PATTERNS = *
837851

838852
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
839853
# searched for input files to be used with the \include or \dontinclude commands
@@ -907,7 +921,7 @@ USE_MDFILE_AS_MAINPAGE =
907921
# also VERBATIM_HEADERS is set to NO.
908922
# The default value is: NO.
909923

910-
SOURCE_BROWSER = NO
924+
SOURCE_BROWSER = YES
911925

912926
# Setting the INLINE_SOURCES tag to YES will include the body of functions,
913927
# classes and enums directly into the documentation.
@@ -1023,7 +1037,7 @@ GENERATE_HTML = YES
10231037
# The default directory is: html.
10241038
# This tag requires that the tag GENERATE_HTML is set to YES.
10251039

1026-
HTML_OUTPUT = html
1040+
HTML_OUTPUT = doxygen
10271041

10281042
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
10291043
# generated HTML page (for example: .htm, .php, .asp).
@@ -1370,7 +1384,7 @@ DISABLE_INDEX = NO
13701384
# The default value is: NO.
13711385
# This tag requires that the tag GENERATE_HTML is set to YES.
13721386

1373-
GENERATE_TREEVIEW = NO
1387+
GENERATE_TREEVIEW = YES
13741388

13751389
# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
13761390
# doxygen will group on one line in the generated HTML documentation.
@@ -1558,7 +1572,7 @@ EXTRA_SEARCH_MAPPINGS =
15581572
# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
15591573
# The default value is: YES.
15601574

1561-
GENERATE_LATEX = YES
1575+
GENERATE_LATEX = NO
15621576

15631577
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
15641578
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
@@ -1999,7 +2013,7 @@ EXPAND_AS_DEFINED =
19992013
# The default value is: YES.
20002014
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
20012015

2002-
SKIP_FUNCTION_MACROS = YES
2016+
SKIP_FUNCTION_MACROS = NO
20032017

20042018
#---------------------------------------------------------------------------
20052019
# Configuration options related to external references
@@ -2064,7 +2078,7 @@ PERL_PATH = /usr/bin/perl
20642078
# powerful graphs.
20652079
# The default value is: YES.
20662080

2067-
CLASS_DIAGRAMS = YES
2081+
CLASS_DIAGRAMS = NO
20682082

20692083
# You can define message sequence charts within doxygen comments using the \msc
20702084
# command. Doxygen will then run the mscgen tool (see:

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ test:
120120
clean:
121121
@git clean -df
122122

123+
### generate Doxygen documentation
124+
doxygen: clean
125+
@rm -rf doxygen
126+
@( cat Doxyfile ; echo "PROJECT_NUMBER=`git describe`" ) | doxygen -
127+
123128
### update the local copy of the documentation
124129
doc: clean
125130
@rm -rf doc

0 commit comments

Comments
 (0)