testcases: realtime: Get rid of autotools
PATCH v2 1/1 testcases: realtime: Get rid of autotools
The autotools checks are outdated and not needed anymore.
---
Changes in v2:
Removed realtime from mk/automake.mk as well.
CI run https://github.com/metan-ucw/ltp/actions/runs/9382597033
include/mk/automake.mk | 5 -- testcases/realtime/Makefile | 64 +------------------------- testcases/realtime/configure.ac | 42 ----------------- testcases/realtime/include/librttest.h | 9 +--- testcases/realtime/lib/libstats.c | 6 --- testcases/realtime/m4/.gitignore | 1 - testcases/realtime/m4/GNUmakefile | 37 --------------- testcases/realtime/m4/Makefile.am | 1 - testcases/realtime/m4/check.m4 | 14 ------ 9 files changed, 2 insertions(+), 177 deletions(-) delete mode 100644 testcases/realtime/configure.ac delete mode 100644 testcases/realtime/m4/.gitignore delete mode 100644 testcases/realtime/m4/GNUmakefile delete mode 100644 testcases/realtime/m4/Makefile.am delete mode 100644 testcases/realtime/m4/check.m4
include/mk/automake.mk +0 -5
@@ -27,15 +27,10 @@ AUTOHEADER ?= autoheader AUTOMAKE ?= automake AUTOCONFED_SUBDIRS = \ - testcases/realtime \ testcases/open_posix_testsuite # We want to run this every single time to ensure that all of the prereq files # are there. -.PHONY: testcases/realtime/configure -testcases/realtime/configure: - $(MAKE) -C $(@D) autotools - .PHONY: testcases/open_posix_testsuite/configure testcases/open_posix_testsuite/configure: $(MAKE) -C $(@D) autotools
testcases/realtime/Makefile +1 -63
75 lines not on this page · raw message
testcases/realtime/configure.ac deleted +0 -42
42 lines not on this page · raw message
testcases/realtime/include/librttest.h +1 -8
@@ -56,7 +56,6 @@#include <time.h> #include <unistd.h> #include "list.h" -#include "realtime_config.h" extern void setup (void );extern void cleanup (int i);
@@ -113,15 +112,9 @@ extern double pass_criteria;*/ static inline int atomic_add (int i,atomic_t *v) { -/* XXX (garrcoop): only available in later versions of gcc */ -#if HAVE___SYNC_ADD_AND_FETCH return __sync_add_and_fetch (&v->counter, i); -#else -printf ("%s: %s\n" , __func__,strerror (ENOSYS )); -exit (1 ); -return -1 ; -#endif } +/* atomic_inc: atomically increment the integer passed by reference */ static inline int atomic_inc (atomic_t *v)
testcases/realtime/lib/libstats.c +0 -6
@@ -46,12 +46,6 @@#include <libstats.h> #include <librttest.h> -#include "../include/realtime_config.h" - -#ifndef HAVE_EXP10 -# define exp10 (x) (exp((x) * log(10))) -#endif -int save_stats =0 ;/* static helper functions */
testcases/realtime/m4/.gitignore deleted +0 -1
@@ -1 +0,0 @@ -/Makefile
testcases/realtime/m4/GNUmakefile deleted +0 -37
@@ -1,37 +0,0 @@ -# -# m4 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. -# -# Ngie Cooper, July 2009 -# - -top_srcdir ?= ../../.. - -include $(top_srcdir)/include/mk/env_pre.mk - -M4MACROS := $(notdir $(wildcard *.m4)) - -INSTALL_DIR := $(datarootdir)/aclocal - -INSTALL_MODE := 00644 - -INSTALL_TARGETS := $(M4_MACROS) - -MAKE_TARGETS := - -include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/realtime/m4/Makefile.am deleted +0 -1
@@ -1 +0,0 @@ -# bogus makefile to appease automake
testcases/realtime/m4/check.m4 deleted +0 -14
@@ -1,14 +0,0 @@ -AC_DEFUN([REALTIME_CHECK_PRIO_INHERIT],[ -AC_MSG_CHECKING([for PTHREAD_PRIO_INHERIT]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include <pthread.h>]], [[int main(void) { - pthread_mutexattr_t attr; - return pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT); -}]])],[has_priority_inherit="yes"],[]) -if test "x$has_priority_inherit" = "xyes" ; then - AC_DEFINE(HAS_PRIORITY_INHERIT,1,[Define to 1 if you have PTHREAD_PRIO_INHERIT]) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi -])
Signature · 5 lines
2.44.2 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
LGTM. Thanks for cleaning up autotools
Quoted 300 lines · Cyril Hrubis
The autotools checks are outdated and not needed anymore.
CC John Stultz <[email protected]>CC Darren Hart <[email protected]>Signed-off-by Cyril Hrubis <[email protected]>---
Changes in v2:
Removed realtime from
mk/automake.mkas well.CI run https://github.com/metan-ucw/ltp/actions/runs/9382597033
include/mk/automake.mk | 5 -- testcases/realtime/Makefile | 64 +------------------------- testcases/realtime/configure.ac | 42 ----------------- testcases/realtime/include/librttest.h | 9 +--- testcases/realtime/lib/libstats.c | 6 --- testcases/realtime/m4/.gitignore | 1 - testcases/realtime/m4/GNUmakefile | 37 --------------- testcases/realtime/m4/Makefile.am | 1 - testcases/realtime/m4/check.m4 | 14 ------ 9 files changed, 2 insertions(+), 177 deletions(-)delete mode 100644 testcases/realtime/configure.ac delete mode 100644 testcases/realtime/m4/.gitignore delete mode 100644 testcases/realtime/m4/GNUmakefile delete mode 100644 testcases/realtime/m4/Makefile.am delete mode 100644 testcases/realtime/m4/check.m4
include/mk/automake.mk +0
-5@@ -27,15 +27,10 @@ AUTOHEADER ?= autoheader AUTOMAKE ?= automake AUTOCONFED_SUBDIRS = \ - testcases/realtime \ testcases/open_posix_testsuite # We want to run this every single time to ensure that all of the prereq files # are there. -.PHONY: testcases/realtime/configure -testcases/realtime/configure: - $(MAKE) -C $(@D) autotools - .PHONY: testcases/open_posix_testsuite/configure testcases/open_posix_testsuite/configure: $(MAKE) -C $(@D) autotoolstestcases/realtime/Makefile +1
-63@@ -22,74 +22,12 @@ top_srcdir ?= ../.. -# Override these variables to use non-system available tools. -ACLOCAL ?= aclocal -AUTOCONF ?= autoconf -AUTOHEADER ?= autoheader -AUTOMAKE ?= automake - include $(top_srcdir)/include/mk/env_pre.mk -# Ensure that this error / warning only applies for build targets. -# -# NOTE (garrcoop): this criterium should be in-sync with include/mk/env_pre.mk -# (minus help as that's only invoked in the top-level Makefile). -ifeq ($(filter autotools %clean .gitignore gitignore.%,$(MAKECMDGOALS)),) -include $(abs_srcdir)/config.mk -endif LIBDIR := lib -FILTER_OUT_DIRS := $(LIBDIR) m4 +FILTER_OUT_DIRS := $(LIBDIR) LIB := $(LIBDIR)/librealtime.a -# START autotools junk -AUTOGENERATED_FILES = \ - m4/Makefile - -AUTOMAKE_FILES := config.guess config.sub install-sh missing stamp-h1 - -.PHONY: autotools aclocal autoconf autoheader automake -autotools: aclocal autoconf autoheader automake - -.PHONY: ac-clean ac-distclean ac-maintainer-clean -ac-clean:: - $(RM) -rf autom4te.cache - $(RM) -f aclocal.m4 config.log config.status - $(RM) -f include/realtime_config.h include/stamp-h1 - -ac-distclean:: ac-clean -ac-maintainer-clean:: ac-distclean - $(RM) -f aclocal.m4 configure $(AUTOMAKE_FILES) m4/Makefile.in - $(RM) -f include/realtime_config.h.in - -aclocal.m4: - $(ACLOCAL) -I $(abs_srcdir)/m4 - -autoconf: configure - -include/realtime_config.h.in: configure.ac $(wildcard m4/*.m4) aclocal.m4 - $(AUTOHEADER) - -configure: configure.ac aclocal.m4 - $(AUTOCONF) -automake: $(AUTOMAKE_FILES) -$(AUTOMAKE_FILES): m4/Makefile.in -m4/Makefile.in: m4/Makefile.am aclocal.m4 - $(AUTOMAKE) -c -a - -.PHONY: autoheader -autoheader: include/realtime_config.h.in - $(AUTOHEADER) - -distclean:: %: clean ac-distclean - $(RM) -f $(AUTOGENERATED_FILES) - -maintainer-clean:: distclean ac-maintainer-clean - -$(AUTOGENERATED_FILES): $(top_builddir)/config.status - $(SHELL) $^ - -# END autotools junk - $(LIBDIR): mkdir -p "$@"testcases/realtime/configure.ac deleted +0
-42@@ -1,42 +0,0 @@ -AC_PREREQ(2.61) -AC_INIT([realtime],[realtime-20090930],[[email protected]]) -AC_CONFIG_AUX_DIR([.]) -AM_INIT_AUTOMAKE -AC_CONFIG_HEADERS([include/realtime_config.h]) -AC_CONFIG_FILES([ \ - m4/Makefile \ -]) -AC_CHECK_HEADERS_ONCE([ \ - pthread.h \ -]) -AC_CANONICAL_HOST - -AC_PROG_CC -# <= autoconf 2.61 doesn't have AC_PROG_AR, but 2.63 has it. Not sure about -# 2.62. -AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) -AC_PROG_AR -AC_PROG_RANLIB - -AC_MSG_CHECKING([for __sync_add_and_fetch gcc builtin function]) -AC_LINK_IFELSE([AC_LANG_SOURCE([ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif -#include <stdlib.h> -int main(void) { - char *c; - return __sync_add_and_fetch(c, 1); -}])],[has___sync_add_and_fetch=yes]) -if test "x$has___sync_add_and_fetch" = xyes; then - AC_DEFINE(HAVE___SYNC_ADD_AND_FETCH,1,[Define to 1 if you have the __sync_add_and_fetch gcc builtin function]) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -AC_CHECK_LIB([m], [exp10], [AC_DEFINE([HAVE_EXP10], 1, [Define to 1 if you have exp10 function])]) - -REALTIME_CHECK_PRIO_INHERIT - -AC_OUTPUTtestcases/realtime/include/librttest.h +1
-8@@ -56,7 +56,6 @@#include <time.h> #include <unistd.h> #include "list.h" -#include "realtime_config.h" extern void setup (void );extern void cleanup (int i);@@ -113,15 +112,9 @@ extern double pass_criteria;*/ static inline int atomic_add (int i,atomic_t *v) { -/* XXX (garrcoop): only available in later versions of gcc */ -#if HAVE___SYNC_ADD_AND_FETCH return __sync_add_and_fetch (&v->counter, i); -#else -printf ("%s: %s\n" , __func__,strerror (ENOSYS )); -exit (1 ); -return -1 ; -#endif } +/* atomic_inc: atomically increment the integer passed by reference */ static inline int atomic_inc (atomic_t *v)testcases/realtime/lib/libstats.c +0
-6@@ -46,12 +46,6 @@#include <libstats.h> #include <librttest.h> -#include "../include/realtime_config.h" - -#ifndef HAVE_EXP10 -# define exp10 (x) (exp((x) * log(10))) -#endif -int save_stats =0 ;/* static helper functions */ testcases/realtime/m4/.gitignore deleted +0
-1@@ -1 +0,0 @@ -/Makefiletestcases/realtime/m4/GNUmakefile deleted +0
-37@@ -1,37 +0,0 @@ -# -# m4 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. -# -# Ngie Cooper, July 2009 -# - -top_srcdir ?= ../../.. - -include $(top_srcdir)/include/mk/env_pre.mk - -M4MACROS := $(notdir $(wildcard *.m4)) - -INSTALL_DIR := $(datarootdir)/aclocal - -INSTALL_MODE := 00644 - -INSTALL_TARGETS := $(M4_MACROS) - -MAKE_TARGETS := - -include $(top_srcdir)/include/mk/generic_leaf_target.mktestcases/realtime/m4/Makefile.am deleted +0
-1@@ -1 +0,0 @@ -# bogus makefile to appease automaketestcases/realtime/m4/check.m4 deleted +0
-14@@ -1,14 +0,0 @@ -AC_DEFUN([REALTIME_CHECK_PRIO_INHERIT],[ -AC_MSG_CHECKING([for PTHREAD_PRIO_INHERIT]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include <pthread.h>]], [[int main(void) { - pthread_mutexattr_t attr; - return pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT); -}]])],[has_priority_inherit="yes"],[]) -if test "x$has_priority_inherit" = "xyes" ; then - AC_DEFINE(HAS_PRIORITY_INHERIT,1,[Define to 1 if you have PTHREAD_PRIO_INHERIT]) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi -])
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Cyril, all,
Quoted 10 lines
The autotools checks are outdated and not needed anymore.
CC John Stultz <[email protected]>CC Darren Hart <[email protected]>Signed-off-by Cyril Hrubis <[email protected]>---
Changes in v2:
Removed realtime from
mk/automake.mkas well.
Quoted 1 line
CI run https://github.com/metan-ucw/ltp/actions/runs/9382597033
Thanks!
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
V2 looks good, thanks!
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Pushed, thanks for the reviews.
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp