Browse Source

fix install with doxygen by generating doxyfile from doxyfile.in and letting waf do most of the process

tags/v1.9.11-RC1
Karl Lindén 10 years ago
parent
commit
66c37eb9f2
2 changed files with 45 additions and 23 deletions
  1. +17
    -17
      doxyfile.in
  2. +28
    -6
      wscript

doxyfile → doxyfile.in View File

@@ -574,22 +574,22 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories # directories like "/usr/src/myproject". Separate the files or directories
# with spaces. # with spaces.


INPUT = common \
posix \
macosx \
macosx/coreaudio/ \
macosx/coremidi/ \
linux \
linux/alsa \
linux/alsarawmidi \
linux/firewire \
linux/freebob \
windows \
windows/portaudio \
windows/winmme \
solaris \
solaris/oss \
common/jack/
INPUT = @SRCDIR@/common \
@SRCDIR@/posix \
@SRCDIR@/macosx \
@SRCDIR@/macosx/coreaudio/ \
@SRCDIR@/macosx/coremidi/ \
@SRCDIR@/linux \
@SRCDIR@/linux/alsa \
@SRCDIR@/linux/alsarawmidi \
@SRCDIR@/linux/firewire \
@SRCDIR@/linux/freebob \
@SRCDIR@/windows \
@SRCDIR@/windows/portaudio \
@SRCDIR@/windows/winmme \
@SRCDIR@/solaris \
@SRCDIR@/solaris/oss \
@SRCDIR@/common/jack/


# This tag can be used to specify the character encoding of the source files # This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
@@ -789,7 +789,7 @@ GENERATE_HTML = YES
# If a relative path is entered the value of OUTPUT_DIRECTORY will be # If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `html' will be used as the default path. # put in front of it. If left blank `html' will be used as the default path.


HTML_OUTPUT =
HTML_OUTPUT = @HTML_BUILD_DIR@


# The HTML_FILE_EXTENSION tag can be used to specify the file extension for # The HTML_FILE_EXTENSION tag can be used to specify the file extension for
# each generated HTML page (for example: .htm,.php,.asp). If it is left blank # each generated HTML page (for example: .htm,.php,.asp). If it is left blank

+ 28
- 6
wscript View File

@@ -736,7 +736,34 @@ def build(bld):
#bld.add_subdirs('tests') #bld.add_subdirs('tests')


if bld.env['BUILD_DOXYGEN_DOCS'] == True: if bld.env['BUILD_DOXYGEN_DOCS'] == True:
html_build_dir = "build/default/html"
html_build_dir = bld.path.find_or_declare('html').abspath()

bld(
features = 'subst',
source = 'doxyfile.in',
target = 'doxyfile',
HTML_BUILD_DIR = html_build_dir,
SRCDIR = bld.srcnode.abspath()
)

# There are two reasons for logging to doxygen.log and using it as
# target in the build rule (rather than html_build_dir):
# (1) reduce the noise when running the build
# (2) waf has a regular file to check for a timestamp. If the directory
# is used instead waf will rebuild the doxygen target (even upon
# install).
def doxygen(task):
doxyfile = task.inputs[0].abspath()
logfile = task.outputs[0].abspath()
cmd = '%s %s &> %s' % (task.env.DOXYGEN, doxyfile, logfile)
return task.exec_command(cmd)

bld(
rule = doxygen,
source = 'doxyfile',
target = 'doxygen.log'
)

if bld.cmd == 'install': if bld.cmd == 'install':
share_dir = bld.options.destdir + bld.env['PREFIX'] + '/share/jack-audio-connection-kit' share_dir = bld.options.destdir + bld.env['PREFIX'] + '/share/jack-audio-connection-kit'
html_install_dir = share_dir + '/reference/html/' html_install_dir = share_dir + '/reference/html/'
@@ -757,11 +784,6 @@ def build(bld):
Logs.pprint('CYAN', "Removing doxygen generated documentation...") Logs.pprint('CYAN', "Removing doxygen generated documentation...")
shutil.rmtree(html_build_dir) shutil.rmtree(html_build_dir)
Logs.pprint('CYAN', "Removing doxygen generated documentation done.") Logs.pprint('CYAN', "Removing doxygen generated documentation done.")
elif bld.cmd =='build':
if not os.access(html_build_dir, os.R_OK):
os.popen(bld.env.DOXYGEN).read()
else:
Logs.pprint('CYAN', "doxygen documentation already built.")


def dist_hook(): def dist_hook():
os.remove('svnversion_regenerate.sh') os.remove('svnversion_regenerate.sh')


Loading…
Cancel
Save