1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-30 02:12:30 +01:00

Configure: Add a maintainer option to prepare generation of HTML for the website

When the new configure option '--with-web-repo' is used, the new target
'make website' becomes available and will generate HTML pages to be placed
in the Homepage Repository.

This patch does not generate any content yet but it prepares the skeleton
to handle everything.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2021-06-05 18:19:37 +02:00
committed by Carlos R. Mafra
parent ae78e88eef
commit 351e05dca9
4 changed files with 70 additions and 0 deletions

View File

@@ -62,6 +62,10 @@ coverage:
genhtml --output-directory @lcov_output_directory@ coverage/coverage.info genhtml --output-directory @lcov_output_directory@ coverage/coverage.info
endif endif
################################################################################
# Section for the I18N processing
################################################################################
# make update-lang PO=<lang> # make update-lang PO=<lang>
# ========================== # ==========================
# Update the PO files against the POT file in all the translation sub-directories # Update the PO files against the POT file in all the translation sub-directories
@@ -87,6 +91,27 @@ endif
.PHONY: update-lang .PHONY: update-lang
################################################################################
# Section related to generating HTML content for the website
################################################################################
if WITH_WEB_REPO
SUBDIRS_WEB = doc
website:
@for subdir in $(SUBDIRS_WEB); do \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) website || exit $$?); \
done
endif
.PHONY: website
################################################################################
# Section for the automated checks
################################################################################
# Create a 'silent-rule' for our make check the same way automake does # Create a 'silent-rule' for our make check the same way automake does
AM_V_CHKOPTS = $(am__v_CHKOPTS_$(V)) AM_V_CHKOPTS = $(am__v_CHKOPTS_$(V))
am__v_CHKOPTS_ = $(am__v_CHKOPTS_$(AM_DEFAULT_VERBOSITY)) am__v_CHKOPTS_ = $(am__v_CHKOPTS_$(AM_DEFAULT_VERBOSITY))

View File

@@ -232,6 +232,18 @@ AS_IF([test "x$debug" = "xyes"],
]) ])
dnl To upload documentation to the Website
dnl ======================================
AC_ARG_WITH([web-repo],
[AS_HELP_STRING([--with-web-repo=PATH], [path to your git repository for the Web home page (maintainer stuff)])],
[AS_CASE([$withval],
[yes], [AC_MSG_ERROR([bad value '$withval' for --with-web-repo, expected a path]) ],
[no], [WEB_REPO_ROOT=""],
[WEB_REPO_ROOT=$withval])],
[WEB_REPO_ROOT=""])
WM_CHECK_WEBREPODIR
dnl Support for Nested Functions by the compiler dnl Support for Nested Functions by the compiler
dnl ============================================ dnl ============================================
WM_PROG_CC_NESTEDFUNC WM_PROG_CC_NESTEDFUNC
@@ -918,6 +930,8 @@ echo "Supported graphic format libraries :$supported_gfx"
echo "Unsupported features :$unsupported" echo "Unsupported features :$unsupported"
echo "Pango text layout support in WINGs : $pango" echo "Pango text layout support in WINGs : $pango"
echo "Translated languages to support :$supported_locales" echo "Translated languages to support :$supported_locales"
AS_IF([test "x$WEB_REPO_ROOT" != "x"],
[AS_ECHO(["Git repository for WMaker's Website : $WEB_REPO_ROOT"]) ])
AS_IF([test "x$debug" = "xyes"], AS_IF([test "x$debug" = "xyes"],
[AS_ECHO(["Debug enabled: CFLAGS = $CFLAGS"]) ]) [AS_ECHO(["Debug enabled: CFLAGS = $CFLAGS"]) ])
echo echo

View File

@@ -639,6 +639,14 @@ appropriate requirements and works with this.
Despite all this, if you think there's a use for it and feel in the mood to help, do not hesitate to Despite all this, if you think there's a use for it and feel in the mood to help, do not hesitate to
discuss on the mailing list @value{emailsupport} to get it working. discuss on the mailing list @value{emailsupport} to get it working.
@item --with-web-repo=@i{PATH}
Enable generation of HTML documentation to be uploaded to @sc{Window Maker}'s website.
The @file{@i{PATH}} is the directory where you have cloned the homepage's repository.
When enabled, the command @command{make website} generates a few HTML pages
and copy them into the specified directory, then you can commit them to publish on the web site.
You should not do that, it is handled by the development team.
@end table @end table

View File

@@ -194,6 +194,29 @@ m4_popdef([USEVAR])dnl
]) ])
# WM_CHECK_WEBREPODIR
# -------------------
#
# If the maintainer's option --with-web-repo was specified, check that the path provided is a valid
# existing directory and that it is a GIT repository that looks like Window Maker's Website repo.
AC_DEFUN_ONCE([WM_CHECK_WEBREPODIR],
[AS_IF([test "x$WEB_REPO_ROOT" != "x"],
[AS_IF([test ! -d "$WEB_REPO_ROOT"],
[AC_MSG_ERROR([The path "$with_web_repo" is not a directory, for --with-web-repo])])
# Convert to an Absolute path in the case it is not
WEB_REPO_ROOT=`cd "$WEB_REPO_ROOT" ; pwd`
AS_IF([test ! -d "$WEB_REPO_ROOT/.git"],
[AC_MSG_ERROR([The path "$WEB_REPO_ROOT" is not a GIT repository, for --with-web-repo])])
AS_IF([test ! -f "$WEB_REPO_ROOT/_config.yml"],
[AC_MSG_ERROR([The path "$WEB_REPO_ROOT" does not look like Window Maker's website repository, for --with-web-repo])])
])
AM_CONDITIONAL([WITH_WEB_REPO], [test "x$WEB_REPO_ROOT" != "x"])
AC_SUBST([WEB_REPO_ROOT])
])
# WM_FUNC_SECURE_GETENV # WM_FUNC_SECURE_GETENV
# --------------------- # ---------------------
# #