summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorChris Dickens <christopher.a.dickens@gmail.com>2020-03-25 00:09:26 -0700
committerChris Dickens <christopher.a.dickens@gmail.com>2020-03-25 00:09:26 -0700
commit4a5540a925e47923ed20b4ea68aabe550dac976d (patch)
treef95d0db794b626a025aea4af5b91d8f3e367ef28 /doc
parent07d6d3a2a5c415fa0b819ee0bdb48565f444a58a (diff)
downloadlibusb-4a5540a925e47923ed20b4ea68aabe550dac976d.tar.gz
autotools: Fix a number of issues
Change the name of the project to be what it actually is called everywhere: libusb-1.0. This allows the public libusb.h header file to be tracked by automake through pkginclude_HEADERS. Decouple the doc directory from automake. There aren't any targets that automake understands, so the build uselessly recurses into the directory. Update the makefile targets with the correct dependencies so that the docs aren't regenerated unnecessarily. Update the doxygen config file to include the version, exclude irrelevant source files and create the output into 'api-1.0' instead of 'html'. Also fix a deprecation tag for the libusb_get_port_path() function and add Solaris to the list of supported platforms. Fix the 'dist' target. Clean up the README file to remote the GitHub Markdown and remove the .gitattributes file from the msvc directory. Add doc/libusb.png to EXTRA_DIST. Enhance the {dist,doc}-upload targets to look at the SF_USER environment variable to get the SourceForge username. This allows maintainers (like me!) to have a local username that is different from their SourceForge username. Switch the docs-upload recipe to use rsync with --delete to clean up obsolete files. Fix the Windows shared library (DLL) targets. The dependencies for the RC file were incorrect, leading to cases of missed recompilation. The 'all' rule should not be overridden, so define an 'all-local' rule when necessary. Fix the rule for running dlltool on the just generated DLL so that it only fires when the correct dependencies change and do not bother to run the rule when not building a DLL. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.am9
-rw-r--r--doc/Makefile.in22
-rw-r--r--doc/doxygen.cfg.in60
3 files changed, 32 insertions, 59 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
deleted file mode 100644
index 45f43c6..0000000
--- a/doc/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-EXTRA_DIST = doxygen.cfg.in
-
-docs: doxygen.cfg
- doxygen $^
-
-docs-upload: docs
- ln -s html api-1.0
- scp -r api-1.0 web.sourceforge.net:/home/project-web/libusb/htdocs
- rm -f api-1.0
diff --git a/doc/Makefile.in b/doc/Makefile.in
new file mode 100644
index 0000000..3d835c5
--- /dev/null
+++ b/doc/Makefile.in
@@ -0,0 +1,22 @@
+LIBUSB_SRC_DIR = @top_srcdir@/libusb
+EXCLUDED_FILES = hotplug.h libusbi.h version.h version_nano.h
+LIBUSB_SRC = $(wildcard $(LIBUSB_SRC_DIR)/*.c) $(wildcard $(LIBUSB_SRC_DIR)/*.h)
+LIBUSB_DOC_SRC = $(filter-out $(addprefix $(LIBUSB_SRC_DIR)/,$(EXCLUDED_FILES)),$(LIBUSB_SRC))
+
+docs: @DOXYGEN_HTMLDIR@
+
+@DOXYGEN_HTMLDIR@: doxygen.cfg libusb.png $(LIBUSB_DOC_SRC)
+ doxygen $<
+
+docs-upload: sfurl = web.sourceforge.net:/home/project-web/libusb/htdocs
+docs-upload: @DOXYGEN_HTMLDIR@
+ if [ -z "$$SF_USER" ]; then \
+ rsync -rv --delete $< $(sfurl); \
+ else \
+ rsync -rv --delete $< $$SF_USER@$(sfurl); \
+ fi
+
+clean:
+ rm -rf @DOXYGEN_HTMLDIR@
+
+.PHONY: clean docs docs-upload
diff --git a/doc/doxygen.cfg.in b/doc/doxygen.cfg.in
index 957e0f8..504d41c 100644
--- a/doc/doxygen.cfg.in
+++ b/doc/doxygen.cfg.in
@@ -38,7 +38,7 @@ PROJECT_NAME = libusb
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER =
+PROJECT_NUMBER = @PACKAGE_VERSION@
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -845,50 +845,7 @@ INPUT_ENCODING = UTF-8
# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice.
FILE_PATTERNS = *.c \
- *.cc \
- *.cxx \
- *.cpp \
- *.c++ \
- *.java \
- *.ii \
- *.ixx \
- *.ipp \
- *.i++ \
- *.inl \
- *.idl \
- *.ddl \
- *.odl \
- *.h \
- *.hh \
- *.hxx \
- *.hpp \
- *.h++ \
- *.cs \
- *.d \
- *.php \
- *.php4 \
- *.php5 \
- *.phtml \
- *.inc \
- *.m \
- *.markdown \
- *.md \
- *.mm \
- *.dox \
- *.py \
- *.pyw \
- *.f90 \
- *.f95 \
- *.f03 \
- *.f08 \
- *.f \
- *.for \
- *.tcl \
- *.vhd \
- *.vhdl \
- *.ucf \
- *.qsf \
- *.ice
+ *.h
# The RECURSIVE tag can be used to specify whether or not subdirectories should
# be searched for input files as well.
@@ -903,8 +860,11 @@ RECURSIVE = NO
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE = @top_srcdir@/libusb/libusbi.h \
- @top_srcdir@/libusb/hotplug.h
+EXCLUDE = @top_srcdir@/libusb/hotplug.h \
+ @top_srcdir@/libusb/libusbi.h \
+ @top_srcdir@/libusb/version.h \
+ @top_srcdir@/libusb/version_nano.h \
+ @top_srcdir@/libusb/os
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
@@ -1142,7 +1102,7 @@ GENERATE_HTML = YES
# The default directory is: html.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_OUTPUT = html
+HTML_OUTPUT = @DOXYGEN_HTMLDIR@
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
# generated HTML page (for example: .htm, .php, .asp).
@@ -2152,8 +2112,8 @@ INCLUDE_FILE_PATTERNS =
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
PREDEFINED = API_EXPORTED= \
- LIBUSB_CALL= \
- DEFAULT_VISIBILITY=
+ DEFAULT_VISIBILITY= \
+ LIBUSB_CALL=
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The