History log of /netbsd-current/usr.bin/mkdep/mkdep.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.47 20-Aug-2021 rillig

mkdep: make argument of findcc const

Previously, findcc modified its argument string, even though it had been
declared as 'const char *'. This triggered a lint warning that "strchr
effectively discards 'const char *' from argument", in fact, this code
caused the lint check to be implemented in the first place.

The first attempt at fixing it by removing the 'const' from the
parameter type was a bad idea since it made the API of that function
more complicated.

Revert back to making the parameter a 'const char *' and duplicate that
string internally as necessary. Add a few more tests for absolute
pathnames since these had been missing before. There are no tests yet
for snprintf with too long strings, but the current change does not
modify that part of the code.


# 1.46 20-Aug-2021 rillig

mkdep: fix string constness in call to findcc


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625
# 1.45 23-May-2018 joerg

deconst -> __UNCONST to avoid null pointer arithmetic


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.44 16-Jun-2015 christos

branches: 1.44.14;
fix some error handling.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base tls-maxphys-base
# 1.43 05-Mar-2013 christos

Conditionally include the depend files.


# 1.42 05-Mar-2013 christos

add -i and -v


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.41 26-Aug-2012 jmmv

branches: 1.41.2;
Add a new "-P prefix" option to mkdep(1).

This option prepends the string given in prefix to every target
filename. This is useful for programs that have source files in
multiple subdirectories and a single Makefile that references all of
them explicitly (without using the VPATH functionality because there
can be files with the same name in each subdirectory).


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.40 04-Sep-2011 joerg

branches: 1.40.2;
ANSIfy + static + __dead


# 1.39 30-Jun-2011 wiz

dependant -> dependent


Revision tags: cherry-xenmp-base
# 1.38 31-May-2011 enami

Don't touch before the mmap'ed region.


# 1.37 30-May-2011 christos

Handle the empty suffix properly. Convert suffix list to a list from an
array and don't have limits in the suffix length. Also don't require that
suffixes have a single dot.


# 1.36 17-Apr-2011 christos

Recognize --sysroot but don't document it or do anything about it for now.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.35 26-May-2010 christos

fix empty suffix case.


# 1.34 26-May-2010 christos

PR/43364: Nicolas Joly: mkdep(1) wrong target names when suffix list miss .o


Revision tags: matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
# 1.33 12-Apr-2009 lukem

fix -Wcast-qual & -Wsign-compare issues


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2
# 1.32 21-Jul-2008 lukem

branches: 1.32.6;
Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base
# 1.31 28-Apr-2008 martin

branches: 1.31.2;
Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
# 1.30 25-Sep-2007 lukem

branches: 1.30.6;
remove unnecessary #include


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-mips64-base wrstuden-fixsa-base netbsd-4-base
# 1.29 15-Oct-2006 christos

branches: 1.29.8;
- 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 :


Revision tags: abandoned-netbsd-4-base chap-midi-nbase chap-midi-base
# 1.28 20-Mar-2006 christos

make this compile again.


# 1.27 20-Mar-2006 elad

plug leaks, coverity cids 92, 93.


# 1.26 12-Dec-2005 wiz

Sort options.


# 1.25 12-Dec-2005 dsl

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.


# 1.24 07-Jun-2005 he

Initialize a couple of local variables to appease -Wuninitialized.
Marked with XXXGCC for sun2 (found while compiling for it).

Reviewed by lukem.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.23 13-Jul-2004 wiz

Sync usage with man page. From Kouichirou Hiratsuka in PR 26224.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.22 26-Jan-2004 dsl

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.


# 1.21 07-Dec-2003 dsl

Only emit each filename once in a single .OPTIONAL line when -o is given.
(Saves several MB for kernel .depend files.)


# 1.20 11-Nov-2003 dsl

Don't rely on mmap giving a NUL terminated buffer.
Let '--' be used to separate options to mkdep from those to cc.


# 1.19 10-Nov-2003 dsl

Fix continuation line handling.


# 1.18 10-Nov-2003 dsl

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...)


# 1.17 27-Oct-2003 lukem

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).


# 1.16 28-Mar-2003 msaitoh

catch SIGPIPE, too.


# 1.15 19-Jan-2003 elric

Backing this out until it works.


# 1.14 18-Jan-2003 jmmv

When an unknown option is found, ignore it, as it may be cc related (i.e.,
-D and -I options).


# 1.13 18-Jan-2003 jmmv

Use getopt(3) instead of specific code to parse options.
Reviewed by jdolecek.


# 1.12 16-Jan-2003 msaitoh

catch SIGINT, SIGHUP, SIGQUIT and SIGTERM to clear a temporary file.


Revision tags: fvdl_fs64_base
# 1.11 14-Jun-2002 simonb

Split out the findcc() function that tries to determine the path to
the C compiler so other programs can use it.


Revision tags: netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.10 31-Jan-2002 tv

branches: 1.10.2;
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.


# 1.9 21-Jan-2002 tv

Add hooks for cross-hosting on non-NetBSD platforms.


# 1.8 22-Mar-2001 cgd

a couple of tiny whitespace cleanups


# 1.7 22-Mar-2001 cgd

get closer to KNF.


# 1.6 22-Mar-2001 cgd

convert uses of hard-coded string "mkdep" to use getprogname().


# 1.5 21-Feb-2001 cgd

call setprogname(argv[0]) at start of main()


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.4 21-Jul-1999 kleink

branches: 1.4.8;
Rather than hardcoding _PATH_TMP (and relying on const string concatenation),
try TMPDIR (if set in the environment).


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.3 31-Mar-1999 kleink

