Merge branch 'filbranden/procps-build_sys_cleanup_usrbin'
configure.ac conflict was due to the git url being changed after the merge request. Conflicts: configure.ac
This commit is contained in:
commit
1daaac2180
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@
|
|||||||
.deps
|
.deps
|
||||||
.libs
|
.libs
|
||||||
.version
|
.version
|
||||||
|
.dirstamp
|
||||||
ABOUT-NLS
|
ABOUT-NLS
|
||||||
aclocal.m4
|
aclocal.m4
|
||||||
autom4te.cache
|
autom4te.cache
|
||||||
|
183
Makefile.am
183
Makefile.am
@ -1,28 +1,25 @@
|
|||||||
#AUTOMAKE_OPTIONS = subdir-objects
|
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-include $(top_builddir)/config.h \
|
-include $(top_builddir)/config.h \
|
||||||
|
-I$(top_srcdir) \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-DLOCALEDIR=\"$(localedir)\"
|
-DLOCALEDIR=\"$(localedir)\"
|
||||||
|
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
SUBDIRS = \
|
SUBDIRS = \
|
||||||
include \
|
include \
|
||||||
lib \
|
|
||||||
man-po \
|
man-po \
|
||||||
po \
|
po \
|
||||||
proc \
|
testsuite
|
||||||
ps \
|
|
||||||
testsuite \
|
|
||||||
top
|
|
||||||
|
|
||||||
AM_CFLAGS = -Iproc
|
AM_CFLAGS = -Iproc
|
||||||
AM_LDFLAGS = ./proc/libprocps.la
|
AM_LDFLAGS = ./proc/libprocps.la
|
||||||
|
|
||||||
sbin_PROGRAMS = \
|
transform = s/pscommand/ps/; $(program_transform_name)
|
||||||
sysctl
|
|
||||||
|
|
||||||
usrbin_exec_PROGRAMS = \
|
bin_PROGRAMS = \
|
||||||
|
ps/pscommand \
|
||||||
free \
|
free \
|
||||||
pgrep \
|
pgrep \
|
||||||
pkill \
|
pkill \
|
||||||
@ -33,6 +30,12 @@ usrbin_exec_PROGRAMS = \
|
|||||||
vmstat \
|
vmstat \
|
||||||
w
|
w
|
||||||
|
|
||||||
|
sbin_PROGRAMS = \
|
||||||
|
sysctl
|
||||||
|
|
||||||
|
lib_LTLIBRARIES = \
|
||||||
|
proc/libprocps.la
|
||||||
|
|
||||||
dist_man_MANS = \
|
dist_man_MANS = \
|
||||||
free.1 \
|
free.1 \
|
||||||
pgrep.1 \
|
pgrep.1 \
|
||||||
@ -44,7 +47,8 @@ dist_man_MANS = \
|
|||||||
tload.1 \
|
tload.1 \
|
||||||
uptime.1 \
|
uptime.1 \
|
||||||
vmstat.8 \
|
vmstat.8 \
|
||||||
w.1
|
w.1 \
|
||||||
|
ps/ps.1
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
autogen.sh \
|
autogen.sh \
|
||||||
@ -54,43 +58,61 @@ EXTRA_DIST = \
|
|||||||
Documentation/CodingStyle \
|
Documentation/CodingStyle \
|
||||||
Documentation/TODO \
|
Documentation/TODO \
|
||||||
sysctl.conf \
|
sysctl.conf \
|
||||||
|
ps/HACKING \
|
||||||
|
ps/regression \
|
||||||
$(DIST_MAN_POTS)
|
$(DIST_MAN_POTS)
|
||||||
|
|
||||||
|
procpsngdir = $(docdir)
|
||||||
|
dist_procpsng_DATA = \
|
||||||
|
Documentation/BUGS \
|
||||||
|
Documentation/FAQ
|
||||||
|
|
||||||
if BUILD_PIDOF
|
if BUILD_PIDOF
|
||||||
usrbin_exec_PROGRAMS += pidof
|
bin_PROGRAMS += pidof
|
||||||
dist_man_MANS += pidof.1
|
dist_man_MANS += pidof.1
|
||||||
pidof_SOURCES = pidof.c $(top_srcdir)/lib/fileutils.c
|
pidof_SOURCES = pidof.c lib/fileutils.c
|
||||||
else
|
else
|
||||||
EXTRA_DIST += pidof.1
|
EXTRA_DIST += pidof.1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if BUILD_KILL
|
if BUILD_KILL
|
||||||
bin_PROGRAMS = kill
|
bin_PROGRAMS += kill
|
||||||
dist_man_MANS += kill.1
|
dist_man_MANS += kill.1
|
||||||
kill_SOURCES = skill.c $(top_srcdir)/lib/strutils.c $(top_srcdir)/lib/fileutils.c $(top_srcdir)/lib/nsutils.c
|
kill_SOURCES = skill.c lib/strutils.c lib/fileutils.c lib/nsutils.c
|
||||||
else
|
else
|
||||||
EXTRA_DIST += kill.1
|
EXTRA_DIST += kill.1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if WITH_NCURSES
|
if WITH_NCURSES
|
||||||
usrbin_exec_PROGRAMS += \
|
bin_PROGRAMS += \
|
||||||
slabtop \
|
slabtop \
|
||||||
watch
|
watch \
|
||||||
|
top/top
|
||||||
dist_man_MANS += \
|
dist_man_MANS += \
|
||||||
slabtop.1 \
|
slabtop.1 \
|
||||||
watch.1
|
watch.1 \
|
||||||
slabtop_SOURCES = slabtop.c $(top_srcdir)/lib/strutils.c $(top_srcdir)/lib/fileutils.c
|
top/top.1
|
||||||
|
slabtop_SOURCES = slabtop.c lib/strutils.c lib/fileutils.c
|
||||||
slabtop_LDADD = @NCURSES_LIBS@
|
slabtop_LDADD = @NCURSES_LIBS@
|
||||||
watch_SOURCES = watch.c $(top_srcdir)/lib/strutils.c $(top_srcdir)/lib/fileutils.c
|
watch_SOURCES = watch.c lib/strutils.c lib/fileutils.c
|
||||||
watch_LDADD = @WATCH_NCURSES_LIBS@
|
watch_LDADD = @WATCH_NCURSES_LIBS@
|
||||||
|
top_top_SOURCES = \
|
||||||
|
top/top.h \
|
||||||
|
top/top.c \
|
||||||
|
top/top_nls.h \
|
||||||
|
top/top_nls.c \
|
||||||
|
lib/fileutils.c
|
||||||
|
top_top_LDADD = @NCURSES_LIBS@ $(DL_LIB)
|
||||||
|
dist_procpsng_DATA += \
|
||||||
|
top/README.top
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if BUILD_SKILL
|
if BUILD_SKILL
|
||||||
usrbin_exec_PROGRAMS += \
|
bin_PROGRAMS += \
|
||||||
skill \
|
skill \
|
||||||
snice
|
snice
|
||||||
skill_SOURCES = skill.c $(top_srcdir)/lib/strutils.c $(top_srcdir)/lib/fileutils.c $(top_srcdir)/lib/nsutils.c
|
skill_SOURCES = skill.c lib/strutils.c lib/fileutils.c lib/nsutils.c
|
||||||
snice_SOURCES = skill.c $(top_srcdir)/lib/strutils.c $(top_srcdir)/lib/fileutils.c $(top_srcdir)/lib/nsutils.c
|
snice_SOURCES = skill.c lib/strutils.c lib/fileutils.c lib/nsutils.c
|
||||||
dist_man_MANS += \
|
dist_man_MANS += \
|
||||||
skill.1 \
|
skill.1 \
|
||||||
snice.1
|
snice.1
|
||||||
@ -100,26 +122,111 @@ else
|
|||||||
snice.1
|
snice.1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
free_SOURCES = free.c $(top_srcdir)/lib/strutils.c $(top_srcdir)/lib/fileutils.c
|
free_SOURCES = free.c lib/strutils.c lib/fileutils.c
|
||||||
pgrep_SOURCES = pgrep.c $(top_srcdir)/lib/fileutils.c $(top_srcdir)/lib/nsutils.c
|
pgrep_SOURCES = pgrep.c lib/fileutils.c lib/nsutils.c
|
||||||
pkill_SOURCES = pgrep.c $(top_srcdir)/lib/fileutils.c $(top_srcdir)/lib/nsutils.c
|
pkill_SOURCES = pgrep.c lib/fileutils.c lib/nsutils.c
|
||||||
pmap_SOURCES = pmap.c $(top_srcdir)/lib/fileutils.c
|
pmap_SOURCES = pmap.c lib/fileutils.c
|
||||||
pwdx_SOURCES = pwdx.c $(top_srcdir)/lib/fileutils.c
|
pwdx_SOURCES = pwdx.c lib/fileutils.c
|
||||||
sysctl_SOURCES = sysctl.c $(top_srcdir)/lib/fileutils.c
|
sysctl_SOURCES = sysctl.c lib/fileutils.c
|
||||||
tload_SOURCES = tload.c $(top_srcdir)/lib/strutils.c $(top_srcdir)/lib/fileutils.c
|
tload_SOURCES = tload.c lib/strutils.c lib/fileutils.c
|
||||||
uptime_SOURCES = uptime.c $(top_srcdir)/lib/fileutils.c
|
uptime_SOURCES = uptime.c lib/fileutils.c
|
||||||
vmstat_SOURCES = vmstat.c $(top_srcdir)/lib/strutils.c $(top_srcdir)/lib/fileutils.c
|
vmstat_SOURCES = vmstat.c lib/strutils.c lib/fileutils.c
|
||||||
w_SOURCES = w.c $(top_srcdir)/lib/fileutils.c
|
w_SOURCES = w.c lib/fileutils.c
|
||||||
|
|
||||||
|
# proc/libprocps.la
|
||||||
|
|
||||||
|
# See http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
||||||
|
LIBprocps_CURRENT=4
|
||||||
|
LIBprocps_REVISION=0
|
||||||
|
LIBprocps_AGE=0
|
||||||
|
|
||||||
|
proc_libprocps_la_LIBADD = $(LIB_KPARTS)
|
||||||
|
|
||||||
|
if WITH_SYSTEMD
|
||||||
|
proc_libprocps_la_LIBADD += @SYSTEMD_LIBS@
|
||||||
|
endif
|
||||||
|
|
||||||
|
proc_libprocps_la_LDFLAGS = \
|
||||||
|
-version-info $(LIBprocps_CURRENT):$(LIBprocps_REVISION):$(LIBprocps_AGE) \
|
||||||
|
-no-undefined \
|
||||||
|
-Wl,--version-script=$(top_srcdir)/proc/libprocps.sym
|
||||||
|
|
||||||
|
proc_libprocps_la_SOURCES = \
|
||||||
|
proc/alloc.c \
|
||||||
|
proc/alloc.h \
|
||||||
|
proc/devname.c \
|
||||||
|
proc/devname.h \
|
||||||
|
proc/escape.c \
|
||||||
|
proc/escape.h \
|
||||||
|
proc/ksym.c \
|
||||||
|
proc/procps.h \
|
||||||
|
proc/pwcache.c \
|
||||||
|
proc/pwcache.h \
|
||||||
|
proc/readproc.c \
|
||||||
|
proc/readproc.h \
|
||||||
|
proc/sig.c \
|
||||||
|
proc/sig.h \
|
||||||
|
proc/slab.c \
|
||||||
|
proc/slab.h \
|
||||||
|
proc/sysinfo.c \
|
||||||
|
proc/sysinfo.h \
|
||||||
|
proc/version.c \
|
||||||
|
proc/version.h \
|
||||||
|
proc/wchan.h \
|
||||||
|
proc/whattime.c \
|
||||||
|
proc/whattime.h
|
||||||
|
|
||||||
|
proc_libprocps_la_includedir = $(includedir)/proc/
|
||||||
|
proc_libprocps_la_include_HEADERS = \
|
||||||
|
proc/alloc.h \
|
||||||
|
proc/devname.h \
|
||||||
|
proc/escape.h \
|
||||||
|
proc/procps.h \
|
||||||
|
proc/pwcache.h \
|
||||||
|
proc/readproc.h \
|
||||||
|
proc/sig.h \
|
||||||
|
proc/slab.h \
|
||||||
|
proc/sysinfo.h \
|
||||||
|
proc/version.h \
|
||||||
|
proc/wchan.h \
|
||||||
|
proc/whattime.h
|
||||||
|
|
||||||
|
dist_man_MANS += \
|
||||||
|
proc/openproc.3 \
|
||||||
|
proc/readproc.3 \
|
||||||
|
proc/readproctab.3
|
||||||
|
|
||||||
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
pkgconfig_DATA = \
|
||||||
|
proc/libprocps.pc
|
||||||
|
|
||||||
|
EXTRA_DIST += proc/libprocps.sym
|
||||||
|
|
||||||
|
# ps/pscommand
|
||||||
|
|
||||||
|
ps_pscommand_SOURCES = \
|
||||||
|
ps/common.h \
|
||||||
|
ps/display.c \
|
||||||
|
ps/global.c \
|
||||||
|
ps/help.c \
|
||||||
|
ps/output.c \
|
||||||
|
ps/parser.c \
|
||||||
|
ps/select.c \
|
||||||
|
ps/sortformat.c \
|
||||||
|
ps/stacktrace.c \
|
||||||
|
lib/fileutils.c
|
||||||
|
|
||||||
|
# lib/test_* binaries
|
||||||
|
noinst_PROGRAMS = lib/test_strutils lib/test_fileutils lib/test_nsutils
|
||||||
|
|
||||||
|
lib_test_strutils_SOURCES = lib/test_strutils.c lib/strutils.c
|
||||||
|
lib_test_fileutils_SOURCES = lib/test_fileutils.c lib/fileutils.c
|
||||||
|
lib_test_nsutils_SOURCES = lib/test_nsutils.c lib/nsutils.c
|
||||||
|
|
||||||
if EXAMPLE_FILES
|
if EXAMPLE_FILES
|
||||||
sysconf_DATA = sysctl.conf
|
sysconf_DATA = sysctl.conf
|
||||||
endif
|
endif
|
||||||
|
|
||||||
procpsngdir = $(docdir)
|
|
||||||
dist_procpsng_DATA = \
|
|
||||||
Documentation/BUGS \
|
|
||||||
Documentation/FAQ
|
|
||||||
|
|
||||||
BUILT_SOURCES = $(top_srcdir)/.version
|
BUILT_SOURCES = $(top_srcdir)/.version
|
||||||
|
|
||||||
$(top_srcdir)/.version:
|
$(top_srcdir)/.version:
|
||||||
|
16
configure.ac
16
configure.ac
@ -6,7 +6,7 @@ AC_CONFIG_MACRO_DIR([m4])
|
|||||||
AC_INIT([procps-ng],
|
AC_INIT([procps-ng],
|
||||||
m4_esyscmd([misc/git-version-gen .tarball-version]),
|
m4_esyscmd([misc/git-version-gen .tarball-version]),
|
||||||
[procps@freelists.org],,[https://gitlab.com/procps-ng/procps])
|
[procps@freelists.org],,[https://gitlab.com/procps-ng/procps])
|
||||||
AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability tar-pax no-dist-gzip dist-xz])
|
AM_INIT_AUTOMAKE([foreign 1.11 subdir-objects -Wall -Wno-portability tar-pax no-dist-gzip dist-xz])
|
||||||
AM_SILENT_RULES([yes])
|
AM_SILENT_RULES([yes])
|
||||||
AC_CONFIG_SRCDIR([free.c])
|
AC_CONFIG_SRCDIR([free.c])
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
@ -41,7 +41,6 @@ AC_PROG_INSTALL
|
|||||||
AC_PROG_LN_S
|
AC_PROG_LN_S
|
||||||
PKG_PROG_PKG_CONFIG
|
PKG_PROG_PKG_CONFIG
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
AC_PROG_RANLIB
|
|
||||||
|
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_HEADER_MAJOR
|
AC_HEADER_MAJOR
|
||||||
@ -70,9 +69,6 @@ AC_FUNC_MMAP
|
|||||||
AC_FUNC_REALLOC
|
AC_FUNC_REALLOC
|
||||||
AC_FUNC_STRTOD
|
AC_FUNC_STRTOD
|
||||||
|
|
||||||
usrbin_execdir='${exec_prefix}/usr/bin'
|
|
||||||
AC_SUBST([usrbin_execdir])
|
|
||||||
|
|
||||||
AM_GNU_GETTEXT_VERSION([0.14.1])
|
AM_GNU_GETTEXT_VERSION([0.14.1])
|
||||||
AM_GNU_GETTEXT([external])
|
AM_GNU_GETTEXT([external])
|
||||||
if test -d "$srcdir/po"
|
if test -d "$srcdir/po"
|
||||||
@ -275,12 +271,8 @@ AC_CHECK_FUNCS([__fpending alarm atexit dup2 getpagesize gettimeofday iswprint m
|
|||||||
|
|
||||||
AC_CONFIG_FILES([Makefile
|
AC_CONFIG_FILES([Makefile
|
||||||
include/Makefile
|
include/Makefile
|
||||||
lib/Makefile
|
man-po/Makefile
|
||||||
man-po/Makefile
|
po/Makefile.in
|
||||||
po/Makefile.in
|
|
||||||
proc/Makefile
|
|
||||||
proc/libprocps.pc
|
proc/libprocps.pc
|
||||||
ps/Makefile
|
testsuite/Makefile])
|
||||||
testsuite/Makefile
|
|
||||||
top/Makefile])
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include
|
|
||||||
|
|
||||||
AM_CPPFLAGS += -DTEST_PROGRAM
|
|
||||||
|
|
||||||
noinst_PROGRAMS = test_strutils test_fileutils test_nsutils
|
|
||||||
|
|
||||||
test_strutils_SOURCES = strutils.c
|
|
||||||
test_fileutils_SOURCES = fileutils.c
|
|
||||||
test_nsutils_SOURCES = nsutils.c
|
|
@ -43,13 +43,3 @@ void close_stdout(void)
|
|||||||
if (close_stream(stderr) != 0)
|
if (close_stream(stderr) != 0)
|
||||||
_exit(EXIT_FAILURE);
|
_exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TEST_PROGRAM
|
|
||||||
#include <stdio.h>
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
atexit(close_stdout);
|
|
||||||
printf("Hello, World!\n");
|
|
||||||
return EXIT_SUCCESS;
|
|
||||||
}
|
|
||||||
#endif /* TEST_PROGRAM */
|
|
||||||
|
@ -8,13 +8,6 @@
|
|||||||
#include "proc/readproc.h"
|
#include "proc/readproc.h"
|
||||||
#include "nsutils.h"
|
#include "nsutils.h"
|
||||||
|
|
||||||
#ifdef TEST_PROGRAM
|
|
||||||
const char *get_ns_name(int id)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
#endif /* TEST_PROGRAM */
|
|
||||||
|
|
||||||
/* we need to fill in only namespace information */
|
/* we need to fill in only namespace information */
|
||||||
int ns_read(pid_t pid, proc_t *ns_task)
|
int ns_read(pid_t pid, proc_t *ns_task)
|
||||||
{
|
{
|
||||||
@ -35,11 +28,3 @@ int ns_read(pid_t pid, proc_t *ns_task)
|
|||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TEST_PROGRAM
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
printf("Hello, World!\n");
|
|
||||||
return EXIT_SUCCESS;
|
|
||||||
}
|
|
||||||
#endif /* TEST_PROGRAM */
|
|
||||||
|
@ -60,17 +60,3 @@ double strtod_or_err(const char *str, const char *errmesg)
|
|||||||
error(EXIT_FAILURE, errno, "%s: '%s'", errmesg, str);
|
error(EXIT_FAILURE, errno, "%s: '%s'", errmesg, str);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TEST_PROGRAM
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
if (argc < 2) {
|
|
||||||
error(EXIT_FAILURE, 0, "no arguments");
|
|
||||||
} else if (argc < 3) {
|
|
||||||
printf("%ld\n", strtol_or_err(argv[1], "strtol_or_err"));
|
|
||||||
} else {
|
|
||||||
printf("%lf\n", strtod_or_err(argv[2], "strtod_or_err"));
|
|
||||||
}
|
|
||||||
return EXIT_SUCCESS;
|
|
||||||
}
|
|
||||||
#endif /* TEST_PROGRAM */
|
|
||||||
|
10
lib/test_fileutils.c
Normal file
10
lib/test_fileutils.c
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "fileutils.h"
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
atexit(close_stdout);
|
||||||
|
printf("Hello, World!\n");
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
15
lib/test_nsutils.c
Normal file
15
lib/test_nsutils.c
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "nsutils.h"
|
||||||
|
|
||||||
|
const char *get_ns_name(int id)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
printf("Hello, World!\n");
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
38
lib/test_strutils.c
Normal file
38
lib/test_strutils.c
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* test_strutils.c - tests for strutils.c routines
|
||||||
|
* This file was copied from util-linux at fall 2011.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010 Karel Zak <kzak@redhat.com>
|
||||||
|
* Copyright (C) 2010 Davidlohr Bueso <dave@gnu.org>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "c.h"
|
||||||
|
#include "strutils.h"
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
if (argc < 2) {
|
||||||
|
error(EXIT_FAILURE, 0, "no arguments");
|
||||||
|
} else if (argc < 3) {
|
||||||
|
printf("%ld\n", strtol_or_err(argv[1], "strtol_or_err"));
|
||||||
|
} else {
|
||||||
|
printf("%lf\n", strtod_or_err(argv[2], "strtod_or_err"));
|
||||||
|
}
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
@ -1,76 +0,0 @@
|
|||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
|
||||||
AM_CPPFLAGS = \
|
|
||||||
-include $(top_builddir)/config.h \
|
|
||||||
-I$(top_srcdir)/include \
|
|
||||||
-DLOCALEDIR=\"$(localedir)\"
|
|
||||||
|
|
||||||
#
|
|
||||||
# See http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
|
||||||
LIBprocps_CURRENT=4
|
|
||||||
LIBprocps_REVISION=0
|
|
||||||
LIBprocps_AGE=0
|
|
||||||
|
|
||||||
lib_LTLIBRARIES = libprocps.la
|
|
||||||
|
|
||||||
if WITH_SYSTEMD
|
|
||||||
AM_LDFLAGS = @SYSTEMD_LIBS@
|
|
||||||
endif
|
|
||||||
|
|
||||||
libprocps_ladir = $(ladir)
|
|
||||||
libprocps_la_LIBADD = $(LIB_KPARTS)
|
|
||||||
libprocps_la_LDFLAGS = \
|
|
||||||
$(AM_LDFLAGS) \
|
|
||||||
$(all_libraries) \
|
|
||||||
-version-info $(LIBprocps_CURRENT):$(LIBprocps_REVISION):$(LIBprocps_AGE) \
|
|
||||||
-no-undefined \
|
|
||||||
-Wl,--version-script=$(top_srcdir)/proc/libprocps.sym
|
|
||||||
|
|
||||||
dist_man_MANS = \
|
|
||||||
openproc.3 \
|
|
||||||
readproc.3 \
|
|
||||||
readproctab.3
|
|
||||||
|
|
||||||
EXTRA_DIST = libprocps.sym
|
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
|
||||||
pkgconfig_DATA = libprocps.pc
|
|
||||||
|
|
||||||
libprocps_la_SOURCES = \
|
|
||||||
alloc.c \
|
|
||||||
alloc.h \
|
|
||||||
devname.c \
|
|
||||||
devname.h \
|
|
||||||
escape.c \
|
|
||||||
escape.h \
|
|
||||||
ksym.c \
|
|
||||||
procps.h \
|
|
||||||
pwcache.c \
|
|
||||||
pwcache.h \
|
|
||||||
readproc.c \
|
|
||||||
readproc.h \
|
|
||||||
sig.c \
|
|
||||||
sig.h \
|
|
||||||
slab.c \
|
|
||||||
slab.h \
|
|
||||||
sysinfo.c \
|
|
||||||
sysinfo.h \
|
|
||||||
version.c \
|
|
||||||
version.h \
|
|
||||||
wchan.h \
|
|
||||||
whattime.c \
|
|
||||||
whattime.h
|
|
||||||
|
|
||||||
libprocps_la_includedir = $(includedir)/proc/
|
|
||||||
libprocps_la_include_HEADERS = \
|
|
||||||
alloc.h \
|
|
||||||
devname.h \
|
|
||||||
escape.h \
|
|
||||||
procps.h \
|
|
||||||
pwcache.h \
|
|
||||||
readproc.h \
|
|
||||||
sig.h \
|
|
||||||
slab.h \
|
|
||||||
sysinfo.h \
|
|
||||||
version.h \
|
|
||||||
wchan.h \
|
|
||||||
whattime.h
|
|
@ -1,29 +0,0 @@
|
|||||||
AM_CPPFLAGS = \
|
|
||||||
-include $(top_builddir)/config.h \
|
|
||||||
-I$(top_srcdir)/include \
|
|
||||||
-DLOCALEDIR=\"$(localedir)\"
|
|
||||||
|
|
||||||
AM_LDFLAGS = ../proc/libprocps.la
|
|
||||||
|
|
||||||
dist_man_MANS = ps.1
|
|
||||||
|
|
||||||
# Use `ginstall' in the definition of PROGRAMS and in dependencies to avoid
|
|
||||||
# confusion with the `install' target. The install rule transforms `ginstall'
|
|
||||||
# to install before applying any user-specified name transformations.
|
|
||||||
transform = s/pscommand/ps/; $(program_transform_name)
|
|
||||||
bin_PROGRAMS = pscommand
|
|
||||||
pscommand_SOURCES = \
|
|
||||||
common.h \
|
|
||||||
display.c \
|
|
||||||
global.c \
|
|
||||||
help.c \
|
|
||||||
output.c \
|
|
||||||
parser.c \
|
|
||||||
select.c \
|
|
||||||
sortformat.c \
|
|
||||||
stacktrace.c \
|
|
||||||
$(top_srcdir)/lib/fileutils.c
|
|
||||||
|
|
||||||
EXTRA_DIST = \
|
|
||||||
HACKING \
|
|
||||||
regression
|
|
@ -1,30 +0,0 @@
|
|||||||
AM_CPPFLAGS = \
|
|
||||||
-include $(top_builddir)/config.h \
|
|
||||||
-I$(top_srcdir)/include \
|
|
||||||
-DLOCALEDIR=\"$(localedir)\"
|
|
||||||
|
|
||||||
AM_LDFLAGS = ../proc/libprocps.la
|
|
||||||
AM_LDFLAGS += $(DL_LIB)
|
|
||||||
|
|
||||||
if WITH_NCURSES
|
|
||||||
usrbin_exec_PROGRAMS = \
|
|
||||||
top
|
|
||||||
|
|
||||||
top_SOURCES = \
|
|
||||||
top.h \
|
|
||||||
top.c \
|
|
||||||
top_nls.h \
|
|
||||||
top_nls.c \
|
|
||||||
$(top_srcdir)/lib/fileutils.c
|
|
||||||
|
|
||||||
dist_man_MANS = \
|
|
||||||
top.1
|
|
||||||
|
|
||||||
top_LDADD = @NCURSES_LIBS@
|
|
||||||
endif
|
|
||||||
|
|
||||||
EXTRA_DIST =
|
|
||||||
|
|
||||||
procpsngdir = $(docdir)
|
|
||||||
dist_procpsng_DATA = \
|
|
||||||
README.top
|
|
Loading…
Reference in New Issue
Block a user