From: albert <> Date: Thu, 10 Oct 2002 22:40:35 +0000 (+0000) Subject: perfect but for extra /usr/bin/kill X-Git-Tag: v3.3.0~442 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=465708e3f91d6dfa9bc6e6cbe357c078620dcfcb;p=procps-ng perfect but for extra /usr/bin/kill --- diff --git a/Makefile b/Makefile index c92d20c2..5b1c65c4 100644 --- a/Makefile +++ b/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) diff --git a/proc/compare.c b/proc/compare.c index 7fd3ed0c..d6e780e1 100644 --- a/proc/compare.c +++ b/proc/compare.c @@ -10,9 +10,9 @@ #include /* for strcmp */ #include /* 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 */ /* diff --git a/proc/ksym.c b/proc/ksym.c index f80596e7..dfa20178 100644 --- a/proc/ksym.c +++ b/proc/ksym.c @@ -18,9 +18,9 @@ #include #include #include -#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" diff --git a/proc/module.mk b/proc/module.mk index 1c24b5a8..2deeb29b 100644 --- a/proc/module.mk +++ b/proc/module.mk @@ -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) diff --git a/proc/pwcache.c b/proc/pwcache.c index 8fff60b3..a8c34a65 100644 --- a/proc/pwcache.c +++ b/proc/pwcache.c @@ -10,7 +10,7 @@ #include #include #include -#include "proc/procps.h" +#include "procps.h" #include #define HASHSIZE 16 /* power of 2 */ diff --git a/proc/status.c b/proc/status.c index c267200e..83a53b78 100644 --- a/proc/status.c +++ b/proc/status.c @@ -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) { diff --git a/proc/whattime.c b/proc/whattime.c index 80eb743c..a14eaf7b 100644 --- a/proc/whattime.c +++ b/proc/whattime.c @@ -21,8 +21,8 @@ #include #include #include -#include "proc/whattime.h" -#include "proc/sysinfo.h" +#include "whattime.h" +#include "sysinfo.h" static char buf[128]; static double av[3]; diff --git a/ps/module.mk b/ps/module.mk index 0d5f1e9e..c237ccea 100755 --- a/ps/module.mk +++ b/ps/module.mk @@ -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 diff --git a/skill.c b/skill.c index e9bd8861..a8dbddc0 100644 --- a/skill.c +++ b/skill.c @@ -21,9 +21,9 @@ #include #include #include -#include -#include -#include /* 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;