* [LTP] [PATCH 0/7] configure.ac and make cleanup
@ 2025-02-06 14:34 Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 1/7] realtime: Document bash and python3 dependencies Petr Vorel
` (6 more replies)
0 siblings, 7 replies; 11+ messages in thread
From: Petr Vorel @ 2025-02-06 14:34 UTC (permalink / raw)
To: ltp
Hi,
cleanup of configure.ac and make related to realtime and sphinx
makefile.
Kind regards,
Petr
Petr Vorel (7):
realtime: Document bash and python3 dependencies
configure: Ignore --with-{bash,python} knobs
doc/Makefile: Improve make targets
doc: documentation.rst: Update build instructions
.github: ci-sphinx-doc: Use make for building doc
configure: make: Add SPDX, update copyright
doc/Makefile: Add dependency on metadata/ltp.json
.github/workflows/ci-sphinx-doc.yml | 11 ++++-------
configure.ac | 17 +++++-----------
doc/Makefile | 30 +++++++++++++++++++++++++----
doc/developers/documentation.rst | 16 +++------------
include/mk/automake.mk | 24 ++++-------------------
include/mk/config-openposix.mk.in | 2 ++
include/mk/config.mk.in | 23 +++-------------------
include/mk/env_post.mk | 25 ++++--------------------
include/mk/env_pre.mk | 26 ++++---------------------
include/mk/features.mk.in | 24 ++---------------------
include/mk/functions.mk | 25 ++++--------------------
include/mk/generic_leaf_target.inc | 24 ++++-------------------
include/mk/generic_leaf_target.mk | 24 ++++-------------------
include/mk/generic_trunk_target.inc | 24 ++++-------------------
include/mk/generic_trunk_target.mk | 24 ++++-------------------
include/mk/lib.mk | 27 ++++----------------------
include/mk/man.mk | 23 +++-------------------
include/mk/module.mk | 18 ++---------------
include/mk/rules.mk | 3 +++
include/mk/sparse.mk | 2 ++
include/mk/testcases.mk | 22 ++-------------------
testcases/realtime/README | 4 +++-
22 files changed, 96 insertions(+), 322 deletions(-)
--
2.47.2
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 11+ messages in thread
* [LTP] [PATCH 1/7] realtime: Document bash and python3 dependencies
2025-02-06 14:34 [LTP] [PATCH 0/7] configure.ac and make cleanup Petr Vorel
@ 2025-02-06 14:34 ` Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 2/7] configure: Ignore --with-{bash,python} knobs Petr Vorel
` (5 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Petr Vorel @ 2025-02-06 14:34 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/realtime/README | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/testcases/realtime/README b/testcases/realtime/README
index 25c8ff3586..2ffde0a1fd 100644
--- a/testcases/realtime/README
+++ b/testcases/realtime/README
@@ -34,8 +34,10 @@ The testsuite expects glibc ("C" library) (version 2.4 onwards) and
the underlying kernel (version 2.6.18 onwards) to support
Robust and Priority Inheritance (PI) Mutexes.
+Tests are written in python3 and bash.
+
Most of the tests need the user to have a privileges that allow
-him/her to create SCHED_FIFO threads of priorities upto 99
+him/her to create SCHED_FIFO threads of priorities upto 99.
RUNNING TESTS THROUGH LTP
=========================
--
2.47.2
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [LTP] [PATCH 2/7] configure: Ignore --with-{bash,python} knobs
2025-02-06 14:34 [LTP] [PATCH 0/7] configure.ac and make cleanup Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 1/7] realtime: Document bash and python3 dependencies Petr Vorel
@ 2025-02-06 14:34 ` Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 3/7] doc/Makefile: Improve make targets Petr Vorel
` (4 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Petr Vorel @ 2025-02-06 14:34 UTC (permalink / raw)
To: ltp
9e7f5688a7 disabled requiring python and bash for realtime. Previous
commit documented the dependencies, let's ignore the configure options.
Fixes: 9e7f5688a7 ("configure.ac: Fix --with* options")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
configure.ac | 14 ++------------
include/mk/features.mk.in | 2 --
2 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/configure.ac b/configure.ac
index 6992d75ca3..afcbd1a5ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -253,15 +253,10 @@ AC_CHECK_TYPES([struct statmount],,,[#include <linux/mount.h>])
# Bash
AC_ARG_WITH([bash],
[AS_HELP_STRING([--with-bash],
- [have the Bourne Again Shell interpreter])],
+ [unused, kept for compatibility reason])],
[with_bash=$withval],
[with_bash=no]
)
-if test "x$with_bash" = xyes; then
- AC_SUBST([WITH_BASH],["yes"])
-else
- AC_SUBST([WITH_BASH],["no"])
-fi
# metadata
AC_ARG_ENABLE([metadata],
@@ -327,15 +322,10 @@ fi
# Python
AC_ARG_WITH([python],
[AS_HELP_STRING([--with-python],
- [have a python interpreter])],
+ [unused, kept for compatibility reason])],
[with_python=$withval],
[with_python=no]
)
-if test "x$with_python" = xyes; then
- AC_SUBST([WITH_PYTHON],["yes"])
-else
- AC_SUBST([WITH_PYTHON],["no"])
-fi
# TI RPC
AC_ARG_WITH([tirpc],
diff --git a/include/mk/features.mk.in b/include/mk/features.mk.in
index 2fc5230d49..0a8a405acf 100644
--- a/include/mk/features.mk.in
+++ b/include/mk/features.mk.in
@@ -25,8 +25,6 @@ WITH_EXPECT := @WITH_EXPECT@
WITH_PERL := @WITH_PERL@
-WITH_PYTHON := @WITH_PYTHON@
-
METADATA_GENERATOR := @METADATA_GENERATOR@
WITH_METADATA := @WITH_METADATA@
WITH_METADATA_HTML := @WITH_METADATA_HTML@
--
2.47.2
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [LTP] [PATCH 3/7] doc/Makefile: Improve make targets
2025-02-06 14:34 [LTP] [PATCH 0/7] configure.ac and make cleanup Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 1/7] realtime: Document bash and python3 dependencies Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 2/7] configure: Ignore --with-{bash,python} knobs Petr Vorel
@ 2025-02-06 14:34 ` Petr Vorel
2025-02-06 14:59 ` Andrea Cervesato via ltp
2025-02-06 14:34 ` [LTP] [PATCH 4/7] doc: documentation.rst: Update build instructions Petr Vorel
` (3 subsequent siblings)
6 siblings, 1 reply; 11+ messages in thread
From: Petr Vorel @ 2025-02-06 14:34 UTC (permalink / raw)
To: ltp
* add _static/syscalls.rst into clean target)
* add targets:
- .venv
- distclean target (for .venv)
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
doc/Makefile | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/doc/Makefile b/doc/Makefile
index e536e95db6..0f67721ef5 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -1,8 +1,20 @@
-all:
- sphinx-build -b html . html
+PYTHON := python3
+
+# install sphinx only if needed
+INSTALL_SPHINX := $(shell $(PYTHON) -c "import sphinx" 2>/dev/null && echo "true" || echo "pip install sphinx")
+
+.venv:
+ $(PYTHON) -m virtualenv .venv
+ . .venv/bin/activate && pip install -r requirements.txt && $(INSTALL_SPHINX)
+
+all: .venv
+ . .venv/bin/activate && sphinx-build -b html . html
spelling:
- sphinx-build -b spelling -d build/doctree . build/spelling
+ . .venv/bin/activate && sphinx-build -b spelling -d build/doctree . build/spelling
clean:
- rm -rf html/
+ rm -rf html/ _static/syscalls.rst
+
+distclean: clean
+ rm -rf .venv/
--
2.47.2
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [LTP] [PATCH 4/7] doc: documentation.rst: Update build instructions
2025-02-06 14:34 [LTP] [PATCH 0/7] configure.ac and make cleanup Petr Vorel
` (2 preceding siblings ...)
2025-02-06 14:34 ` [LTP] [PATCH 3/7] doc/Makefile: Improve make targets Petr Vorel
@ 2025-02-06 14:34 ` Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 5/7] .github: ci-sphinx-doc: Use make for building doc Petr Vorel
` (2 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Petr Vorel @ 2025-02-06 14:34 UTC (permalink / raw)
To: ltp
Makefile now supports building docs, use it.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
doc/developers/documentation.rst | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/doc/developers/documentation.rst b/doc/developers/documentation.rst
index 0cd3173fa7..ccee461379 100644
--- a/doc/developers/documentation.rst
+++ b/doc/developers/documentation.rst
@@ -11,23 +11,13 @@ and it's built on top of `Sphinx <https://www.sphinx-doc.org/en/master/>`_.
Building documentation
~~~~~~~~~~~~~~~~~~~~~~
-First of all, to build the documentation we must be sure that all dependencies
-have been installed (please check :master:`doc/requirements.txt` file). Sometimes the
-Linux distros are providing them, but the best way is to use ``virtualenv``
-command as following:
+Before building, make sure you have python3 ``virtualenv`` module installed.
.. code-block:: bash
+ make autotools
+ ./configure
cd doc
-
- # prepare virtual environment
- python3 -m virtualenv .venv
- . .venv/bin/activate
-
- pip install sphinx # usually packaged in distros
- pip install -r requirements.txt
-
- # build documentation
make
Once the procedure has been completed, documentation will be visible at
--
2.47.2
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [LTP] [PATCH 5/7] .github: ci-sphinx-doc: Use make for building doc
2025-02-06 14:34 [LTP] [PATCH 0/7] configure.ac and make cleanup Petr Vorel
` (3 preceding siblings ...)
2025-02-06 14:34 ` [LTP] [PATCH 4/7] doc: documentation.rst: Update build instructions Petr Vorel
@ 2025-02-06 14:34 ` Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 6/7] configure: make: Add SPDX, update copyright Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 7/7] doc/Makefile: Add dependency on metadata/ltp.json Petr Vorel
6 siblings, 0 replies; 11+ messages in thread
From: Petr Vorel @ 2025-02-06 14:34 UTC (permalink / raw)
To: ltp
Instead of defining commands directly run docs via make to verify it's
working.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
.github/workflows/ci-sphinx-doc.yml | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/ci-sphinx-doc.yml b/.github/workflows/ci-sphinx-doc.yml
index 9b1f4f34f8..866e349ee2 100644
--- a/.github/workflows/ci-sphinx-doc.yml
+++ b/.github/workflows/ci-sphinx-doc.yml
@@ -20,20 +20,17 @@ jobs:
with:
path: ltp
- - name: Install sphinx
+ - name: Install configure dependencies
run: |
sudo apt update
- sudo apt install python3-sphinx python3-virtualenv
+ sudo apt install autoconf make python3-virtualenv
- name: Install sphinx dependencies
run: |
- cd "$GITHUB_WORKSPACE/ltp/doc/"
- python3 -m virtualenv .venv
- . .venv/bin/activate
- pip install -r requirements.txt
+ cd "$GITHUB_WORKSPACE/ltp/"
+ make autotools && ./configure
- name: Build doc
run: |
cd "$GITHUB_WORKSPACE/ltp/doc/"
- . .venv/bin/activate
make
--
2.47.2
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [LTP] [PATCH 6/7] configure: make: Add SPDX, update copyright
2025-02-06 14:34 [LTP] [PATCH 0/7] configure.ac and make cleanup Petr Vorel
` (4 preceding siblings ...)
2025-02-06 14:34 ` [LTP] [PATCH 5/7] .github: ci-sphinx-doc: Use make for building doc Petr Vorel
@ 2025-02-06 14:34 ` Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 7/7] doc/Makefile: Add dependency on metadata/ltp.json Petr Vorel
6 siblings, 0 replies; 11+ messages in thread
From: Petr Vorel @ 2025-02-06 14:34 UTC (permalink / raw)
To: ltp
Add SPDX and copyright to few missing places or update copyright.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
configure.ac | 3 +++
doc/Makefile | 3 +++
include/mk/automake.mk | 24 ++++--------------------
include/mk/config-openposix.mk.in | 2 ++
include/mk/config.mk.in | 23 +++--------------------
include/mk/env_post.mk | 25 ++++---------------------
include/mk/env_pre.mk | 26 ++++----------------------
include/mk/features.mk.in | 22 ++--------------------
include/mk/functions.mk | 25 ++++---------------------
include/mk/generic_leaf_target.inc | 24 ++++--------------------
include/mk/generic_leaf_target.mk | 24 ++++--------------------
include/mk/generic_trunk_target.inc | 24 ++++--------------------
include/mk/generic_trunk_target.mk | 24 ++++--------------------
include/mk/lib.mk | 27 ++++-----------------------
include/mk/man.mk | 23 +++--------------------
include/mk/module.mk | 18 ++----------------
include/mk/rules.mk | 3 +++
include/mk/sparse.mk | 2 ++
include/mk/testcases.mk | 22 ++--------------------
19 files changed, 61 insertions(+), 283 deletions(-)
diff --git a/configure.ac b/configure.ac
index afcbd1a5ef..c663108a8d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,3 +1,6 @@
+# Copyright (c) Linux Test Project, 2008-2025
+# SPDX-License-Identifier: GPL-2.0-or-later
+
AC_PREREQ(2.64)
AC_INIT([ltp], [LTP_VERSION], [ltp@lists.linux.it])
AC_CONFIG_AUX_DIR([.])
diff --git a/doc/Makefile b/doc/Makefile
index 0f67721ef5..c6dadfd521 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -1,3 +1,6 @@
+# Copyright (c) Linux Test Project, 2024-2025
+# SPDX-License-Identifier: GPL-2.0-or-later
+
PYTHON := python3
# install sphinx only if needed
diff --git a/include/mk/automake.mk b/include/mk/automake.mk
index 0fa059f117..79f83a5a2e 100644
--- a/include/mk/automake.mk
+++ b/include/mk/automake.mk
@@ -1,24 +1,8 @@
-#
-# Autotools include Makefile.
-#
-# Copyright (C) 2009, Cisco Systems Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Autotools include Makefile.
+# Copyright (c) Linux Test Project, 2010-2024
+# Copyright (C) 2009, Cisco Systems Inc.
# Ngie Cooper, July 2009
-#
# Override these variables to use non-system available tools.
ACLOCAL ?= aclocal
diff --git a/include/mk/config-openposix.mk.in b/include/mk/config-openposix.mk.in
index 9a91dcb7ee..54422aec1b 100644
--- a/include/mk/config-openposix.mk.in
+++ b/include/mk/config-openposix.mk.in
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) Linux Test Project, 2016
# Parameters from the top level configure
CC= @CC@
CFLAGS+= @CFLAGS@
diff --git a/include/mk/config.mk.in b/include/mk/config.mk.in
index f6e02eaeba..baf1b414ec 100644
--- a/include/mk/config.mk.in
+++ b/include/mk/config.mk.in
@@ -1,24 +1,7 @@
-#
-# config.mk.in.
-#
-# Copyright (C) 2009, Cisco Systems Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) Linux Test Project, 2009-2024
+# Copyright (C) 2009, Cisco Systems Inc.
# Ngie Cooper, July 2009
-#
# See this page for more info about LEX*:
# http://www.gnu.org/software/hello/manual/autoconf/Particular-Programs.html
diff --git a/include/mk/env_post.mk b/include/mk/env_post.mk
index 4dd3f1e2d7..ab31da73af 100644
--- a/include/mk/env_post.mk
+++ b/include/mk/env_post.mk
@@ -1,25 +1,8 @@
-#
-# Environment post-setup Makefile.
-#
-# Copyright (c) Linux Test Project, 2009-2020
-# Copyright (c) Cisco Systems Inc., 2009
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Environment post-setup Makefile.
+# Copyright (c) Linux Test Project, 2009-2025
+# Copyright (c) Cisco Systems Inc., 2009
# Ngie Cooper, July 2009
-#
ENV_PRE_LOADED ?= $(error You must load env_pre.mk before including this file)
diff --git a/include/mk/env_pre.mk b/include/mk/env_pre.mk
index f362151675..46d6abecfb 100644
--- a/include/mk/env_pre.mk
+++ b/include/mk/env_pre.mk
@@ -1,29 +1,11 @@
-#
-# Make pre-include environment Makefile.
-#
-# Copyright (c) Linux Test Project, 2009-2020
-# Copyright (c) Cisco Systems Inc., 2009
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Make pre-include environment Makefile.
+# Copyright (c) Linux Test Project, 2009-2020
+# Copyright (c) Cisco Systems Inc., 2009
# Ngie Cooper, September 2009
#
# This Makefile must be included first. NO IF'S, AND'S, OR BUT'S.
-#
# This sets the stage for all operations required within Makefiles.
-#
ifndef ENV_PRE_LOADED
ENV_PRE_LOADED = 1
diff --git a/include/mk/features.mk.in b/include/mk/features.mk.in
index 0a8a405acf..3af74002b6 100644
--- a/include/mk/features.mk.in
+++ b/include/mk/features.mk.in
@@ -1,24 +1,6 @@
-#
-# features.mk.in - feature tuning include Makefile.
-#
-# Copyright (C) 2010, Linux Test Project.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
+# Copyright (c) Linux Test Project, 2008-2025
+# SPDX-License-Identifier: GPL-2.0-or-later
# Ngie Cooper, October 2010
-#
# Tools enable knobs
WITH_EXPECT := @WITH_EXPECT@
diff --git a/include/mk/functions.mk b/include/mk/functions.mk
index e86dbccdc0..60dbed395e 100644
--- a/include/mk/functions.mk
+++ b/include/mk/functions.mk
@@ -1,25 +1,8 @@
-#
-# A Makefile with a collection of reusable functions.
-#
-# Copyright (c) Linux Test Project, 2009-2020
-# Copyright (c) Cisco Systems Inc., 2009
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# A Makefile with a collection of reusable functions.
+# Copyright (c) Linux Test Project, 2009-2020
+# Copyright (c) Cisco Systems Inc., 2009
# Ngie Cooper, July 2009
-#
# Generate an install rule which also creates the install directory if needed
# to avoid unnecessary bourne shell based for-loops and install errors, as well
diff --git a/include/mk/generic_leaf_target.inc b/include/mk/generic_leaf_target.inc
index 565a282bb3..7c685fea76 100644
--- a/include/mk/generic_leaf_target.inc
+++ b/include/mk/generic_leaf_target.inc
@@ -1,24 +1,8 @@
-#
-# Generic leaf rules include Makefile.
-#
-# Copyright (C) 2009, Cisco Systems Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Generic leaf rules include Makefile.
+# Copyright (c) Linux Test Project, 2017-2022
+# Copyright (C) 2009, Cisco Systems Inc.
# Ngie Cooper, July 2009
-#
#
# generic_leaf_target
diff --git a/include/mk/generic_leaf_target.mk b/include/mk/generic_leaf_target.mk
index 908d0b0004..c200803b55 100644
--- a/include/mk/generic_leaf_target.mk
+++ b/include/mk/generic_leaf_target.mk
@@ -1,24 +1,8 @@
-#
-# Generic leaf include Makefile.
-#
-# Copyright (C) 2009, Cisco Systems Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Generic leaf include Makefile.
+# Copyright (c) Linux Test Project, 2017
+# Copyright (C) 2009, Cisco Systems Inc.
# Ngie Cooper, July 2009
-#
include $(top_srcdir)/include/mk/env_post.mk
include $(top_srcdir)/include/mk/generic_leaf_target.inc
diff --git a/include/mk/generic_trunk_target.inc b/include/mk/generic_trunk_target.inc
index 82aece7c02..f9db7896a9 100644
--- a/include/mk/generic_trunk_target.inc
+++ b/include/mk/generic_trunk_target.inc
@@ -1,24 +1,8 @@
-#
-# Generic trunk rules include Makefile.
-#
-# Copyright (C) 2009, Cisco Systems Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) Linux Test Project, 2010-2021
+# Generic trunk rules include Makefile.
+# Copyright (C) 2009, Cisco Systems Inc.
# Ngie Cooper, July 2009
-#
#
# generic_trunk_target
diff --git a/include/mk/generic_trunk_target.mk b/include/mk/generic_trunk_target.mk
index 576b32db39..e25f7bce24 100644
--- a/include/mk/generic_trunk_target.mk
+++ b/include/mk/generic_trunk_target.mk
@@ -1,24 +1,8 @@
-#
-# Generic trunk include Makefile.
-#
-# Copyright (C) 2009, Cisco Systems Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Generic trunk include Makefile.
+# Copyright (c) Linux Test Project, 2017
+# Copyright (C) 2009, Cisco Systems Inc.
# Ngie Cooper, July 2009
-#
include $(top_srcdir)/include/mk/env_post.mk
include $(top_srcdir)/include/mk/generic_trunk_target.inc
diff --git a/include/mk/lib.mk b/include/mk/lib.mk
index 3bf63bf9e8..cefb28c25d 100644
--- a/include/mk/lib.mk
+++ b/include/mk/lib.mk
@@ -1,27 +1,8 @@
-#
-# library include Makefile.
-#
-# Copyright (c) Linux Test Project, 2009-2020
-# Copyright (c) Cisco Systems Inc., 2009
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Ngie Cooper, July 2009
-#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) Linux Test Project, 2009-2019
# Copyright (C) Cyril Hrubis <chrubis@suse.cz> 2012
-#
+# Copyright (c) Cisco Systems Inc., 2009
+# Ngie Cooper, July 2009
# Makefile to include for libraries.
diff --git a/include/mk/man.mk b/include/mk/man.mk
index c94af61b11..a642dfb35d 100644
--- a/include/mk/man.mk
+++ b/include/mk/man.mk
@@ -1,24 +1,7 @@
-#
-# Manpage include Makefile.
-#
-# Copyright (C) 2009, Cisco Systems Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) Linux Test Project, 2010-2017
+# Copyright (C) 2009, Cisco Systems Inc.
# Ngie Cooper, July 2009
-#
ifeq ($(strip $(MANPREFIX)),)
$(error $$(MANPREFIX) not defined)
diff --git a/include/mk/module.mk b/include/mk/module.mk
index 3bb7350f1e..10914084cf 100644
--- a/include/mk/module.mk
+++ b/include/mk/module.mk
@@ -1,24 +1,10 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-#
+# Copyright (c) Linux Test Project, 2014-2021
# Author: Alexey Kodanev <alexey.kodanev@oracle.com>
#
# Include it to build kernel modules.
# REQ_VERSION_MAJOR and REQ_VERSION_PATCH must be defined beforehand.
-#
$(if $(REQ_VERSION_MAJOR),,$(error You must define REQ_VERSION_MAJOR))
$(if $(REQ_VERSION_PATCH),,$(error You must define REQ_VERSION_MINOR))
diff --git a/include/mk/rules.mk b/include/mk/rules.mk
index 517863c04b..c7da6d37f9 100644
--- a/include/mk/rules.mk
+++ b/include/mk/rules.mk
@@ -1,3 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) Linux Test Project, 2020-2022
+
target_rel_dir := $(if $(cwd_rel_from_top),$(cwd_rel_from_top)/,)
%.o: %.S
diff --git a/include/mk/sparse.mk b/include/mk/sparse.mk
index a86928393a..3390672c15 100644
--- a/include/mk/sparse.mk
+++ b/include/mk/sparse.mk
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) Linux Test Project, 2021
# Rules to make sparse tool(s) for inclusion in lib and testcases Makefiles
SPARSE_DIR:= $(abs_top_builddir)/tools/sparse
diff --git a/include/mk/testcases.mk b/include/mk/testcases.mk
index bec8d8cc47..2609535ce7 100644
--- a/include/mk/testcases.mk
+++ b/include/mk/testcases.mk
@@ -1,24 +1,6 @@
-#
-# testcases include Makefile.
-#
-# Copyright (C) 2009, Cisco Systems Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) Linux Test Project, 2009-2024
# Ngie Cooper, July 2009
-#
include $(top_srcdir)/include/mk/env_pre.mk
include $(top_srcdir)/include/mk/functions.mk
--
2.47.2
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [LTP] [PATCH 7/7] doc/Makefile: Add dependency on metadata/ltp.json
2025-02-06 14:34 [LTP] [PATCH 0/7] configure.ac and make cleanup Petr Vorel
` (5 preceding siblings ...)
2025-02-06 14:34 ` [LTP] [PATCH 6/7] configure: make: Add SPDX, update copyright Petr Vorel
@ 2025-02-06 14:34 ` Petr Vorel
2025-02-06 15:00 ` Petr Vorel
6 siblings, 1 reply; 11+ messages in thread
From: Petr Vorel @ 2025-02-06 14:34 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
NOTE: this should be applied after Andrea's work gets merged.
https://patchwork.ozlabs.org/project/ltp/patch/20250206-doc_tests_list-v5-2-52110e1421a9@suse.com/
Kind regards,
Petr
doc/Makefile | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/doc/Makefile b/doc/Makefile
index c6dadfd521..dc4cee6d3d 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -1,6 +1,10 @@
# Copyright (c) Linux Test Project, 2024-2025
# SPDX-License-Identifier: GPL-2.0-or-later
+top_srcdir ?= ..
+
+include $(top_srcdir)/include/mk/env_pre.mk
+
PYTHON := python3
# install sphinx only if needed
@@ -10,7 +14,10 @@ INSTALL_SPHINX := $(shell $(PYTHON) -c "import sphinx" 2>/dev/null && echo "true
$(PYTHON) -m virtualenv .venv
. .venv/bin/activate && pip install -r requirements.txt && $(INSTALL_SPHINX)
-all: .venv
+${abs_top_builddir}/metadata/ltp.json:
+ $(MAKE) -C ${abs_top_builddir}/metadata
+
+all: ${abs_top_builddir}/metadata/ltp.json .venv
. .venv/bin/activate && sphinx-build -b html . html
spelling:
--
2.47.2
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [LTP] [PATCH 3/7] doc/Makefile: Improve make targets
2025-02-06 14:34 ` [LTP] [PATCH 3/7] doc/Makefile: Improve make targets Petr Vorel
@ 2025-02-06 14:59 ` Andrea Cervesato via ltp
2025-02-06 15:05 ` Petr Vorel
0 siblings, 1 reply; 11+ messages in thread
From: Andrea Cervesato via ltp @ 2025-02-06 14:59 UTC (permalink / raw)
To: Petr Vorel, ltp
Hi Petr,
On 2/6/25 15:34, Petr Vorel wrote:
> * add _static/syscalls.rst into clean target)
> * add targets:
> - .venv
> - distclean target (for .venv)
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> doc/Makefile | 20 ++++++++++++++++----
> 1 file changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/doc/Makefile b/doc/Makefile
> index e536e95db6..0f67721ef5 100644
> --- a/doc/Makefile
> +++ b/doc/Makefile
> @@ -1,8 +1,20 @@
> -all:
> - sphinx-build -b html . html
> +PYTHON := python3
> +
> +# install sphinx only if needed
> +INSTALL_SPHINX := $(shell $(PYTHON) -c "import sphinx" 2>/dev/null && echo "true" || echo "pip install sphinx")
> +
> +.venv:
> + $(PYTHON) -m virtualenv .venv
> + . .venv/bin/activate && pip install -r requirements.txt && $(INSTALL_SPHINX)
> +
> +all: .venv
> + . .venv/bin/activate && sphinx-build -b html . html
>
The reason why we didn't have virtualenv dependency in the makefie is
that every distro has their own python packages as well.
virtualenv requires pip, but it's not strictly needed. For example, that
could be don't inside a container for development reasons and the venv
activation wouldn't be possible.
I would suggest to keep the previous version, without the virtualenv
dependency for this reason.
> spelling:
> - sphinx-build -b spelling -d build/doctree . build/spelling
> + . .venv/bin/activate && sphinx-build -b spelling -d build/doctree . build/spelling
>
> clean:
> - rm -rf html/
> + rm -rf html/ _static/syscalls.rst
Good idea, maybe also _static/tests.rst since we added it.
> +
> +distclean: clean
> + rm -rf .venv/
Andrea
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [LTP] [PATCH 7/7] doc/Makefile: Add dependency on metadata/ltp.json
2025-02-06 14:34 ` [LTP] [PATCH 7/7] doc/Makefile: Add dependency on metadata/ltp.json Petr Vorel
@ 2025-02-06 15:00 ` Petr Vorel
0 siblings, 0 replies; 11+ messages in thread
From: Petr Vorel @ 2025-02-06 15:00 UTC (permalink / raw)
To: ltp
Hi Andrea, Cyril,
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> NOTE: this should be applied after Andrea's work gets merged.
> https://patchwork.ozlabs.org/project/ltp/patch/20250206-doc_tests_list-v5-2-52110e1421a9@suse.com/
This actually fixes the regression (failure in CI introduced by 1bf344a3db
("doc: add tests catalog page").
I wrote it independently this week and forget to post. Therefore I put this what
turn out to be a fix at the end.
I would prefer to merge 5 commits (not having to rebase and have CI covering
actually the problem:
0c9b58e5b0 ("doc/Makefile: Add dependency on metadata/ltp.json")
9e46261aa6 ("configure: make: Add SPDX, update copyright")
cbbcb4a55f (".github: ci-sphinx-doc: Use make for building doc")
9624668a1f ("doc: documentation.rst: Update build instructions")
e59b9f8c8d ("doc/Makefile: Improve make targets")
E.g. not merging without any review besides configure and realtime changes.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [LTP] [PATCH 3/7] doc/Makefile: Improve make targets
2025-02-06 14:59 ` Andrea Cervesato via ltp
@ 2025-02-06 15:05 ` Petr Vorel
0 siblings, 0 replies; 11+ messages in thread
From: Petr Vorel @ 2025-02-06 15:05 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: ltp
> Hi Petr,
> On 2/6/25 15:34, Petr Vorel wrote:
> > * add _static/syscalls.rst into clean target)
> > * add targets:
> > - .venv
> > - distclean target (for .venv)
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> > doc/Makefile | 20 ++++++++++++++++----
> > 1 file changed, 16 insertions(+), 4 deletions(-)
> > diff --git a/doc/Makefile b/doc/Makefile
> > index e536e95db6..0f67721ef5 100644
> > --- a/doc/Makefile
> > +++ b/doc/Makefile
> > @@ -1,8 +1,20 @@
> > -all:
> > - sphinx-build -b html . html
> > +PYTHON := python3
> > +
> > +# install sphinx only if needed
> > +INSTALL_SPHINX := $(shell $(PYTHON) -c "import sphinx" 2>/dev/null && echo "true" || echo "pip install sphinx")
> > +
> > +.venv:
> > + $(PYTHON) -m virtualenv .venv
> > + . .venv/bin/activate && pip install -r requirements.txt && $(INSTALL_SPHINX)
> > +
> > +all: .venv
> > + . .venv/bin/activate && sphinx-build -b html . html
> The reason why we didn't have virtualenv dependency in the makefie is that
> every distro has their own python packages as well.
> virtualenv requires pip, but it's not strictly needed. For example, that
> could be don't inside a container for development reasons and the venv
> activation wouldn't be possible.
> I would suggest to keep the previous version, without the virtualenv
> dependency for this reason.
I hoped using virtualenv would actually help developers. Because doc/ is not
parsed by top level Makefile, therefore rpm/deb packages will not build it.
But OK, let's drop this change, I'll send v2.
Kind regards,
Petr
> > spelling:
> > - sphinx-build -b spelling -d build/doctree . build/spelling
> > + . .venv/bin/activate && sphinx-build -b spelling -d build/doctree . build/spelling
> > clean:
> > - rm -rf html/
> > + rm -rf html/ _static/syscalls.rst
> Good idea, maybe also _static/tests.rst since we added it.
Now I'll add just _static/, to be always valid. Also, change in tests does not
trigger the need of rebuild, therefore one must always run 'make clean', but I
haven't tried to figure out how to express the dependency.
Kind regards,
Petr
> > +
> > +distclean: clean
> > + rm -rf .venv/
> Andrea
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2025-02-06 15:05 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-06 14:34 [LTP] [PATCH 0/7] configure.ac and make cleanup Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 1/7] realtime: Document bash and python3 dependencies Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 2/7] configure: Ignore --with-{bash,python} knobs Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 3/7] doc/Makefile: Improve make targets Petr Vorel
2025-02-06 14:59 ` Andrea Cervesato via ltp
2025-02-06 15:05 ` Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 4/7] doc: documentation.rst: Update build instructions Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 5/7] .github: ci-sphinx-doc: Use make for building doc Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 6/7] configure: make: Add SPDX, update copyright Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 7/7] doc/Makefile: Add dependency on metadata/ltp.json Petr Vorel
2025-02-06 15:00 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox