Commit Graph

32 Commits

Author SHA1 Message Date
lukem 98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
lukem a213122ebe remove unnecessary #include 2007-09-25 04:36:30 +00:00
christos 6cbdf318bf - make a variable volatile, that gcc warns vfork will clobber.
- don't blindly walk before the beginning of the buffer because of a
  corrupt dependency file. In this case the first character of the
  dependency file was a :
2006-10-15 18:50:47 +00:00
christos 9731df7d2d make this compile again. 2006-03-20 23:13:51 +00:00
elad cd7d931d2e plug leaks, coverity cids 92, 93. 2006-03-20 17:18:06 +00:00
wiz dbaaaf27a8 Sort options. 2005-12-12 22:49:37 +00:00
dsl 0f4ad533d7 Add a -D option that acts like -d, but reads the filenames (whitespace
separated) from stdin.
Useful (eg in Makefile.kern.inc) to avoid breaking the systems command
line limit.
2005-12-12 22:05:28 +00:00
he f104d7d50d Initialize a couple of local variables to appease -Wuninitialized.
Marked with XXXGCC for sun2 (found while compiling for it).

Reviewed by lukem.
2005-06-07 09:33:37 +00:00
wiz 1c7022e424 Sync usage with man page. From Kouichirou Hiratsuka in PR 26224. 2004-07-13 12:00:30 +00:00
dsl 36af2f9f0c Redo code that expands the 'xxx.o' to 'xxx.o xxx.so xxx.po xxx.ln' so that
is doesn't care which of the wanted suffixes are in the input file.
Needed for my autodepend code where you don't know which compilation ran last.
2004-01-26 21:47:04 +00:00
dsl 43296f2aec Only emit each filename once in a single .OPTIONAL line when -o is given.
(Saves several MB for kernel .depend files.)
2003-12-07 20:22:49 +00:00
dsl 60dd40c33a Don't rely on mmap giving a NUL terminated buffer.
Let '--' be used to separate options to mkdep from those to cc.
2003-11-11 10:55:24 +00:00
dsl c934ce564a Fix continuation line handling. 2003-11-10 18:43:15 +00:00
dsl cffe183eef Add the following options with a view to using 'cc -MD' to automatically
create dependency files:
	-d	process xxx.d files to generate .depend (don't run ${CC})
	-o	add .OPTIONAL: <headers> to output file
	-q	don't print warnins for missing files (with -d)
	-s suf	list of suffixes to replace ".o"
The -s suf should allow all the 'afterdepend' stuff to be killed.
(christos thought this might be a good idea...)
2003-11-10 17:56:38 +00:00
lukem 171d653219 Overhaul how `build.sh tools' are used:
*	Rename "config.h" to "nbtool_config.h" and
	HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
	This makes in more obvious in the source when we're using
	tools/compat/config.h versus "standard autoconf" config.h

    *	Consistently move the inclusion of nbtool_config.h to before
    	<sys/cdefs.h> so that the former can provide __RCSID() (et al),
    	and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
	#if HAVE_NBTOOL_CONFIG_H
	#include "nbtool_config.h"
	#endif
to the top of the source files (for the general case).
2003-10-27 00:12:41 +00:00
msaitoh bc44d1eef4 catch SIGPIPE, too. 2003-03-28 07:38:15 +00:00
elric 3799cab605 Backing this out until it works. 2003-01-19 00:42:45 +00:00
jmmv 1f46362208 When an unknown option is found, ignore it, as it may be cc related (i.e.,
-D and -I options).
2003-01-18 22:32:20 +00:00
jmmv c69d292b43 Use getopt(3) instead of specific code to parse options.
Reviewed by jdolecek.
2003-01-18 21:13:58 +00:00
msaitoh e43fc70de5 catch SIGINT, SIGHUP, SIGQUIT and SIGTERM to clear a temporary file. 2003-01-16 08:05:09 +00:00
simonb f76ac8f4dc Split out the findcc() function that tries to determine the path to
the C compiler so other programs can use it.
2002-06-14 23:14:18 +00:00
tv 9fbd88883c Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
  sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
2002-01-31 22:43:33 +00:00
tv 5c99654526 Add hooks for cross-hosting on non-NetBSD platforms. 2002-01-21 19:22:53 +00:00
cgd f60321832b a couple of tiny whitespace cleanups 2001-03-22 02:41:02 +00:00
cgd f3dd4051a1 get closer to KNF. 2001-03-22 02:33:47 +00:00
cgd baa3e1d8d4 convert uses of hard-coded string "mkdep" to use getprogname(). 2001-03-22 00:16:50 +00:00
cgd 040de26f85 call setprogname(argv[0]) at start of main() 2001-02-21 00:06:22 +00:00
kleink fbfc6d0d28 Rather than hardcoding _PATH_TMP (and relying on const string concatenation),
try TMPDIR (if set in the environment).
1999-07-21 15:20:55 +00:00
kleink 7a5c45dac4 * Make usage string reflect reality,
* declare internal utility functions static,
* remove unneeded workarounds for bogus -Wuninitialized reports,
* delint.
1999-03-31 11:26:45 +00:00
sommerfe 05ccb4009e Do something sane if we have CC='cc -pipe' set 1999-03-18 22:01:48 +00:00
tron c0f4850d5c New C program to replace old "mkdep" script. Speeds up "make depend"
by at least 5 percent.
1999-01-25 22:10:42 +00:00