public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 0/3] Improve make
@ 2024-01-04 21:19 Petr Vorel
  2024-01-04 21:19 ` [LTP] [PATCH 1/3] Makefile: Add doc target Petr Vorel
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Petr Vorel @ 2024-01-04 21:19 UTC (permalink / raw)
  To: ltp

From: Petr Vorel <pvorel@suse.cz>

Petr Vorel (3):
  Makefile: Add doc target
  make: Delete gitignore.mk
  Makefile: Improve 'make help'

 Makefile                    | 40 +++++++++++++++++++++++++----
 include/mk/gitignore.mk     | 51 -------------------------------------
 testcases/realtime/Makefile |  1 -
 3 files changed, 35 insertions(+), 57 deletions(-)
 delete mode 100644 include/mk/gitignore.mk

-- 
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [LTP] [PATCH 1/3] Makefile: Add doc target
  2024-01-04 21:19 [LTP] [PATCH 0/3] Improve make Petr Vorel
@ 2024-01-04 21:19 ` Petr Vorel
  2024-03-18 15:56   ` Cyril Hrubis
  2024-01-04 21:19 ` [LTP] [PATCH 2/3] make: Delete gitignore.mk Petr Vorel
  2024-01-04 21:19 ` [LTP] [PATCH 3/3] Makefile: Improve 'make help' Petr Vorel
  2 siblings, 1 reply; 8+ messages in thread
From: Petr Vorel @ 2024-01-04 21:19 UTC (permalink / raw)
  To: ltp

From: Petr Vorel <pvorel@suse.cz>

Alias for metadata and docparse generation.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 Makefile | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 53f94d9f7..ee92e64ea 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0-or-later
-# Copyright (c) Linux Test Project, 2009-2022
+# Copyright (c) Linux Test Project, 2009-2024
 # Copyright (c) Cisco Systems Inc., 2009-2010
 # Ngie Cooper, July 2009
 
@@ -178,6 +178,9 @@ INSTALL_TARGETS		+= $(addprefix $(DESTDIR)/$(bindir)/,$(BINDIR_INSTALL_SCRIPTS))
 
 $(INSTALL_TARGETS): $(INSTALL_DIR) $(DESTDIR)/$(bindir)
 
+.PHONY: doc
+doc: metadata-all
+
 .PHONY: check
 check: $(CHECK_TARGETS)
 
@@ -209,7 +212,7 @@ endif
 	$(call _test,-s)
 
 test-metadata: metadata-all
-	$(MAKE) -C $(abs_srcdir)/metadata/ test
+	$(MAKE) -C $(abs_srcdir)/metadata test
 
 ## Help
 .PHONY: help
-- 
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [LTP] [PATCH 2/3] make: Delete gitignore.mk
  2024-01-04 21:19 [LTP] [PATCH 0/3] Improve make Petr Vorel
  2024-01-04 21:19 ` [LTP] [PATCH 1/3] Makefile: Add doc target Petr Vorel
