[Edited with changes in Autotools 2016...]
I tried Oren Ben-Kiki's doxygen support here and got some errors when trying doxygen generation inside a directory that wasn't source code directory because of the way it's configured. So here is my simple version:
1. inside top source dir execute:
to generate Doxyfile.
2. copy that to Doxyfile.in
3. edit Doxyfile.in with the following variables inserted where it makes sense:
Then, inside configure.ac insert:
and make sure you add the target doxygen file (it will start with doxygen.in and generate doxygen)
Then inside your Makefile.am add:
now when you
it will remove the doxygen directory.
When you
it will run doxygen and make html and latex outputs. You will need to configure other changes to the doxygen to get specific output but this will get you started fast...
I tried Oren Ben-Kiki's doxygen support here and got some errors when trying doxygen generation inside a directory that wasn't source code directory because of the way it's configured. So here is my simple version:
1. inside top source dir execute:
doxygen -g
to generate Doxyfile.
2. copy that to Doxyfile.in
3. edit Doxyfile.in with the following variables inserted where it makes sense:
PROJECT_NAME = @PACKAGE@
PROJECT_NUMBER = @VERSION@
OUTPUT_DIRECTORY = doxygendown halfway in the doxygen.in file change
INPUT = @SRC_SUBDIRS@
Then, inside configure.ac insert:
SRC_SUBDIRS = srcat the bottom of configure.ac:
# shell script to find directories
for FILE in `ls -d src/*`
do
case "$FILE" in
autom4te* ) continue ;; #
doxygen* ) continue ;; # exclude doxygen dir
*Makefile* ) continue ;; # exclude doxygen dir
m4*) continue ;; #
* )
SRC_SUBDIRS+=" $FILE"
esac
done
AC_SUBST([SRC_SUBDIRS])
and make sure you add the target doxygen file (it will start with doxygen.in and generate doxygen)
# OUTPUT STAGE
AC_CONFIG_FILES([Makefile Doxyfile])
Then inside your Makefile.am add:
EXTRA_DIST += Doxyfile.in
# simple doxygen target
dox: Doxyfile.in
doxygen Doxyfile
# clean up the extras including doxygen
clean-local:
cd ${top_srcdir}
rm -rf doxygen
now when you
make clean
it will remove the doxygen directory.
When you
make dox
it will run doxygen and make html and latex outputs. You will need to configure other changes to the doxygen to get specific output but this will get you started fast...
Simple indeed. would the target "dox" be build too when I would run "make all"?
ReplyDeleteHello Ali. Since dox is a recipe located in an automake.am directory then it could if the dependency Do xyfile.in is updated. But it isn't added directly to all: recipe. So I can give you a complicated answer: yes and no. Remember too, some autotools behavior changes with version so that complicates it further. Feeling better you asked?
ReplyDeleteMy automatic reaction to any question of autotools behavior is run it and see.