aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/top/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Fix multiple warnings in usr.bin/top about variables shadowing globalDimitry Andric2019-02-101-4/+0
| | | | | | | | | declarations from base gcc, by renaming those variables. MFC after: 1 week Notes: svn path=/head/; revision=343958
* Fix multiple warnings in usr.bin/top about discarded qualifiers fromDimitry Andric2019-02-101-6/+1
| | | | | | | | | | both clang and gcc, by either constifying variables, or when that is not possible, using __DECONST. MFC after: 1 week Notes: svn path=/head/; revision=343957
* top(1): increase warningsEitan Adler2018-06-221-2/+2
| | | | | | | | | | top(1) now builds without cast-qual warnings, so remove the exemption for that. Tested with clang, gcc7, gcc9 Notes: svn path=/head/; revision=335552
* top(1): reimplement header formatting as sbufEitan Adler2018-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | The current header formatting is a giant format string that changes global state during the format process. Make the following changes: - use sbuf to build up the header rather than use the above pseudo-dynamic one - Change name length to 10 - Reduce size of RES and SIZE by making humanize more aggressive - Restore a version number line to the copyright. This may be required by the copyright (and may not be; its unclear) This is also a pre-req to implementing TOPCOLOR from newer versions of top(1) Discussed with: allanjude, rpolka, danfe, rgrimes Differential Revision: https://reviews.freebsd.org/D15801 Notes: svn path=/head/; revision=335539
* top(1): format_time, format_k, etc.Eitan Adler2018-06-131-1/+1
| | | | | | | | - Use humanize_number for format_k and format_k2 - Fix some style nits in format_time Notes: svn path=/head/; revision=335038
* top(1): several small bugfixes and nitsEitan Adler2018-06-131-2/+1
| | | | | | | | | | | | | | - initialize all maybe uninitialized vars with bogus values. This shuts up the compiler, and causes crashes if it changes later. - mark noreturn as noreturn - removed unused macro - handle x_procstate as runtime rather than pre-processor - avoid using void functions in condtionals Tested with clang, gcc 7, gcc 9 Notes: svn path=/head/; revision=335024
* top(1): handle 0 in "digits" functionsEitan Adler2018-06-111-1/+0
| | | | Notes: svn path=/head/; revision=334941
* top(1): use sys_signame instead of hard coding signalsEitan Adler2018-06-101-7/+1
| | | | | | | | This enables the removal of the signal.h awk script. Shamelessly stolen from kill(1). Notes: svn path=/head/; revision=334920
* top(1): filter fewer warnings; clean upEitan Adler2018-06-101-4/+2
| | | | | | | | | | | - remove WARNS?=6. It is default - we no longer have cast-qual problems - remove unused macros - remove unneeded casts - add include guard for loadavg.h Notes: svn path=/head/; revision=334917
* top(1): Only use NO_WERROR for base gccEitan Adler2018-06-031-1/+3
| | | | | | | This is what was intended. If statements are hard. Notes: svn path=/head/; revision=334554
* top(1): use greater warningsEitan Adler2018-06-031-1/+11
| | | | | | | | | | | | | | | | One of the downsides of using numeric WARNS is that if we only have a single type of issue we get no protection from other changes. For example, we got no warning for missing variable declaration, due to the issues with "const". For this utility, explicitly list out the warnings which are failing. They should still be fixed, so only reduce them to warning instead of error. Tested with: clang base (amd64, i386), gcc6, gcc7, gcc9, gcc base (mips) Notes: svn path=/head/; revision=334551
* top(1): fix buildEitan Adler2018-05-211-2/+1
| | | | | | | | | | | | Remove 'top.local.hs'. This was not noticed since /srv/obj/fbsd/srv/src/freebsd/svn/head/amd64.amd64/usr.bin/top/top.local.h existed locally on my machine despite "make clean". Only fully removing the objdir allowed me to observe the error directly. Pointyhat to: me Notes: svn path=/head/; revision=333974
* Revert r333969 which contained one too many changesEitan Adler2018-05-211-1/+1
| | | | Notes: svn path=/head/; revision=333970
* top(1): modernize a bit; reduce warningsEitan Adler2018-05-211-1/+1
| | | | | | | | | | | | | | | | | | - Replace caddr_t with "void *". This reduces the number of warnings at WARNS=6 - use "static" where possible - sprinkle const where possible This leaves at WARNS=6: 35 warnings in top.c 72 warnings in machine.c 5 warnings in commands.c all of which are either "incompatible-pointer-types-discards-qualifiers" or "cast-qual" Notes: svn path=/head/; revision=333969
* top(1): build with WARNS=3Eitan Adler2018-05-211-1/+1
| | | | | | | | This fixes everything but -Wincompatible-pointer-types-discards-qualifiers Notes: svn path=/head/; revision=333959
* top(1): build with WARN=2Eitan Adler2018-05-211-1/+1
| | | | Notes: svn path=/head/; revision=333949
* top(1): pull configuration directly into header filesEitan Adler2018-05-201-11/+0
| | | | | | | | | This sets configuration variables directly in the various header files, avoiding the need to have special logic in our Makefile to build the header. Notes: svn path=/head/; revision=333946
* revert r333928Eitan Adler2018-05-201-0/+11
| | | | | | | I had missed a file when testing this, and it does not build. Will try again. Notes: svn path=/head/; revision=333930
* top(1): remove 'xs' and 'xh' source filesEitan Adler2018-05-201-11/+0
| | | | | | | Now that we're our own upstream these files buy us nothing. Notes: svn path=/head/; revision=333928
* top(1): unconditionally provide 'FreeBSD' as a versionEitan Adler2018-05-191-1/+1
| | | | Notes: svn path=/head/; revision=333901
* top(1): assume that we're building on FreeBSDEitan Adler2018-05-191-1/+1
| | | | | | | This allows us to avoid the ifdefs that we set unconditionally. Notes: svn path=/head/; revision=333900
* top(1): bump WARNS to 1Eitan Adler2018-05-191-1/+1
| | | | | | | Nothing else builds without errors yet, but 1 is better than 0 Notes: svn path=/head/; revision=333899
* top(1): Migrate top to usr.binEitan Adler2018-05-191-25/+6
| | | | | | | | | | | | | | | | We've been maintaining top(1) for a long time, and the upstream hasn't existed/been used in similarly as long. Make it clear that we own top(1) Tested with 'make universe'. Everything passed except MIPS which failed for unrelated reasons. Install also tested for amd64. Reviewed by: sbruno No objections: imp, mmacy Differential Revision: https://reviews.freebsd.org/D15387 Notes: svn path=/head/; revision=333898
* Adopt SRCTOP in usr.binWarner Losh2017-03-121-2/+2
| | | | | | | | | | | | Prefer ${SRCTOP}/foo over ${.CURDIR}/../../foo and ${SRCTOP}/usr.bin/foo over ${.CURDIR}/../foo for paths in Makefiles. Differential Revision: https://reviews.freebsd.org/D9932 Sponsored by: Netflix Silence on: arch@ (twice) Notes: svn path=/head/; revision=315170
* Add META_MODE support.Simon J. Gerraty2015-06-131-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * Merge sync of headSimon J. Gerraty2015-05-271-2/+1
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=283595
| * \ Merge from headSimon J. Gerraty2014-05-081-2/+2
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265720
| * | | Do no assume ${DESTDIR}/usr/include is always validSimon J. Gerraty2013-02-201-1/+2
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=247015
* | | | Move contrib/top/top.X to contrib/top/top.xs and moveMarcel Moolenaar2015-06-081-2/+2
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | contrib/top/top.local.H to contrib/top/top.local.hs. This fixes a build breakage when src is on a case- insensitive file system -- we never properly create top.x nor top.local.h. Change the makefile accordingly. MFC after: 3 days Notes: svn path=/head/; revision=284165
* | | Convert to usr.bin/ to LIBADDBaptiste Daroussin2014-11-251-2/+1
| |/ |/| | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275042
* | Add -J command/flag to filter by jail name/jid. This will automaticallyBryan Drewery2014-05-021-2/+2
|/ | | | | | | | | | | | | display the JID as well (the -j command/flag). 0 displays host. + displays all. MFC after: 2 weeks Relnotes: yes Notes: svn path=/head/; revision=265249
* Build usr.bin/ with WARNS=6 by default.Ed Schouten2010-01-021-0/+2
| | | | | | | Also add some missing $FreeBSD$ to keep svn happy. Notes: svn path=/head/; revision=201386
* The sigconv.awk script generates a sigdesc.h header file, whichGiorgos Keramidas2006-12-011-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=164784
* Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3.Mark Murray2002-02-081-2/+0
| | | | Notes: svn path=/head/; revision=90416
* Add new option HAVE_STRERROR to CFLAGS.David Malone2002-01-241-1/+1
| | | | Notes: svn path=/head/; revision=89759
* Protect this against the coming WARNS=2 default.Mark Murray2001-12-121-0/+2
| | | | Notes: svn path=/head/; revision=87713
* Generate top.local.h and manpage dynamically, with sed(1) script.Ruslan Ermilov2001-07-121-4/+16
| | | | | | | | | The generated manpage will now describe the actual behavior of top(1) WRT how many processes it displays. This also eliminates all troff(1) warnings. Notes: svn path=/head/; revision=79636
* Remove directive to install top as group kmem. Remove directive toRobert Watson2001-02-231-2/+1
| | | | | | | install top with setgid bit. Notes: svn path=/head/; revision=72952
* Merge from stable: support for the o, order, commandWolfram Schneider1998-08-121-1/+1
| | | | Notes: svn path=/head/; revision=38278
* Added top.1 to CLEANFILES.Bruce Evans1997-07-211-0/+1
| | | | Notes: svn path=/head/; revision=27583
* move top.1 -> top.local.1, and generate top.1 so that the man pagePeter Wemm1997-04-051-0/+3
| | | | | | | is remotely useful Notes: svn path=/head/; revision=24664
* Remove libcurses, it is pure termcap applicationAndrey A. Chernov1997-03-241-2/+2
| | | | Notes: svn path=/head/; revision=24211
* This is the FreeBSD-specific files for top, plus the MakefileJoerg Wunsch1997-03-231-0/+25
that pulls all the files from contrib. Obtained from: The ports collection (mostly). Notes: svn path=/cvs2svn/branches/FREEBSD/; revision=24143