summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Small <csmall@dropbear.xyz>2022-08-29 20:28:03 +1000
committerCraig Small <csmall@dropbear.xyz>2022-08-29 20:28:03 +1000
commit47a8676625bc2204a173f7082f4270cdfe8b423f (patch)
tree2acab1825cfda76835e960657ed4ea9d637f10c0
parentdcce8038bed372141bd97126a71ceee25bf48abf (diff)
downloadprocps-ng-47a8676625bc2204a173f7082f4270cdfe8b423f.tar.gz
build-sys: Relocate lib/
test files in lib go to src/tests include/ goes to local/ lib/*.c goes to local/ Signed-off-by: Craig Small <csmall@dropbear.xyz>
-rw-r--r--.gitignore5
-rw-r--r--Makefile.am87
-rw-r--r--configure.ac2
-rw-r--r--local/Makefile.am (renamed from include/Makefile.am)0
-rw-r--r--local/c.h (renamed from include/c.h)0
-rw-r--r--local/fileutils.c (renamed from lib/fileutils.c)0
-rw-r--r--local/fileutils.h (renamed from include/fileutils.h)0
-rw-r--r--local/nls.h (renamed from include/nls.h)0
-rw-r--r--local/procio.c (renamed from lib/procio.c)0
-rw-r--r--local/procio.h (renamed from include/procio.h)0
-rw-r--r--local/rpmatch.h (renamed from include/rpmatch.h)0
-rw-r--r--local/signals.c (renamed from lib/signals.c)0
-rw-r--r--local/signals.h (renamed from include/signals.h)0
-rw-r--r--local/strutils.c (renamed from lib/strutils.c)0
-rw-r--r--local/strutils.h (renamed from include/strutils.h)0
-rw-r--r--local/strverscmp.c (renamed from lib/strverscmp.c)0
-rw-r--r--local/tests.h (renamed from include/tests.h)0
-rw-r--r--local/xalloc.h (renamed from include/xalloc.h)0
-rw-r--r--src/ps/common.h2
-rw-r--r--src/ps/display.c8
-rw-r--r--src/ps/global.c4
-rw-r--r--src/ps/output.c2
-rw-r--r--src/ps/parser.c4
-rw-r--r--src/ps/sortformat.c2
-rw-r--r--src/tests/test_fileutils.c (renamed from lib/test_fileutils.c)0
-rw-r--r--src/tests/test_process.c (renamed from lib/test_process.c)0
-rw-r--r--src/tests/test_shm.c (renamed from lib/test_shm.c)0
-rw-r--r--src/tests/test_strtod_nol.c (renamed from lib/test_strtod_nol.c)0
-rw-r--r--src/tests/test_strutils.c (renamed from lib/test_strutils.c)0
-rw-r--r--src/top/top.c6
-rw-r--r--src/top/top_nls.c2
31 files changed, 64 insertions, 60 deletions
diff --git a/.gitignore b/.gitignore
index 3cce3f8..cb085bf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -67,6 +67,11 @@ src/uptime
src/vmstat
src/w
src/watch
+src/tests/test_fileutils
+src/tests/test_process
+src/tests/test_shm
+src/tests/test_strtod_nol
+src/tests/test_strutils
*~
*.log
*.sum
diff --git a/Makefile.am b/Makefile.am
index 444f6c7..14af9a1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,8 +7,7 @@ endif
AM_CPPFLAGS = \
-include $(top_builddir)/config.h \
- -I$(top_srcdir) \
- -I$(top_srcdir)/include \
+ -I$(top_srcdir)/local \
-I$(top_srcdir)/library/include \
-Wno-unused-result \
-DLOCALEDIR=\"$(localedir)\" \
@@ -20,7 +19,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = \
- include \
+ local \
po-man \
po \
testsuite
@@ -123,7 +122,7 @@ else
usrbin_exec_PROGRAMS += src/pidof
endif
dist_man_MANS += man/pidof.1
-src_pidof_SOURCES = src/pidof.c lib/fileutils.c
+src_pidof_SOURCES = src/pidof.c local/fileutils.c
else
EXTRA_DIST += man/pidof.1
endif
@@ -136,7 +135,7 @@ else
bin_PROGRAMS += src/kill
endif
dist_man_MANS += man/kill.1
-src_kill_SOURCES = src/kill.c lib/strutils.c lib/fileutils.c lib/signals.c
+src_kill_SOURCES = src/kill.c local/strutils.c local/fileutils.c local/signals.c
src_kill_LDADD =
else
EXTRA_DIST += man/kill.1
@@ -150,7 +149,7 @@ bin_PROGRAMS += src/w
endif
dist_man_MANS += man/w.1
-src_w_SOURCES = src/w.c lib/fileutils.c
+src_w_SOURCES = src/w.c local/fileutils.c
else
EXTRA_DIST += man/w.1
endif
@@ -174,20 +173,20 @@ bin_PROGRAMS += \
src/slabtop
dist_man_MANS += \
man/slabtop.1
-src_slabtop_SOURCES = src/slabtop.c lib/strutils.c lib/fileutils.c
+src_slabtop_SOURCES = src/slabtop.c local/strutils.c local/fileutils.c
src_slabtop_LDADD = $(LDADD) @NCURSES_LIBS@
endif
-src_watch_SOURCES = src/watch.c lib/strutils.c lib/fileutils.c
+src_watch_SOURCES = src/watch.c local/strutils.c local/fileutils.c
src_watch_LDADD = @NCURSES_LIBS@ $(CYGWINFLAGS)
src_top_top_SOURCES = \
src/top/top.h \
src/top/top.c \
src/top/top_nls.h \
src/top/top_nls.c \
- lib/fileutils.c \
- lib/signals.c
+ local/fileutils.c \
+ local/signals.c
if CYGWIN
-src_top_top_SOURCES += lib/strverscmp.c
+src_top_top_SOURCES += local/strverscmp.c
endif
src_top_top_LDADD = $(LDADD) @NCURSES_LIBS@ $(DL_LIB)
@@ -203,8 +202,8 @@ usrbin_exec_PROGRAMS += \
src/skill \
src/snice
endif
-src_skill_SOURCES = src/skill.c lib/strutils.c lib/fileutils.c lib/signals.c
-src_snice_SOURCES = src/skill.c lib/strutils.c lib/fileutils.c lib/signals.c
+src_skill_SOURCES = src/skill.c local/strutils.c local/fileutils.c local/signals.c
+src_snice_SOURCES = src/skill.c local/strutils.c local/fileutils.c local/signals.c
dist_man_MANS += \
man/skill.1 \
man/snice.1
@@ -214,25 +213,25 @@ else
man/snice.1
endif
-src_free_SOURCES = src/free.c lib/strutils.c lib/fileutils.c
-src_pgrep_SOURCES = src/pgrep.c lib/fileutils.c lib/signals.c
-src_pkill_SOURCES = src/pgrep.c lib/fileutils.c lib/signals.c
-src_pmap_SOURCES = src/pmap.c lib/fileutils.c
+src_free_SOURCES = src/free.c local/strutils.c local/fileutils.c
+src_pgrep_SOURCES = src/pgrep.c local/fileutils.c local/signals.c
+src_pkill_SOURCES = src/pgrep.c local/fileutils.c local/signals.c
+src_pmap_SOURCES = src/pmap.c local/fileutils.c
if BUILD_PIDWAIT
-src_pidwait_SOURCES = src/pgrep.c lib/fileutils.c lib/signals.c
+src_pidwait_SOURCES = src/pgrep.c local/fileutils.c local/signals.c
endif
if !CYGWIN
-src_pwdx_SOURCES = src/pwdx.c lib/fileutils.c
+src_pwdx_SOURCES = src/pwdx.c local/fileutils.c
src_pwdx_LDADD= $(CYGWINFLAGS)
src_sysctl_SOURCES = \
src/sysctl.c \
- lib/fileutils.c \
- lib/procio.c
+ local/fileutils.c \
+ local/procio.c
src_sysctl_LDADD=
endif
-src_tload_SOURCES = src/tload.c lib/strutils.c lib/fileutils.c
-src_uptime_SOURCES = src/uptime.c lib/fileutils.c
-src_vmstat_SOURCES = src/vmstat.c lib/strutils.c lib/fileutils.c
+src_tload_SOURCES = src/tload.c local/strutils.c local/fileutils.c
+src_uptime_SOURCES = src/uptime.c local/fileutils.c
+src_vmstat_SOURCES = src/vmstat.c local/strutils.c local/fileutils.c
# See http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
@@ -317,28 +316,28 @@ src_ps_pscommand_SOURCES = \
src/ps/select.c \
src/ps/sortformat.c \
src/ps/stacktrace.c \
- lib/fileutils.c \
- lib/signals.c
+ local/fileutils.c \
+ local/signals.c
# Test programs required for dejagnu or standalone testing
check_PROGRAMS = \
- lib/test_strutils \
- lib/test_fileutils \
- lib/test_process \
- lib/test_strtod_nol \
- lib/test_shm
-
-lib_test_strutils_SOURCES = lib/test_strutils.c lib/strutils.c
-lib_test_strutils_LDADD = $(CYGWINFLAGS)
-lib_test_fileutils_SOURCES = lib/test_fileutils.c lib/fileutils.c
-lib_test_fileutils_LDADD = $(CYGWINFLAGS)
-lib_test_process_SOURCES = lib/test_process.c
-lib_test_process_LDADD = $(CYGWINFLAGS)
-lib_test_strtod_nol_SOURCES = lib/test_strtod_nol.c lib/strutils.c
-lib_test_strtod_nol_LDADD = $(CYGWINFLAGS)
-lib_test_shm_SOURCES = lib/test_shm.c lib/strutils.c
-lib_test_shm_LDADD = $(CYGWINFLAGS)
+ src/tests/test_strutils \
+ src/tests/test_fileutils \
+ src/tests/test_process \
+ src/tests/test_strtod_nol \
+ src/tests/test_shm
+
+src_tests_test_strutils_SOURCES = src/tests/test_strutils.c local/strutils.c
+src_tests_test_strutils_LDADD = $(CYGWINFLAGS)
+src_tests_test_fileutils_SOURCES = src/tests/test_fileutils.c local/fileutils.c
+src_tests_test_fileutils_LDADD = $(CYGWINFLAGS)
+src_tests_test_process_SOURCES = src/tests/test_process.c
+src_tests_test_process_LDADD = $(CYGWINFLAGS)
+src_tests_test_strtod_nol_SOURCES = src/tests/test_strtod_nol.c local/strutils.c
+src_tests_test_strtod_nol_LDADD = $(CYGWINFLAGS)
+src_tests_test_shm_SOURCES = src/tests/test_shm.c local/strutils.c
+src_tests_test_shm_LDADD = $(CYGWINFLAGS)
check_PROGRAMS += \
library/tests/test_Itemtables \
@@ -396,8 +395,8 @@ TESTS = \
library/tests/test_sysinfo \
library/tests/test_version \
library/tests/test_namespace \
- lib/test_fileutils \
- lib/test_strtod_nol
+ src/tests/test_fileutils \
+ src/tests/test_strtod_nol
# Automake should do this, but it doesn't
check: $(check_PROGRAMS) $(PROGRAMS)
diff --git a/configure.ac b/configure.ac
index 7acd15e..9ee0398 100644
--- a/configure.ac
+++ b/configure.ac
@@ -392,7 +392,7 @@ AC_SUBST(DEJAGNU)
AC_CHECK_FUNCS([__fpending alarm atexit dup2 gethostname getpagesize gettimeofday iswprint memchr memmove memset mkdir nl_langinfo putenv regcomp rpmatch select setlocale strcasecmp strchr strcspn strdup strerror strncasecmp strndup strpbrk strrchr strspn strstr strtol strtoul strverscmp utmpname wcwidth])
AC_CONFIG_FILES([Makefile
- include/Makefile
+ local/Makefile
po-man/Makefile
po/Makefile.in
library/libproc-2.pc
diff --git a/include/Makefile.am b/local/Makefile.am
index 9f97890..9f97890 100644
--- a/include/Makefile.am
+++ b/local/Makefile.am
diff --git a/include/c.h b/local/c.h
index 2471209..2471209 100644
--- a/include/c.h
+++ b/local/c.h
diff --git a/lib/fileutils.c b/local/fileutils.c
index 14c7452..14c7452 100644
--- a/lib/fileutils.c
+++ b/local/fileutils.c
diff --git a/include/fileutils.h b/local/fileutils.h
index cfab570..cfab570 100644
--- a/include/fileutils.h
+++ b/local/fileutils.h
diff --git a/include/nls.h b/local/nls.h
index f5abe05..f5abe05 100644
--- a/include/nls.h
+++ b/local/nls.h
diff --git a/lib/procio.c b/local/procio.c
index bbd7c84..bbd7c84 100644
--- a/lib/procio.c
+++ b/local/procio.c
diff --git a/include/procio.h b/local/procio.h
index 043506a..043506a 100644
--- a/include/procio.h
+++ b/local/procio.h
diff --git a/include/rpmatch.h b/local/rpmatch.h
index 2541aa3..2541aa3 100644
--- a/include/rpmatch.h
+++ b/local/rpmatch.h
diff --git a/lib/signals.c b/local/signals.c
index caff420..caff420 100644
--- a/lib/signals.c
+++ b/local/signals.c
diff --git a/include/signals.h b/local/signals.h
index db23e9f..db23e9f 100644
--- a/include/signals.h
+++ b/local/signals.h
diff --git a/lib/strutils.c b/local/strutils.c
index e5245db..e5245db 100644
--- a/lib/strutils.c
+++ b/local/strutils.c
diff --git a/include/strutils.h b/local/strutils.h
index 85a6192..85a6192 100644
--- a/include/strutils.h
+++ b/local/strutils.h
diff --git a/lib/strverscmp.c b/local/strverscmp.c
index 2d1b406..2d1b406 100644
--- a/lib/strverscmp.c
+++ b/local/strverscmp.c
diff --git a/include/tests.h b/local/tests.h
index 324cc22..324cc22 100644
--- a/include/tests.h
+++ b/local/tests.h
diff --git a/include/xalloc.h b/local/xalloc.h
index 8b4d368..8b4d368 100644
--- a/include/xalloc.h
+++ b/local/xalloc.h
diff --git a/src/ps/common.h b/src/ps/common.h
index a03c93f..ee08cdc 100644
--- a/src/ps/common.h
+++ b/src/ps/common.h
@@ -12,7 +12,7 @@
#ifndef PROCPS_PS_H
#define PROCPS_PS_H
-#include "../include/nls.h"
+#include "nls.h"
#include "meminfo.h"
#include "misc.h"
#include "pids.h"
diff --git a/src/ps/display.c b/src/ps/display.c
index b2ee131..fc615e1 100644
--- a/src/ps/display.c
+++ b/src/ps/display.c
@@ -28,10 +28,10 @@
#include <sys/sysmacros.h>
#include <sys/types.h>
-#include "../include/c.h"
-#include "../include/fileutils.h"
-#include "../include/signals.h"
-#include "../include/xalloc.h"
+#include "c.h"
+#include "fileutils.h"
+#include "signals.h"
+#include "xalloc.h"
#include "common.h"
diff --git a/src/ps/global.c b/src/ps/global.c
index 3988cb1..db67a78 100644
--- a/src/ps/global.c
+++ b/src/ps/global.c
@@ -31,8 +31,8 @@
#include <sys/sysmacros.h>
#include <sys/types.h>
-#include "../include/c.h"
-#include "../include/xalloc.h"
+#include "c.h"
+#include "xalloc.h"
#include "common.h"
diff --git a/src/ps/output.c b/src/ps/output.c
index efc5769..5a14f5b 100644
--- a/src/ps/output.c
+++ b/src/ps/output.c
@@ -68,7 +68,7 @@
#include <sys/resource.h>
#include <sys/types.h>
-#include "../include/c.h"
+#include "c.h"
#include "common.h"
diff --git a/src/ps/parser.c b/src/ps/parser.c
index 1230f3e..b836241 100644
--- a/src/ps/parser.c
+++ b/src/ps/parser.c
@@ -31,8 +31,8 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include "../include/c.h"
-#include "../include/xalloc.h"
+#include "c.h"
+#include "xalloc.h"
#include "common.h"
diff --git a/src/ps/sortformat.c b/src/ps/sortformat.c
index 4319e69..a24d9ba 100644
--- a/src/ps/sortformat.c
+++ b/src/ps/sortformat.c
@@ -27,7 +27,7 @@
#include <sys/types.h>
#include "misc.h"
-#include "../include/xalloc.h"
+#include "xalloc.h"
#include "common.h"
diff --git a/lib/test_fileutils.c b/src/tests/test_fileutils.c
index ebfc5e2..ebfc5e2 100644
--- a/lib/test_fileutils.c
+++ b/src/tests/test_fileutils.c
diff --git a/lib/test_process.c b/src/tests/test_process.c
index ef2582e..ef2582e 100644
--- a/lib/test_process.c
+++ b/src/tests/test_process.c
diff --git a/lib/test_shm.c b/src/tests/test_shm.c
index 4906730..4906730 100644
--- a/lib/test_shm.c
+++ b/src/tests/test_shm.c
diff --git a/lib/test_strtod_nol.c b/src/tests/test_strtod_nol.c
index 0be798c..0be798c 100644
--- a/lib/test_strtod_nol.c
+++ b/src/tests/test_strtod_nol.c
diff --git a/lib/test_strutils.c b/src/tests/test_strutils.c
index 4a7c7aa..4a7c7aa 100644
--- a/lib/test_strutils.c
+++ b/src/tests/test_strutils.c
diff --git a/src/top/top.c b/src/top/top.c
index 12cfbf3..2f4ea47 100644
--- a/src/top/top.c
+++ b/src/top/top.c
@@ -47,9 +47,9 @@
#include <sys/time.h>
#include <sys/types.h> // also available via <stdlib.h>
-#include "../include/fileutils.h"
-#include "../include/signals.h"
-#include "../include/nls.h"
+#include "fileutils.h"
+#include "signals.h"
+#include "nls.h"
#include "meminfo.h"
#include "misc.h"
diff --git a/src/top/top_nls.c b/src/top/top_nls.c
index fe5fab6..273b09a 100644
--- a/src/top/top_nls.c
+++ b/src/top/top_nls.c
@@ -19,7 +19,7 @@
#include <stdio.h>
#include <string.h>
-#include "../include/nls.h"
+#include "nls.h"
#include "top.h"
#include "top_nls.h"