perfect but for extra /usr/bin/kill
This commit is contained in:
parent
4eb95fdda8
commit
465708e3f9
22
Makefile
22
Makefile
@ -14,6 +14,7 @@
|
||||
VERSION := 3
|
||||
SUBVERSION := 0
|
||||
MINORVERSION := 1
|
||||
TARVERSION := 3.0.1
|
||||
LIBVERSION := 3.0.1
|
||||
|
||||
############ vars
|
||||
@ -49,6 +50,12 @@ MANFILES := $(man1)uptime.1 $(man1)tload.1 $(man1)free.1 $(man1)w.1 \
|
||||
$(man1)snice.1 $(man1)pgrep.1 $(man1)pkill.1 \
|
||||
$(man5)sysctl.conf.5 $(man8)vmstat.8 $(man8)sysctl.8
|
||||
|
||||
TARFILES := AUTHORS BUGS NEWS README TODO COPYING COPYING.LIB ChangeLog \
|
||||
Makefile Makefile.noam procps.lsm procps.spec v t \
|
||||
minimal.c $(notdir $(SCRFILES)) $(notdir $(MANFILES)) \
|
||||
uptime.c tload.c free.c w.c top.c vmstat.c watch.c skill.c \
|
||||
sysctl.c pgrep.c top.h
|
||||
|
||||
CURSES := -I/usr/include/ncurses -lncurses
|
||||
|
||||
LDFLAGS := -Wl,-warn-common
|
||||
@ -67,7 +74,7 @@ CFLAGS := -D_GNU_SOURCE -O2 -g3 -fno-common -ffast-math -I proc \
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .a .o .c .s .h
|
||||
|
||||
.PHONY: all clean do_all install # ps
|
||||
.PHONY: all clean do_all install tar # ps
|
||||
|
||||
ALL := $(notdir $(BINFILES))
|
||||
|
||||
@ -104,19 +111,26 @@ CLEAN += $(junk) $(foreach dir,$(DIRS),$(addprefix $(dir), $(junk)))
|
||||
#%.d: %.c
|
||||
# depend.sh $(CFLAGS) $< > $@
|
||||
|
||||
# don't want to type "make procps-$(TARVERSION).tar.gz"
|
||||
tar: $(TARFILES)
|
||||
mkdir procps-$(TARVERSION)
|
||||
(tar cf - $(TARFILES)) | (cd procps-$(TARVERSION) && tar xf -)
|
||||
tar cf procps-$(TARVERSION).tar procps-$(TARVERSION)
|
||||
gzip -9 procps-$(TARVERSION).tar
|
||||
|
||||
clean:
|
||||
rm -f $(CLEAN)
|
||||
|
||||
###### install
|
||||
|
||||
$(BINFILES) : $(@F)
|
||||
$(install) --mode a=rx --strip $< $@
|
||||
$(install) --mode a=rx --strip $(notdir $@) $@
|
||||
|
||||
$(SCRFILES) : $(@F)
|
||||
$(install) --mode a=rx $< $@
|
||||
$(install) --mode a=rx $(notdir $@) $@
|
||||
|
||||
$(MANFILES) : $(@F)
|
||||
$(install) --mode a=r $< $@
|
||||
$(install) --mode a=r $(notdir $@) $@
|
||||
|
||||
install: $(INSTALL)
|
||||
cd $(usr/bin) && ($(ln-f) skill snice; $(ln-f) skill kill; $(ln-f) pgrep pkill)
|
||||
|
@ -10,9 +10,9 @@
|
||||
#include <string.h> /* for strcmp */
|
||||
#include <stdio.h> /* for parse error output */
|
||||
|
||||
#include "proc/readproc.h" /* for proc_t */
|
||||
#include "readproc.h" /* for proc_t */
|
||||
|
||||
#include "proc/compare.h" /* for this code */
|
||||
#include "compare.h" /* for this code */
|
||||
|
||||
|
||||
/*
|
||||
|
@ -18,9 +18,9 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/utsname.h>
|
||||
#include "proc/procps.h"
|
||||
#include "proc/version.h"
|
||||
#include "proc/sysinfo.h" /* smp_num_cpus */
|
||||
#include "procps.h"
|
||||
#include "version.h"
|
||||
#include "sysinfo.h" /* smp_num_cpus */
|
||||
|
||||
#define KSYMS_FILENAME "/proc/ksyms"
|
||||
|
||||
|
@ -24,6 +24,11 @@ LIBSRC := $(wildcard proc/*.c)
|
||||
LIBHDR := $(wildcard proc/*.h)
|
||||
LIBOBJ := $(LIBSRC:.c=.o)
|
||||
|
||||
|
||||
LIB_X := COPYING Makefile.noam module.mk
|
||||
TARFILES += $(LIBSRC) $(LIBHDR) $(addprefix proc/,$(LIB_X))
|
||||
|
||||
|
||||
# Clean away all output files, .depend, and symlinks.
|
||||
# Use wildcards in case the version has changed.
|
||||
CLEAN += proc/.depend proc/lib*.so* proc/lib*.a $(LIBOBJ)
|
||||
@ -42,8 +47,10 @@ proc/.depend: $(LIBSRC) $(LIBHDR)
|
||||
$(strip $(CC) $(LIB_CFLAGS) -MM -MG $(LIBSRC) > $@)
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
ifneq ($(MAKECMDGOALS),tar)
|
||||
-include proc/.depend
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
$(lib)/$(SONAME) : proc/$(SONAME)
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#include <pwd.h>
|
||||
#include "proc/procps.h"
|
||||
#include "procps.h"
|
||||
#include <grp.h>
|
||||
|
||||
#define HASHSIZE 16 /* power of 2 */
|
||||
|
@ -7,8 +7,8 @@
|
||||
\***********************************************************************/
|
||||
|
||||
|
||||
#include "proc/procps.h"
|
||||
#include "proc/readproc.h"
|
||||
#include "procps.h"
|
||||
#include "readproc.h"
|
||||
#include "status.h"
|
||||
|
||||
char * status(proc_t* task) {
|
||||
|
@ -21,8 +21,8 @@
|
||||
#include <time.h>
|
||||
#include <utmp.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include "proc/whattime.h"
|
||||
#include "proc/sysinfo.h"
|
||||
#include "whattime.h"
|
||||
#include "sysinfo.h"
|
||||
|
||||
static char buf[128];
|
||||
static double av[3];
|
||||
|
@ -11,10 +11,14 @@ DIRS += ps/
|
||||
# a file to create
|
||||
ALL += ps/ps
|
||||
|
||||
PSNAMES := $(addprefix ps/,display escape global help output parser select sortformat)
|
||||
PS_C := display escape global help output parser select sortformat
|
||||
PSNAMES := $(addprefix ps/,$(PS_C))
|
||||
PSOBJ := $(addsuffix .o,$(PSNAMES))
|
||||
PSSRC := $(addsuffix .c,$(PSNAMES))
|
||||
|
||||
PS_X := COPYING HACKING TRANSLATION Makefile.noam common.h module.mk it p ps.1 regression
|
||||
TARFILES += $(PSSRC) $(addprefix ps/,$(PS_X))
|
||||
|
||||
ps/ps: $(PSOBJ) $(LIBPROC)
|
||||
$(CC) $(LDFLAGS) -o $@ $^
|
||||
|
||||
@ -22,7 +26,7 @@ ps/ps: $(PSOBJ) $(LIBPROC)
|
||||
ps/debug: $(PSOBJ) stacktrace.o $(LIBPROC)
|
||||
$(CC) -o $@ $^ -lefence
|
||||
|
||||
$(PSOBJ): %.o: ps/%.c ps/common.h proc/$(SONAME)
|
||||
$(PSOBJ): %.o: %.c ps/common.h proc/$(SONAME)
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
|
||||
ps/stacktrace.o: ps/stacktrace.c
|
||||
|
6
skill.c
6
skill.c
@ -21,9 +21,9 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <proc/sig.h>
|
||||
#include <proc/devname.h>
|
||||
#include <proc/procps.h> /* char *user_from_uid(uid_t uid) */
|
||||
#include "proc/sig.h"
|
||||
#include "proc/devname.h"
|
||||
#include "proc/procps.h" /* char *user_from_uid(uid_t uid) */
|
||||
#include "proc/version.h" /* procps_version */
|
||||
|
||||
static int f_flag, i_flag, v_flag, w_flag, n_flag;
|
||||
|
Loading…
Reference in New Issue
Block a user