Commit Graph

310 Commits

Author SHA1 Message Date
mason
0418d87f4b fix typo in comment 2004-11-05 18:07:27 +00:00
dsl
e09553f3ac Add (unsigned char) cast to ctype functions 2004-10-29 20:33:06 +00:00
heas
ca470f56bb Carriage return missing in error message. 2004-06-27 02:59:46 +00:00
jmc
b2f782612f Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
2004-06-20 22:20:14 +00:00
itojun
62f70e2fb5 suppress -Wunused 2004-06-05 05:07:02 +00:00
thorpej
ee3cac8241 Tweak the grammar so that conditional makeoptions work in files.* files
as intended.

Problem noted by itojun on tech-kern.
2004-06-05 03:21:53 +00:00
thorpej
ea6a34247c vmunix -> netbsd 2004-06-04 23:44:35 +00:00
thorpej
7729811d27 One final place for strtolower() treatment. 2004-06-04 23:41:14 +00:00
thorpej
05c577b03f Use strtolower() in a couple more places. 2004-06-04 23:36:50 +00:00
thorpej
2d9180a3cc Add "conditional appending makeoptions". Syntax is:
makeoptions selector FOO+=bar

"selector" may be anything used as a key in the selecttab, i.e. an option,
a "device" name, an "attach" name, a file system, etc.

Semantics: FOO+=bar when the selector is set.  For example, if you have:

makeoptions pickle CPPFLAGS+=-I${S}/picklesrc

then "options PICKLE" will cause "CPPFLAGS+=-I${S}/picklesrc" to be
added to the Makefile.

Suggested by Matt Thomas.
2004-06-04 07:28:26 +00:00
thorpej
b8ef2fe993 Add support for "appending makeoptions". The syntax in the config file is:
makeoptions FOO+=bar

Multiple appending makeoptions are allowed.  These are then emitted at
the %MAKEOPTIONSAPPEND token in the Makefile template.

Syntax suggested by Matt Thomas.
2004-06-04 04:38:27 +00:00
matt
84db866b89 Make the token be alphabetical (mostly) and each starting letter has
its own line(s).
2004-06-03 18:37:59 +00:00
grant
1d410ae5a8 tweak "abc cannot attach to xyz" error to read a little clearer. 2004-05-22 04:04:13 +00:00
lukem
c09971991d Be consistent in error messages, and don't use the <err.h> functions. 2003-12-02 05:11:42 +00:00
rafal
8489e24b62 Make sure to also zero out structures put on local free lists so allocations
satisfied from those lists get zeroed memory back too.
2003-11-25 19:34:05 +00:00
christos
57a881013d Define ecalloc() and use it when initializing data structures. 2003-11-24 21:44:37 +00:00
christos
717444998f Add long-long cast for cross-build printf portability. We could be using
PRI* macros, but that would be too much complexity for a host tool.
2003-11-19 21:10:27 +00:00
christos
bb4ed2e755 PR/23490: Jason Thorpe: 64-bit config(8) breaks negative RTC_OFFSET
Fixed by preserving the format of the input number and using it to format
the output number. This avoids the -10 < n < 10 kludge.
2003-11-19 18:06:13 +00:00
fvdl
dc7e96bea0 Use int64_t to store numeric values, so that values larger than 2^32
may be specified in options.
2003-11-18 18:47:36 +00:00
matt
b91abd5ac8 Don't use _PATH_UNIX on non-NetBSD hosts. 2003-11-12 01:24:15 +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
he
c42a239b5a Make this compile again. 2003-10-19 23:15:54 +00:00
lukem
8545f3b03c Switch back to using YHEADER instead of custom yacc rules.
We use build.sh to support hosting on older NetBSD releases...
2003-10-19 05:30:30 +00:00
itojun
e99b62a1d7 realloc pedant 2003-09-19 06:11:35 +00:00
jmmv
94114f39df Use tabs for indentation; pointed out by simonb@. 2003-09-14 12:43:04 +00:00
jmmv
fc7230200f Fix crash when using the '-x' flag. 2003-09-14 12:35:46 +00:00
jmmv
ce413b6dd1 Fix some warnings. 2003-09-14 12:33:05 +00:00
cl
289a48a2fc free string only after it's no longer used through dirname reference. 2003-09-08 17:50:12 +00:00
thorpej
d00feb8a89 Allow file inclusions to be relative to the file currently being
included.  This is done by tracking the current directory for the
file being parsed, and constructing a path relative to that directory
when an include directive's file name begins with "./".
2003-09-03 18:56:37 +00:00
agc
326b2259b7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
2003-08-07 11:25:11 +00:00
itojun
bd719499fb use bounded string op 2003-07-15 12:33:17 +00:00
itojun
9e765fb451 use bounded string op 2003-07-13 12:39:08 +00:00
itojun
e8f0e61fd7 use bounded string op 2003-07-13 12:29:20 +00:00
jrf
d9791f82a0 This addresses PR 19797, a small patch made by Tor Stormwall to add
a simple print statement showing the build directory location after
running config and creating a usage() function instead of using the
goto usage statement. Approved by christos@ and thanks to Tor for
the suggestions and patch.
2003-07-02 16:47:53 +00:00
heas
566bb2555a Deref the nv_list pointer and take it's address; cleaner and more clear.
as suggested by enami.
2003-06-27 18:42:11 +00:00
heas
3ff52bc3f5 Correct comment string "mkoptions" -> "makeoptions" 2003-06-25 07:02:04 +00:00
heas
626ce79cef When removing a nvlist entry (describing an option, makeoption, etc) in
undo_config, if that entry is the tail of the LL, also update the appropriate
tail point (nextopt, etc).
2003-06-25 06:42:40 +00:00
atatat
d2f781064e If the file being stuffed into the config file string for inclusion in
the kernel is missing the newline at the end of the file, the string
doesn't get closed properly, resulting in a message from the compiler
about a missing #endif.  It's somewhat misleading, so config will now
point it out and compensate for the missing newline.

