Discussion:
test project example -help with builddir configuration
dave
2013-11-16 04:35:21 UTC
Permalink
Ok to anyone who is an expert on autoconf / automake, perhaps you can
solve this.

I was having problems integrating doxygen into a complex
autoconf/automake project so I redid it with a very simple example, the
helloworld c++ example attached:

Here is my problem:

if you configure inside src directory it works and make doxygen-run (for
latex / html) produces a doxygen output.

But when i switch to a fresh build directory and then try to configure
outside the sourcedir it fails with :
[***@localhost build-hello]$ make doxygen-run
make: *** No rule to make target `../helloworld_cc-0.5/doxygen.cfg',
needed by `doxygen-doc/helloworld_cc.tag'. Stop.

how do I configure it better so it will work in a build dir as well?

Thank you ,

Dave
Peter Johansson
2013-11-18 00:24:40 UTC
Permalink
Hi Dave,
Post by dave
But when i switch to a fresh build directory and then try to configure
make: *** No rule to make target `../helloworld_cc-0.5/doxygen.cfg',
needed by `doxygen-doc/helloworld_cc.tag'. Stop.
You set @DX_CONFIG@ to $(srcdir)/doxygen.cfg but you don't have that
file, becaue you have a $(builddir)/doxygen.cfg.

Easiest is probably to change how @DX_CONFIG@ is defined, but I haven't
tested.

Hope that helps,
Peter
--
Peter Johansson
Dave Erickson
2013-11-19 00:40:58 UTC
Permalink
Interesting;

So in Oren's m4 file this is the target referenced for DX_CONFIG

# .PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL)
#
# .INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
#
# doxygen-run: @DX_DOCDIR@/@***@.tag
#
# doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
#
# @DX_DOCDIR@/@***@.tag: $(DX_CONFIG) $(pkginclude_HEADERS)
# rm -rf @DX_DOCDIR@
# $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG)

I think it calls doxygen in the process of building target PACKAGE.tag;
but it reference the srcdir relative to current.

the value of DX_CONFIG is set on the initialization command present in
configure.ac:



AC_DEFUN([DX_INIT_DOXYGEN], [

# Files:
AC_SUBST([DX_PROJECT], [$1])
AC_SUBST([DX_CONFIG], [ifelse([$2], [], Doxyfile, [$2])])
AC_SUBST([DX_DOCDIR], [ifelse([$3], [], doxygen-doc, [$3])])

I don't think changing the file name is a good idea in
DX_INIT_DOXYGEN so how would I change the target call above to make a
builddir/doxygen.cfg and then execute it?

My thought was a conditional command

# if [ "$builddir" != "$srcdir" ] ;
# $(DX_ENV) $(DX_DOXYGEN) $(builddir)/$(DX_CONFIG)
# elseif [ "$builddir" == "$srcdir" ]
# $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG)
#fi

also a conditional AC_SUBST inside configure.ac that reflects the same
choice to make a builddir config if needed but keep the doxygen.cfg
@srcdir@ since that is the location of the files under inspection
but I haven't written a script in 5 years...so forgive my ignorance.
Thoughts?

Thanks,

Dave
Post by Peter Johansson
Hi Dave,
Post by dave
But when i switch to a fresh build directory and then try to
make: *** No rule to make target `../helloworld_cc-0.5/doxygen.cfg',
needed by `doxygen-doc/helloworld_cc.tag'. Stop.
file, becaue you have a $(builddir)/doxygen.cfg.
haven't tested.
Hope that helps,
Peter
Loading...