diff --git a/.gitignore b/.gitignore index 3cce3f84..cb085bf9 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 444f6c7d..14af9a10 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 + src/tests/test_strutils \ + src/tests/test_fileutils \ + src/tests/test_process \ + src/tests/test_strtod_nol \ + src/tests/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_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 7acd15e7..9ee03982 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 similarity index 100% rename from include/Makefile.am rename to local/Makefile.am diff --git a/include/c.h b/local/c.h similarity index 100% rename from include/c.h rename to local/c.h diff --git a/lib/fileutils.c b/local/fileutils.c similarity index 100% rename from lib/fileutils.c rename to local/fileutils.c diff --git a/include/fileutils.h b/local/fileutils.h similarity index 100% rename from include/fileutils.h rename to local/fileutils.h diff --git a/include/nls.h b/local/nls.h similarity index 100% rename from include/nls.h rename to local/nls.h diff --git a/lib/procio.c b/local/procio.c similarity index 100% rename from lib/procio.c rename to local/procio.c diff --git a/include/procio.h b/local/procio.h similarity index 100% rename from include/procio.h rename to local/procio.h diff --git a/include/rpmatch.h b/local/rpmatch.h similarity index 100% rename from include/rpmatch.h rename to local/rpmatch.h diff --git a/lib/signals.c b/local/signals.c similarity index 100% rename from lib/signals.c rename to local/signals.c diff --git a/include/signals.h b/local/signals.h similarity index 100% rename from include/signals.h rename to local/signals.h diff --git a/lib/strutils.c b/local/strutils.c similarity index 100% rename from lib/strutils.c rename to local/strutils.c diff --git a/include/strutils.h b/local/strutils.h similarity index 100% rename from include/strutils.h rename to local/strutils.h diff --git a/lib/strverscmp.c b/local/strverscmp.c similarity index 100% rename from lib/strverscmp.c rename to local/strverscmp.c diff --git a/include/tests.h b/local/tests.h similarity index 100% rename from include/tests.h rename to local/tests.h diff --git a/include/xalloc.h b/local/xalloc.h similarity index 100% rename from include/xalloc.h rename to local/xalloc.h diff --git a/src/ps/common.h b/src/ps/common.h index a03c93f8..ee08cdc9 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 b2ee131b..fc615e12 100644 --- a/src/ps/display.c +++ b/src/ps/display.c @@ -28,10 +28,10 @@ #include #include -#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 3988cb10..db67a782 100644 --- a/src/ps/global.c +++ b/src/ps/global.c @@ -31,8 +31,8 @@ #include #include -#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 efc57695..5a14f5be 100644 --- a/src/ps/output.c +++ b/src/ps/output.c @@ -68,7 +68,7 @@ #include #include -#include "../include/c.h" +#include "c.h" #include "common.h" diff --git a/src/ps/parser.c b/src/ps/parser.c index 1230f3ef..b8362414 100644 --- a/src/ps/parser.c +++ b/src/ps/parser.c @@ -31,8 +31,8 @@ #include #include -#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 4319e695..a24d9baa 100644 --- a/src/ps/sortformat.c +++ b/src/ps/sortformat.c @@ -27,7 +27,7 @@ #include #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 similarity index 100% rename from lib/test_fileutils.c rename to src/tests/test_fileutils.c diff --git a/lib/test_process.c b/src/tests/test_process.c similarity index 100% rename from lib/test_process.c rename to src/tests/test_process.c diff --git a/lib/test_shm.c b/src/tests/test_shm.c similarity index 100% rename from lib/test_shm.c rename to src/tests/test_shm.c diff --git a/lib/test_strtod_nol.c b/src/tests/test_strtod_nol.c similarity index 100% rename from lib/test_strtod_nol.c rename to src/tests/test_strtod_nol.c diff --git a/lib/test_strutils.c b/src/tests/test_strutils.c similarity index 100% rename from lib/test_strutils.c rename to src/tests/test_strutils.c diff --git a/src/top/top.c b/src/top/top.c index 12cfbf33..2f4ea47a 100644 --- a/src/top/top.c +++ b/src/top/top.c @@ -47,9 +47,9 @@ #include #include // also available via -#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 fe5fab60..273b09a0 100644 --- a/src/top/top_nls.c +++ b/src/top/top_nls.c @@ -19,7 +19,7 @@ #include #include -#include "../include/nls.h" +#include "nls.h" #include "top.h" #include "top_nls.h"