* Make usage string reflect reality,
* declare internal utility functions static,
* remove unneeded workarounds for bogus -Wuninitialized reports,
* delint.


# 1.2 18-Mar-1999 sommerfe

Do something sane if we have CC='cc -pipe' set


# 1.1 25-Jan-1999 tron

branches: 1.1.1;
Initial revision


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625
# 1.45 23-May-2018 joerg

deconst -> __UNCONST to avoid null pointer arithmetic


Revision tags: netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.44 16-Jun-2015 christos

branches: 1.44.14;
fix some error handling.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base tls-maxphys-base
# 1.43 05-Mar-2013 christos

Conditionally include the depend files.


# 1.42 05-Mar-2013 christos

add -i and -v


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.41 26-Aug-2012 jmmv

branches: 1.41.2;
Add a new "-P prefix" option to mkdep(1).

This option prepends the string given in prefix to every target
filename. This is useful for programs that have source files in
multiple subdirectories and a single Makefile that references all of
them explicitly (without using the VPATH functionality because there
can be files with the same name in each subdirectory).


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.40 04-Sep-2011 joerg

branches: 1.40.2;
ANSIfy + static + __dead


# 1.39 30-Jun-2011 wiz

dependant -> dependent


Revision tags: cherry-xenmp-base
# 1.38 31-May-2011 enami

Don't touch before the mmap'ed region.


# 1.37 30-May-2011 christos

Handle the empty suffix properly. Convert suffix list to a list from an
array and don't have limits in the suffix length. Also don't require that
suffixes have a single dot.


# 1.36 17-Apr-2011 christos

Recognize --sysroot but don't document it or do anything about it for now.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.35 26-May-2010 christos

fix empty suffix case.


# 1.34 26-May-2010 christos

PR/43364: Nicolas Joly: mkdep(1) wrong target names when suffix list miss .o


Revision tags: matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
# 1.33 12-Apr-2009 lukem

fix -Wcast-qual & -Wsign-compare issues


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2
# 1.32 21-Jul-2008 lukem

branches: 1.32.6;
Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base
# 1.31 28-Apr-2008 martin

branches: 1.31.2;
Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
# 1.30 25-Sep-2007 lukem

branches: 1.30.6;
remove unnecessary #include


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-mips64-base wrstuden-fixsa-base netbsd-4-base
# 1.29 15-Oct-2006 christos

branches: 1.29.8;
- 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 :


Revision tags: abandoned-netbsd-4-base chap-midi-nbase chap-midi-base
# 1.28 20-Mar-2006 christos

make this compile again.


# 1.27 20-Mar-2006 elad

plug leaks, coverity cids 92, 93.


# 1.26 12-Dec-2005 wiz

Sort options.


# 1.25 12-Dec-2005 dsl

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.


# 1.24 07-Jun-2005 he

Initialize a couple of local variables to appease -Wuninitialized.
Marked with XXXGCC for sun2 (found while compiling for it).

Reviewed by lukem.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.23 13-Jul-2004 wiz

Sync usage with man page. From Kouichirou Hiratsuka in PR 26224.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.22 26-Jan-2004 dsl

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.


# 1.21 07-Dec-2003 dsl

Only emit each filename once in a single .OPTIONAL line when -o is given.
(Saves several MB for kernel .depend files.)


# 1.20 11-Nov-2003 dsl

Don't rely on mmap giving a NUL terminated buffer.
Let '--' be used to separate options to mkdep from those to cc.


# 1.19 10-Nov-2003 dsl

Fix continuation line handling.


# 1.18 10-Nov-2003 dsl

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...)


# 1.17 27-Oct-2003 lukem

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).


# 1.16 28-Mar-2003 msaitoh

catch SIGPIPE, too.


# 1.15 19-Jan-2003 elric

Backing this out until it works.


# 1.14 18-Jan-2003 jmmv

When an unknown option is found, ignore it, as it may be cc related (i.e.,
-D and -I options).


# 1.13 18-Jan-2003 jmmv

Use getopt(3) instead of specific code to parse options.
Reviewed by jdolecek.


# 1.12 16-Jan-2003 msaitoh

catch SIGINT, SIGHUP, SIGQUIT and SIGTERM to clear a temporary file.


Revision tags: fvdl_fs64_base
# 1.11 14-Jun-2002 simonb

Split out the findcc() function that tries to determine the path to
the C compiler so other programs can use it.


Revision tags: netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.10 31-Jan-2002 tv

branches: 1.10.2;
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.


# 1.9 21-Jan-2002 tv

Add hooks for cross-hosting on non-NetBSD platforms.


# 1.8 22-Mar-2001 cgd

a couple of tiny whitespace cleanups


# 1.7 22-Mar-2001 cgd

get closer to KNF.


# 1.6 22-Mar-2001 cgd

convert uses of hard-coded string "mkdep" to use getprogname().


# 1.5 21-Feb-2001 cgd

call setprogname(argv[0]) at start of main()


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.4 21-Jul-1999 kleink

branches: 1.4.8;
Rather than hardcoding _PATH_TMP (and relying on const string concatenation),
try TMPDIR (if set in the environment).


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.3 31-Mar-1999 kleink

* Make usage string reflect reality,
* declare internal utility functions static,
* remove unneeded workarounds for bogus -Wuninitialized reports,
* delint.


# 1.2 18-Mar-1999 sommerfe

Do something sane if we have CC='cc -pipe' set


# 1.1 25-Jan-1999 tron

branches: 1.1.1;
Initial revision