@ 2024-01-04 21:19 ` Petr Vorel
  2024-03-18 15:58   ` Cyril Hrubis
  2024-01-04 21:19 ` [LTP] [PATCH 3/3] Makefile: Improve 'make help' Petr Vorel
  2 siblings, 1 reply; 8+ messages in thread
From: Petr Vorel @ 2024-01-04 21:19 UTC (permalink / raw)
  To: ltp

From: Petr Vorel <pvorel@suse.cz>

We don't use this old functionality any more.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 Makefile                    |  1 -
 include/mk/gitignore.mk     | 51 -------------------------------------
 testcases/realtime/Makefile |  1 -
 3 files changed, 53 deletions(-)
 delete mode 100644 include/mk/gitignore.mk

diff --git a/Makefile b/Makefile
index ee92e64ea..49d91f4d5 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,6 @@ top_srcdir		?= $(CURDIR)
 
 include $(top_srcdir)/include/mk/env_pre.mk
 include $(top_srcdir)/include/mk/automake.mk
-include $(top_srcdir)/include/mk/gitignore.mk
 
 .SUFFIXES:
 .SUFFIXES: .am .default .h .in .m4 .mk
diff --git a/include/mk/gitignore.mk b/include/mk/gitignore.mk
deleted file mode 100644
index 475206dcd..000000000
--- a/include/mk/gitignore.mk
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-#    gitignore generation include Makefile.
-#
-#    Copyright (C) 2011, 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.
-#
-# Ngie Cooper, January 2011
-#
-
-CLEAN_TARGETS+=		gitignore_clean
-
-BEFORE:=		.gitignore-before
-
-AFTER:=			.gitignore-after
-
-IGNORE_DIR_EXPR:=	egrep -v "^$$(echo "$(AUTOCONFED_SUBDIRS)" | tr " " "|")"
-
-# NOTE: The underscore is used in place of a dash to avoid implicit rule
-# evaluation in top-level Makefile.
-.PHONY: gitignore_clean
-gitignore_clean:
-	$(RM) -f $(BEFORE) $(AFTER)
-
-$(BEFORE):
-	$(MAKE) distclean
-	$(MAKE) ac-maintainer-clean
-	find . | $(IGNORE_DIR_EXPR) > $@
-
-$(AFTER):
-	$(MAKE) autotools
-	./configure --prefix=/dev/null
-	$(MAKE) all
-	find . | $(IGNORE_DIR_EXPR) > $@
-	# Set everything in autoconf land back to a sane state.
-	$(MAKE) distclean
-
-.gitignore: | $(BEFORE) $(AFTER)
-	diff -u $(BEFORE) $(AFTER) | grep '^+' | sed -e 's,^\+,,g' > $@
diff --git a/testcases/realtime/Makefile b/testcases/realtime/Makefile
index a7491654c..61663bfd9 100644
--- a/testcases/realtime/Makefile
+++ b/testcases/realtime/Makefile
@@ -36,7 +36,6 @@ include $(top_srcdir)/include/mk/env_pre.mk
 ifeq ($(filter autotools %clean .gitignore gitignore.%,$(MAKECMDGOALS)),)
 include $(abs_srcdir)/config.mk
 endif
-include $(top_srcdir)/include/mk/gitignore.mk
 
 LIBDIR			:= lib
 FILTER_OUT_DIRS		:= $(LIBDIR) m4
-- 
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [LTP] [PATCH 3/3] Makefile: Improve 'make help'
  2024-01-04 21:19 [LTP] [PATCH 0/3] Improve make Petr Vorel
  2024-01-04 21:19 ` [LTP] [PATCH 1/3] Makefile: Add doc target Petr Vorel
  2024-01-04 21:19 ` [LTP] [PATCH 2/3] make: Delete gitignore.mk Petr Vorel
@ 2024-01-04 21:19 ` Petr Vorel
  2024-03-18 16:06   ` Cyril Hrubis
  2 siblings, 1 reply; 8+ messages in thread
From: Petr Vorel @ 2024-01-04 21:19 UTC (permalink / raw)
  To: ltp

From: Petr Vorel <pvorel@suse.cz>

Describe most useful targets.
Exit 0 (it's not a failure to see help).

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 Makefile | 32 ++++++++++++++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 49d91f4d5..7c9d1217a 100644
--- a/Makefile
+++ b/Makefile
@@ -216,8 +216,36 @@ test-metadata: metadata-all
 ## Help
 .PHONY: help
 help:
-	@echo "Please read the Configuration section in $(top_srcdir)/INSTALL"
-	@exit 1
+	@echo 'Cleaning:'
+	@echo '  clean              - delete all files created by build'
+	@echo '  distclean          - delete all non-source files'
+	@echo '  lib-clean          - delete all files created by build in lib directory (C API library and tests)'
+	@echo '  libs-clean         - delete all files created by build in libs directory (other libraries)'
+	@echo '  testcases-clean    - delete all files created by build in testcases directory (tests)'
+	@echo
+	@echo 'Build:'
+	@echo '  all                - build everything'
+	@echo '  autotools          - preparation for configure'
+	@echo '  lib-all            - build lib directory (C API library and tests)'
+	@echo '  libs-all           - build libs directory (other libraries)'
+	@echo '  testcases-all      - build testcases and their dependencies'
+	@echo
+	@echo 'Install:'
+	@echo '  install            - install all files created by build'
+	@echo '  install-lib        - install files in lib directory (C API library and tests)'
+	@echo '  install-libs       - install files in libs directory (other libraries)'
+	@echo '  install-testcases  - install testcases'
+	@echo
+	@echo 'Documentation:'
+	@echo '  doc                - create test documentation (HTML and/or PDF, based on configuration)'
+	@echo
+	@echo 'Testing:'
+	@echo '  test               - run all tests'
+	@echo '  test-c             - run C API tests'
+	@echo '  test-metadata      - run documentation tests'
+	@echo '  test-shell         - run shell API tests'
+	@echo
+	@echo 'For more info please read the Configuration section in $(top_srcdir)/INSTALL'
 
 ## Menuconfig
 menuconfig:
-- 
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [LTP] [PATCH 1/3] Makefile: Add doc target
  2024-01-04 21:19 ` [LTP] [PATCH 1/3] Makefile: Add doc target Petr Vorel
