diff options
author | keramida <keramida@FreeBSD.org> | 2006-12-01 07:01:19 +0000 |
---|---|---|
committer | keramida <keramida@FreeBSD.org> | 2006-12-01 07:01:19 +0000 |
commit | b9438a66362d4965c5f8ff02e33ebce161002907 (patch) | |
tree | 1028e0dbbe1763d196e58cdfd96451b6503f48ad /usr.bin/top/Makefile | |
parent | 2f43ac99c06c3206e61b738783b082ec1c9f603f (diff) | |
download | FreeBSD-src-b9438a66362d4965c5f8ff02e33ebce161002907.zip FreeBSD-src-b9438a66362d4965c5f8ff02e33ebce161002907.tar.gz |
The sigconv.awk script generates a sigdesc.h header file, which
contains a sigdec[] vector of structures, but the generated output is
missing braces around the initializer of each struct, which
triggers warnings in WARNS=3:
src/usr.bin/top/sigdesc.h:10: warning: missing braces around initializer
src/usr.bin/top/sigdesc.h:10: warning: (near initialization for `sigdesc[0]')
* Fix the sigconv.awk script to generate a header with initializers
which look better.
* Add rules to usr.bin/top/Makefile that rebuilds a new sigconv.h
header which matches the correct signal set from the build-time
version of `${DESTDIR}/usr/include/signal.h' (so sigconv.h doesn't
get stale once changes are made to the header).
* Remove the old sigconv.h header, now that it is autoupdated at
build time.
* Various Makefile style fixes (the committed Makefile was kindly
submitted by Ruslan):
- Reorder .PATH, PROG, SRCS and CFLAGS to match style.Makefile(5)
- Split off the generated sources (sigdesc.h top.local.h) in an
SRCS+= line of their own.
- Add entries to CLEANFILES near the rules that generate the
respective files.
- Move the explicit rule which builds top.1 after the implicit
rules which generate its dependencies.
Reviewed by: ru, bde
Submitted by: ru (Makefile)
MFC after: 2 weeks
Diffstat (limited to 'usr.bin/top/Makefile')
-rw-r--r-- | usr.bin/top/Makefile | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/usr.bin/top/Makefile b/usr.bin/top/Makefile index 08343da..182714a 100644 --- a/usr.bin/top/Makefile +++ b/usr.bin/top/Makefile @@ -1,32 +1,35 @@ # $FreeBSD$ -PROG= top TOPDIR= ${.CURDIR}/../../contrib/top -.PATH: ${TOPDIR} +.PATH: ${TOPDIR} -CFLAGS+= -DHAVE_GETOPT -DHAVE_STRERROR -I${.CURDIR} -I${TOPDIR} -I. -DORDER +PROG= top +SRCS= commands.c display.c machine.c screen.c top.c \ + username.c utils.c version.c +SRCS+= sigdesc.h top.local.h +CFLAGS+= -DHAVE_GETOPT -DHAVE_STRERROR -DORDER +CFLAGS+= -I${.CURDIR} -I${TOPDIR} -I. # # The table size should be a prime number approximately twice as # large as the number of lines in /etc/passwd. The default number -# is 20011, use /etc/make.conf to override this. +# is 20011; use /etc/make.conf to override this. # .if defined(TOP_TABLE_SIZE) CFLAGS+= -D"Table_size=${TOP_TABLE_SIZE}" .endif -SRCS= commands.c display.c machine.c screen.c top.c \ - username.c utils.c version.c top.local.h +DPADD= ${LIBTERMCAP} ${LIBM} ${LIBKVM} +LDADD= -ltermcap -lm -lkvm -CLEANFILES+= top.local.h top.x top.1 -DPADD= ${LIBTERMCAP} ${LIBM} ${LIBKVM} -LDADD= -ltermcap -lm -lkvm - -top.1: top.x top.local.1 - cat ${.ALLSRC} > top.1 +CLEANFILES= sigdesc.h +SIGCONV_AWK= ${.CURDIR}/../../contrib/top/sigconv.awk +SIGNAL_H= ${DESTDIR}/usr/include/sys/signal.h +sigdesc.h: ${SIGCONV_AWK} ${SIGNAL_H} + awk -f ${SIGCONV_AWK} < ${SIGNAL_H} > ${.TARGET} +CLEANFILES+= top.local.h top.x .SUFFIXES: .X .x .H .h - .X.x .H.h: @${ECHO} Making ${.TARGET} from ${.IMPSRC} @sed -e's,%LoadMax%,5.0,g' \ @@ -37,4 +40,8 @@ top.1: top.x top.local.1 -e's,%random%,1,g' \ ${.IMPSRC} > ${.TARGET} +CLEANFILES+= top.1 +top.1: top.x top.local.1 + cat ${.ALLSRC} > ${.TARGET} + .include <bsd.prog.mk> |