Addresses PR kern/21920: including kernel config fails in some cases.
2003-06-18 04:19:49 +00:00
lukem
826a14607a Now that <bsd.prog.mk> DTRT if HOSTPROG is defined (i.e, it is a no-op),
there's no need to special-case .include-ing it.
2003-05-18 07:57:31 +00:00
itojun
f35cce81c8 strncpy -> strlcpy 2003-05-17 18:51:13 +00:00
jmmv
42c016f444 Note when the -x option appeared; this was in the original patch... 2003-04-26 18:12:00 +00:00
jmmv
f37b7f38ab Let config extract embedded configuration data from kernels that were built
with either "options INCLUDE_CONFIG_FILE" or "options INCLUDE_JUST_CONFIG".

The program can now be invoked like:
- config -b objdir -s srcdir /netbsd
  This will use configuration data from /netbsd to automatically create the
  build directory of the new kernel.
- config -x /netbsd > CONFFILE
  This will store configuration data from /netbsd in the CONFFILE file for
  further editing.
2003-04-26 12:53:43 +00:00
jmmv
595e7da8dc New sentence, new line. 2003-04-24 13:23:55 +00:00
jmmv
85cbefaced Avoid running config on directories (i.e., config /tmp), as the error message
given is unclear.  Closes my own PR bin/18785.
2003-04-11 10:53:52 +00:00
matt
e86e032c61 Make cfroots const. 2003-03-16 08:09:58 +00:00
wiz
990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
thorpej
a151e17b89 Allow pseudo-devices to be declared with an interface attribute. For
such pseudo-devices, create cfdrivers for them which carry the appropriate
attributes.  This allows devices in the config file to be attached to
pseudo-devices.
2003-01-27 05:00:54 +00:00
gehenna
c8d83dee30 Accept the block-device-only devices.
Reported by ragge.
2003-01-23 15:05:45 +00:00
gehenna
d0c0162e9c Not necessary to put fixdevmtab in global section. 2003-01-23 15:03:44 +00:00
gehenna
02681cddbc check the duplication or the inconsistency before evaluating fopts. 2003-01-23 15:01:54 +00:00