summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--documentation/CMakeLists.txt13
-rw-r--r--documentation/Makefile11
2 files changed, 20 insertions, 4 deletions
diff --git a/documentation/CMakeLists.txt b/documentation/CMakeLists.txt
index 415e3e707..9c97a14ea 100644
--- a/documentation/CMakeLists.txt
+++ b/documentation/CMakeLists.txt
@@ -1,7 +1,7 @@
#
# CMakeLists.txt to build docs for the FLTK project using CMake (www.cmake.org)
#
-# Copyright 1998-2022 by Bill Spitzak and others.
+# Copyright 1998-2023 by Bill Spitzak and others.
#
# This library is free software. Distribution and use rights are outlined in
# the file "COPYING" which should have been included with this file. If this
@@ -40,11 +40,13 @@ if (GENERATE_DOCS)
execute_process (COMMAND date "+%Y"
OUTPUT_VARIABLE YEAR
+ OUTPUT_STRIP_TRAILING_WHITESPACE
)
# note: current locale is used for abbreviated month
execute_process (COMMAND date "+%b %d, %Y"
OUTPUT_VARIABLE CURRENT_DATE
+ OUTPUT_STRIP_TRAILING_WHITESPACE
)
# find git revision
@@ -55,12 +57,12 @@ if (GENERATE_DOCS)
# that contains the git revision.
execute_process (COMMAND
- git --git-dir=${CMAKE_SOURCE_DIR}/.git rev-parse --short=10 HEAD
+ git --git-dir=${FLTK_SOURCE_DIR}/.git rev-parse --short=10 HEAD
OUTPUT_VARIABLE GIT_REVISION
+ OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
- # strip trailing newline from git revision
- string (REPLACE "\n" "" GIT_REVISION "${GIT_REVISION}")
+
# set to "'unkown'" if git is not available
if (GIT_REVISION STREQUAL "")
set (GIT_REVISION "'unkown'")
@@ -69,6 +71,7 @@ if (GENERATE_DOCS)
# find doxygen version
if (DOXYGEN_FOUND)
+
# strip trailing git revision if doxygen was built from source
string (REGEX REPLACE " .*$" "" DOXYGEN_VERSION_SHORT ${DOXYGEN_VERSION})
# strip trailing newline
@@ -90,6 +93,8 @@ if (GENERATE_DOCS)
)
if (0) # debug
+ fl_debug_var (YEAR)
+ fl_debug_var (CURRENT_DATE)
fl_debug_var (GIT_REVISION)
fl_debug_var (DOXYGEN_FOUND)
fl_debug_var (DOXYGEN_EXECUTABLE)
diff --git a/documentation/Makefile b/documentation/Makefile
index 245dc2ee1..20f171c80 100644
--- a/documentation/Makefile
+++ b/documentation/Makefile
@@ -138,6 +138,15 @@ uninstall-linux uninstall-osx:
# Both files are generated from the common source file Doxyfile.in.
# Note that Doxyfile.in is shared with CMake to configure these files.
+# Note: There's no way to enable the "Driver Documentation" via configure+make,
+# please use CMake 'OPTION_INCLUDE_DRIVER_DOCUMENTATION' instead.
+# Alternatively (if you really need it) edit this Makefile and
+# replace the two lines below containing "@DRIVER_DOCS@" to read:
+# -e's, @DRIVER_DOCS@, DriverDev,' \
+# (w/o leading '#') to enable the "Driver Documentation" section.
+# Please take care of copying tabs and spaces literally.
+# Note: There's no intention to enable this via configure option (use CMake).
+
Doxyfile: Doxyfile.in generated.dox copyright.dox
echo "Generating Doxyfile ..."
$(DOXYDOC) -u -s - < $< | \
@@ -145,6 +154,7 @@ Doxyfile: Doxyfile.in generated.dox copyright.dox
-e's,@GENERATE_HTML@,YES,' \
-e's,@GENERATE_LATEX@,NO,' \
-e's, @LATEX_HEADER@,,' \
+ -e's, @DRIVER_DOCS@,,' \
-e's,@CMAKE_CURRENT_SOURCE_DIR@,.,' \
-e's,@CMAKE_CURRENT_BINARY_DIR@,,' \
-e's,@FLTK_SOURCE_DIR@,..,' \
@@ -157,6 +167,7 @@ Doxybook: Doxyfile.in generated.dox copyright.dox
-e's,@GENERATE_HTML@,NO,' \
-e's,@GENERATE_LATEX@,YES,' \
-e's,@LATEX_HEADER@,src/fltk-book.tex,' \
+ -e's, @DRIVER_DOCS@,,' \
-e's,@CMAKE_CURRENT_SOURCE_DIR@,.,' \
-e's,@CMAKE_CURRENT_BINARY_DIR@,,' \
-e's,@FLTK_SOURCE_DIR@,..,' \