@ 2024-03-18 15:56   ` Cyril Hrubis
  0 siblings, 0 replies; 8+ messages in thread
From: Cyril Hrubis @ 2024-03-18 15:56 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

Hi!
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [LTP] [PATCH 2/3] make: Delete gitignore.mk
  2024-01-04 21:19 ` [LTP] [PATCH 2/3] make: Delete gitignore.mk Petr Vorel
@ 2024-03-18 15:58   ` Cyril Hrubis
  2024-03-18 16:31     ` Petr Vorel
  0 siblings, 1 reply; 8+ messages in thread
From: Cyril Hrubis @ 2024-03-18 15:58 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

Hi!
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [LTP] [PATCH 3/3] Makefile: Improve 'make help'
  2024-01-04 21:19 ` [LTP] [PATCH 3/3] Makefile: Improve 'make help' Petr Vorel
@ 2024-03-18 16:06   ` Cyril Hrubis
  0 siblings, 0 replies; 8+ messages in thread
From: Cyril Hrubis @ 2024-03-18 16:06 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

Hi!
> index 49d91f4d5..7c9d1217a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -216,8 +216,36 @@ test-metadata: metadata-all
>  ## Help
>  .PHONY: help
>  help:
> -	@echo "Please read the Configuration section in $(top_srcdir)/INSTALL"
> -	@exit 1
> +	@echo 'Cleaning:'
> +	@echo '  clean              - delete all files created by build'
> +	@echo '  distclean          - delete all non-source files'
> +	@echo '  lib-clean          - delete all files created by build in lib directory (C API library and tests)'
> +	@echo '  libs-clean         - delete all files created by build in libs directory (other libraries)'
> +	@echo '  testcases-clean    - delete all files created by build in testcases directory (tests)'
> +	@echo
> +	@echo 'Build:'
> +	@echo '  all                - build everything'
> +	@echo '  autotools          - preparation for configure'
> +	@echo '  lib-all            - build lib directory (C API library and tests)'
> +	@echo '  libs-all           - build libs directory (other libraries)'
> +	@echo '  testcases-all      - build testcases and their dependencies'
> +	@echo
> +	@echo 'Install:'
> +	@echo '  install            - install all files created by build'
> +	@echo '  install-lib        - install files in lib directory (C API library and tests)'
> +	@echo '  install-libs       - install files in libs directory (other libraries)'
> +	@echo '  install-testcases  - install testcases'

I'm not sure if the sub-targets should be described in make help. I
would say to stick to a simple set of clean, distclean, autotools, all,
install, doc, check and be done with it.

> +	@echo 'Documentation:'
> +	@echo '  doc                - create test documentation (HTML and/or PDF, based on configuration)'
> +	@echo
> +	@echo 'Testing:'
> +	@echo '  test               - run all tests'
> +	@echo '  test-c             - run C API tests'
> +	@echo '  test-metadata      - run documentation tests'
> +	@echo '  test-shell         - run shell API tests'

This is way to confusing, we shouldn't mention the internal testsuite
here users will confuse that with actually running LTP tests.

We should instead probably mention the make check.

> +	@echo 'For more info please read the Configuration section in $(top_srcdir)/INSTALL'

That file should be probably updated too.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [LTP] [PATCH 2/3] make: Delete gitignore.mk
  2024-03-18 15:58   ` Cyril Hrubis
@ 2024-03-18 16:31     ` Petr Vorel
  0 siblings, 0 replies; 8+ messages in thread
From: Petr Vorel @ 2024-03-18 16:31 UTC (permalink / raw)
  To: Cyril Hrubis; +Cc: ltp

Hi Cyril,

thanks, merged this one (with first commit).

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-03-18 16:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-04 21:19 [LTP] [PATCH 0/3] Improve make Petr Vorel
2024-01-04 21:19 ` [LTP] [PATCH 1/3] Makefile: Add doc target Petr Vorel
2024-03-18 15:56   ` Cyril Hrubis
2024-01-04 21:19 ` [LTP] [PATCH 2/3] make: Delete gitignore.mk Petr Vorel
2024-03-18 15:58   ` Cyril Hrubis
2024-03-18 16:31     ` Petr Vorel
2024-01-04 21:19 ` [LTP] [PATCH 3/3] Makefile: Improve 'make help' Petr Vorel
2024-03-18 16:06   ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox