C API: fix docs build after rebase

This commit is contained in:
José Luis Lafuente 2024-01-09 22:51:39 +01:00 committed by José Luis Lafuente
parent 92dacec0e4
commit 24604d024a
No known key found for this signature in database
GPG Key ID: 8A3455EBE455489A
7 changed files with 23 additions and 18 deletions

View File

@ -129,3 +129,12 @@ internal-api-html:
@echo "Internal API docs are disabled. Configure with '--enable-internal-api-docs', or avoid calling 'make internal-api-html'." @echo "Internal API docs are disabled. Configure with '--enable-internal-api-docs', or avoid calling 'make internal-api-html'."
@exit 1 @exit 1
endif endif
ifeq ($(ENABLE_EXTERNAL_API_DOCS), yes)
$(eval $(call include-sub-makefile, doc/external-api/local.mk))
else
.PHONY: external-api-html
external-api-html:
@echo "External API docs are disabled. Configure with '--enable-external-api-docs', or avoid calling 'make external-api-html'."
@exit 1
endif

View File

@ -12,6 +12,7 @@ ENABLE_BUILD = @ENABLE_BUILD@
ENABLE_DOC_GEN = @ENABLE_DOC_GEN@ ENABLE_DOC_GEN = @ENABLE_DOC_GEN@
ENABLE_FUNCTIONAL_TESTS = @ENABLE_FUNCTIONAL_TESTS@ ENABLE_FUNCTIONAL_TESTS = @ENABLE_FUNCTIONAL_TESTS@
ENABLE_INTERNAL_API_DOCS = @ENABLE_INTERNAL_API_DOCS@ ENABLE_INTERNAL_API_DOCS = @ENABLE_INTERNAL_API_DOCS@
ENABLE_EXTERNAL_API_DOCS = @ENABLE_EXTERNAL_API_DOCS@
ENABLE_S3 = @ENABLE_S3@ ENABLE_S3 = @ENABLE_S3@
ENABLE_UNIT_TESTS = @ENABLE_UNIT_TESTS@ ENABLE_UNIT_TESTS = @ENABLE_UNIT_TESTS@
GTEST_LIBS = @GTEST_LIBS@ GTEST_LIBS = @GTEST_LIBS@

View File

@ -177,6 +177,10 @@ AC_ARG_ENABLE(internal-api-docs, AS_HELP_STRING([--enable-internal-api-docs],[Bu
ENABLE_INTERNAL_API_DOCS=$enableval, ENABLE_INTERNAL_API_DOCS=no) ENABLE_INTERNAL_API_DOCS=$enableval, ENABLE_INTERNAL_API_DOCS=no)
AC_SUBST(ENABLE_INTERNAL_API_DOCS) AC_SUBST(ENABLE_INTERNAL_API_DOCS)
AC_ARG_ENABLE(external-api-docs, AS_HELP_STRING([--enable-external-api-docs],[Build API docs for Nix's external unstable C interfaces]),
ENABLE_EXTERNAL_API_DOCS=$enableval, ENABLE_EXTERNAL_API_DOCS=no)
AC_SUBST(ENABLE_EXTERNAL_API_DOCS)
AS_IF( AS_IF(
[test "$ENABLE_FUNCTIONAL_TESTS" == "yes" || test "$ENABLE_DOC_GEN" == "yes"], [test "$ENABLE_FUNCTIONAL_TESTS" == "yes" || test "$ENABLE_DOC_GEN" == "yes"],
[NEED_PROG(jq, jq)]) [NEED_PROG(jq, jq)])

View File

@ -1,19 +1,7 @@
.PHONY: external-api-html
ifeq ($(external_api_docs), yes)
$(docdir)/external-api/html/index.html $(docdir)/external-api/latex: $(d)/doxygen.cfg $(docdir)/external-api/html/index.html $(docdir)/external-api/latex: $(d)/doxygen.cfg
mkdir -p $(docdir)/external-api mkdir -p $(docdir)/external-api
{ cat $< ; echo "OUTPUT_DIRECTORY=$(docdir)/external-api" ; } | doxygen - { cat $< ; echo "OUTPUT_DIRECTORY=$(docdir)/external-api" ; } | doxygen -
# Generate the HTML API docs for Nix's unstable external interfaces. # Generate the HTML API docs for Nix's unstable C bindings
.PHONY: external-api-html
external-api-html: $(docdir)/external-api/html/index.html external-api-html: $(docdir)/external-api/html/index.html
else
# Make a nicer error message
external-api-html:
@echo "External API docs are disabled. Configure with '--enable-external-api-docs', or avoid calling 'make external-api-html'."
@exit 1
endif

View File

@ -184,6 +184,9 @@ in {
./doc/manual ./doc/manual
] ++ lib.optionals enableInternalAPIDocs [ ] ++ lib.optionals enableInternalAPIDocs [
./doc/internal-api ./doc/internal-api
] ++ lib.optionals enableExternalAPIDocs [
./doc/external-api
] ++ lib.optionals (enableInternalAPIDocs || enableExternalAPIDocs) [
# Source might not be compiled, but still must be available # Source might not be compiled, but still must be available
# for Doxygen to gather comments. # for Doxygen to gather comments.
./src ./src

View File

@ -109,7 +109,7 @@ bool nix_store_is_valid_path(nix_c_context * context, Store * store, StorePath *
/** /**
* @brief Realise a Nix store path * @brief Realise a Nix store path
* *
* Blocking, calls callback once for each realisedoutput * Blocking, calls callback once for each realised output
* *
* @param[out] context Optional, stores error information * @param[out] context Optional, stores error information
* @param[in] store Nix Store reference * @param[in] store Nix Store reference