Commit Graph

192 Commits

Author SHA1 Message Date
pk e678b7f1d0 Use .ORDER targets to express the dependencies on subdir runs. This makes
the resulting tree complexity O(N) (N=# of subdirs), and it also makes it
easier to comprehend the Makefile logic.
2002-02-10 15:46:42 +00:00
pk b3ddad6b4b Make sure to not go off installing in a directory before it's fully made. 2002-02-08 17:48:38 +00:00
lukem 64d97711a2 remove btodb() hack now that makefs doesn't need it anymore.
the #define was wrong anyway; it was x<<9 instead of x>>9
2002-02-06 15:39:01 +00:00
tv e5d6f46d5a Fix up the .for recursion -- it wasn't quite right before. 2002-02-01 13:51:38 +00:00
tv 6bd56c8eda Cross-hosting notes for foreign OS's. (Currently Linux, Solaris, and older
releases of NetBSD.)
2002-02-01 04:43:39 +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 2004638500 Include config.h unconditionally; clean up. 2002-01-31 19:23:14 +00:00
tv eee751dc15 Define NOID to eliminate the rcsid. 2002-01-31 19:22:40 +00:00
tv 4ada663465 Provide a default string so host tools that forget to call setprogname()
won't accidentally segfault just trying to print a usage message.
2002-01-31 19:21:58 +00:00
tv f4554f775d Make sure there are no weak references in libnbcompat (avoids linker
confusion issues).
2002-01-31 19:20:14 +00:00
tv 87ed89b8e3 Make sure MAKEINFO is defined, as it appears that toolchain/texinfo is not
auto-built.
2002-01-31 15:25:08 +00:00
tv 5ab7a8d3e1 Remove g= override. 2002-01-31 15:24:36 +00:00
tv c10af7be1e Make sure LEX and YACC are properly defined (mainly for groff); also use
a more portable grep construct.
2002-01-31 02:42:25 +00:00
tv a328e34106 Make almost all tools compile and run properly on non-NetBSD hosts. (In
particular, most tools now run correctly on Solaris 7.)
2002-01-29 10:20:28 +00:00
tv 0c41d3705e Ensure a space after # or #line so we don't pick up stray #pragmas and
so forth in the .depend file.
2002-01-28 19:26:35 +00:00
tv 3dc61f3b98 Make util.c replacement functions use autoconf conditionals to probe
what is Really available in the host OS.
2002-01-25 17:51:31 +00:00
tv 371a05affa Abort on C compiler error. Add @DEFS@ to compile line. 2002-01-25 17:50:28 +00:00
lukem a2a5907be5 build pax as a host tool, for -N and to work around borken vendor paxes 2002-01-25 05:01:17 +00:00
lukem 2b616edfca - Replace pwcache(3) if necessary (pwcache_userdb(3) is checked for).
Tested on -current and 1.5.3.
- Wrap some long lines.
2002-01-24 04:05:27 +00:00
lukem 1fdf0d0e12 remove 2002-01-23 02:31:33 +00:00
thorpej d00b294ffa Split compat definitions into a separate file so that autoconf
doesn't comment out #undef's that we want to keep.
2002-01-22 20:42:59 +00:00
lukem 60eebeccec reachover to ../../lib/libutil for fparseln.c 2002-01-21 23:35:14 +00:00
tv 9a14a10fb6 Somewhere along the line, the _DIAGASSERT was lost. Re-add it (as a macro
that expands to nothing); only NetBSD hosts really have this.
2002-01-21 23:22:17 +00:00
tv 9c06c04bee Missed in last commit: make some tools build properly on non-NetBSD hosts. 2002-01-21 20:59:40 +00:00
tv 9d5d28c26f Make many host tools compile on non-NetBSD hosts. Not complete, but
very nearly there.
2002-01-21 20:04:36 +00:00
tv a08f30a6ee Break out make(1) bootstrap config into an autoconf-based mechanism that
generates a shell script.  Check for existence of POSIX regex, and make
sure an appropriate library is pulled in for it as needed.
2002-01-15 19:15:47 +00:00
lukem 729f9d86cc rcsid 2002-01-13 12:45:23 +00:00
tv 5457974230 Move host-mkdep to its own directory. Create and install it before
everything else.  Now it's possible for the target mkdep to build and
install like "normal" host-tools do; should remove the function decl
warnings reported by greywolf@starwolf.com on current-users.
2002-01-10 17:04:20 +00:00
mrg f6a5bde398 build sunlabel as a host tool (not enabled in tools/Makefile yet) 2002-01-10 16:35:05 +00:00
lukem 96119ca83f - act more like lib/libc/gen/setprogname.c, and store the basename of
the argument to setprogname()
- knf
2002-01-10 05:35:42 +00:00
lukem 328430b633 revert previous, and reenable tools/makefs now that it works on
netbsd-current and netbsd-1-5
2002-01-10 05:17:20 +00:00
lukem 3e8ee2e17f Symlink ./ufs to ${.CURDIR}/../../sys/ufs, and add -I. to HOST_CPPFLAGS.
This means that <ufs/*/*.h> come from ../../sys/ufs, but other
<sys/*> header files still come from the host system's /usr/include.

This slightly ugly hack to the Makefile means that makefs compiles on
-current and 1.5.x machines (and other systems), without requiring
major code rewrites in sys/ufs/ffs to allow sharing and without
requiring duplication of sys/ufs/ffs* under usr.sbin/makefs.
2002-01-10 05:03:45 +00:00
lukem c6934ce7ad regen from configure.ac 1.3 for <inttypes.h> change 2002-01-10 04:32:18 +00:00
lukem fe4a1b3537 look for <inttypes.h> and #include if found (for uint*_t) 2002-01-10 04:31:15 +00:00
tv bc23e55bd1 Disable makefs in src/tools for the moment; it's very dependent on -current
NetBSD headers and sources right now.  (Temporary workaround for PR 15175.)
2002-01-09 16:58:35 +00:00
mrg 5bd0c76f92 build zic as a host tool. 2002-01-05 07:36:33 +00:00
mrg fc820c7268 build makefs, and, sparc-installboot if sparc||sparc64 2002-01-05 07:03:30 +00:00
mrg 2218533d73 build this as a host tool. 2002-01-05 07:00:56 +00:00
lukem 07fae6dedd Add replacement fgetln(3) (from lukemftp/libukem), as fparseln(3) uses it 2002-01-04 14:39:06 +00:00
lukem cd2127f548 remove lukemftp comment; this is just as close to the libutil version 2002-01-04 14:30:51 +00:00
lukem 85b0720ce9 need <errno.h> and <stdarg.h> 2002-01-04 14:28:05 +00:00
tv 40d58903e4 Work around some braindamage in our "yacc": its generated #line directives
always name the file "y.tab.c", not what it is really named via "-o".
2002-01-04 13:35:23 +00:00
tv 06f06e280f Add more tolerant script-based implementation of mkdep for host tool
compiles.  Based loosely on mkdep.old.compiler (so CSRG license copied),
but now uses just one rewrite (awk) process per cpp invocation and
determines the proper way to run cpp and awk via a "configure" script.

Use HOST_MKDEP in bsd.hostlib/hostprog.mk (defaulting to the old override
value of MKDEP), and give it a TOOLDIR equivalent in bsd.own.mk.
2002-01-03 22:45:23 +00:00
tv fe9dd95fc6 Remove stray diagnostic "echo". 2002-01-03 16:47:08 +00:00
tv b6ed0d753c * Honor BUILD on "make install" (will do "make all" first).
* Make "make all" update the .build_done timestamp more intelligently;
  if no files changed in the build tree, don't touch the timestamp.
  (This allows UPDATE and BUILD to function correctly.)
2002-01-03 16:45:18 +00:00
tv ff6a46630e * Now that src/share/tmac no longer uses absolute paths, nuke the sed
transform.

* Use a .USE rule for the tmac installation (reduce redundancy).

* Suppress spurious messages from "cmp".
2002-01-03 16:38:50 +00:00
mrg 706a739f19 build a sparc/sparc64 useful installboot. called nbsparc-installboot 2002-01-02 05:26:58 +00:00
thorpej 88371dafeb We can't currently build a toolchain for x86-64 here, so don't
attempt to do so.
2001-12-31 22:35:41 +00:00
wiz ecc52c5854 Typo fix in error message. 2001-12-29 15:45:52 +00:00
tv 94d108be2e Avoid building and installing every time, so that we don't have toolchain
dependencies cause things like constantly regenerating catpages....
2001-12-13 19:36:22 +00:00
lukem 94ff981067 missed a couple of NOMAN= :( 2001-12-13 03:44:37 +00:00
lukem d8b4b32178 no need to set NOMAN twice 2001-12-12 12:07:26 +00:00
tv 9156c43a3a Add NOMAN/NOLINT. 2001-12-12 02:48:46 +00:00
tv 7facb14657 Fix use of @. 2001-12-12 02:42:17 +00:00
tv 8e6f7afb5b MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
tv 87d14ee4ac Add the framework for autoconf-based src/tools/compat structure. This will
(after it is more fleshed out) allow the host tools to work more cleanly
on non-NetBSD hosts.
2001-12-11 21:17:56 +00:00
jmc a6eb3732ce Need ${TMACDIR}/tmac.an.old installed as well. Also include UPDATE checks
around this rule and the tmac.an rule.
2001-12-09 23:34:31 +00:00
jmc 6050051aa4 Fix the files pulled in from src/share/tmac. Need to replace the hardcoded
/usr/share/tmac in them with ${TMACDIR} so the cross groff doesn't just
end up using the currently installed macro set to build man pages.
2001-12-09 06:12:26 +00:00
jmc 0ce9aa8e6c Add pwd_mkdb as a toolchain bit for builds 2001-12-07 02:28:53 +00:00
jmc 1bcf4d49b2 Make sure and run sh configure as it may not have execute permissions. 2001-12-02 03:03:12 +00:00
thorpej 7c2121a815 Build makewhatis as a host tool, since it is used at the end of
the build.

XXX Needs a -lz hostlib.
2001-11-29 23:51:38 +00:00
jmc 60f22ac7b8 After bsd.man.mk changes make sure and set TMACDIR here to point into 2001-11-28 05:01:59 +00:00
jmc 5a0f427e5a Oops. typo which can break things for non-new toolchain builds if MKTOOLS isn't
set
2001-11-22 19:09:42 +00:00
jmc 9a35e17e68 Make the null rule execute something so make is appeased if the .y file is
newer than the checked in .c file. Otherwise make errors out.
2001-11-22 08:20:07 +00:00
jmc 0d11dd0127 Check for USETOOLS!=yes in addition to MKTOOLS==no to generate the empty rule
sets. Otherwise platforms not running the new toolchain will end up with
lossage as tools attempt to get built and installed into /bin (due to
bsd.own.mk properly checking USETOOLS before setting up a default TOOLDIR).
Don't print the warning unless MKTOOLS=no
2001-11-22 00:13:10 +00:00
perry 184d8eecad replace instances of INSTALL_FILE with HOST_INSTALL_FILE 2001-11-19 04:47:42 +00:00
tv f39f0b5131 Workaround some make(1) braindamage wrt when it tries to "auto-chdir"
back to ${.CURDIR}.  How losing....
2001-11-16 16:41:46 +00:00
tv b384b10366 Change .MAKEFLAGS to MAKE_ARGS so MACHINE doesn't get trashed in some
cases.
2001-11-16 01:50:17 +00:00
tv 0911b89ff5 Fix the fix; only install gcc once. 2001-11-15 00:20:26 +00:00
thorpej 2536e6bcf3 Fix a typo in the install target list. 2001-11-15 00:17:54 +00:00
tv bd55c68a03 Use ${TOOLDIR}/bin/nbm4. 2001-11-14 23:19:11 +00:00
tv 7cbe8c2c16 Recheck the GNU configuration if ${.CURDIR}/Makefile changes. 2001-11-14 22:14:48 +00:00
tv d21f3d4a13 Prefix all target-specific things with `${MACHINE_GNU_PLATFORM}-'.
Prefix all non-target-specific things with `nb'.
2001-11-14 22:13:39 +00:00
tv 054166f6cf Use ${INSTALL_FILE:N-U}. 2001-11-14 22:07:03 +00:00
tv 06be8101a1 Add autoconf as a host tool, not built by default. 2001-11-14 20:05:23 +00:00
tv 6b68aed49a Add m4 to host tools (not built by default). 2001-11-14 15:32:05 +00:00
tv 25c34dba0d Move host program overrides of INSTALL and MKDEP to <bsd.hostprog.mk>. 2001-11-13 17:36:14 +00:00
tv 259ff4e7d0 Re-add MKTOOLS as a "yes"/"no" only variable, which prevents recursion on "no"
into the src/tools subdirs on all/depend/dependall/install.  Other recursive
targets are not affected.
2001-11-13 16:17:24 +00:00
tv be1b573f6d One More Time: Make _mvcpp work on an UPDATE install (without bombing). 2001-11-13 15:32:15 +00:00
tv 958e3755af Make _mvcpp work on an UPDATE reinstall. 2001-11-13 15:30:06 +00:00
tv 30b6e7538a Re-add cpp; this was lost in the overhaul. (XXX this needs to GO AWAY
and the build system needs to use ${CC} -E...!)
2001-11-13 14:49:00 +00:00
tv 7e3f01a244 Fix installation of -mdoc macros. 2001-11-13 14:21:03 +00:00
tv cc88e154cb Change where the -j1 is set to disable parallelism. XXX This should not
be necessary; .NOTPARALLEL needs to be told how to work properly for
specific recursion targets.
2001-11-13 06:17:45 +00:00
tv 6937675d3c Don't put commands in the suffix rule override (avoids target graph cycles).
Protect from multiple inclusion.
2001-11-13 06:03:41 +00:00
tv c31cbb4bcc Remove extraneous @echo from local changes. 2001-11-13 05:02:37 +00:00
tv 71abcbf812 Move around the MAKE_ARGS assignments to put the := as early as possible. 2001-11-13 04:43:25 +00:00
tv be39e87135 Remove local addition mistake in previous. 2001-11-13 04:38:13 +00:00
tv c1cbb7c3e3 Use ${_srcdir} in .MADE, and add "Makefile" to the list. 2001-11-13 04:37:00 +00:00
tv 8753b7b6af Make the wrapper work correctly for groff too, which uses a rather freaky
Makefile layout.
2001-11-13 04:28:27 +00:00
tv aab33a26c5 Make sure the wrapper is used recursively. -f is not propagated to MAKEFLAGS. 2001-11-13 04:01:49 +00:00
tv b5cd2489b2 Major overhaul of src/tools and host toolchain. Summary of changes:
* Rewrite src/tools Make logic to work like the rest of the tree wrt
  "dependall" and "install".  The old "make build" hack is gone.

* Remove the MKTOOLS logic.  This was linked to the "make build" hack,
  and was only needed because TOOLDIR originally had no writable default.

* Redo the GNU configure/make logic to make it fit reasonably in a
  BSD make wrapper.  Use new ${.ALLTARGETS} variable to scan for
  targets in $(srcdir), and mark them with .MADE: to prevent rebuilding.

* Only build cross tools in src/tools; remove some messy logic in
  src/usr.* and src/gnu/usr.* that would do target filename rewriting
  (improves consistency and readability).

* Add the ability to build cross gdb at tool build time by setting
  MKCROSSGDB (default no) to "yes" in mk.conf.

* Add src/tools/groff and set up paths to work with this cross groff.
2001-11-12 23:16:17 +00:00
tv 34f19baa7f Make use of OBJHOSTMACHINE here, since <bsd.obj.mk> is preloaded. 2001-11-12 17:46:35 +00:00
jmc 6dda1d498c Pull the rmd160 stuff out as mtree now has options to selectively compile
pieces out we won't need during a build.
2001-11-11 01:36:15 +00:00
jmc ac4077ac62 Turn on defines to disable all the hashing functions. We don't need these for
the build and some systems won't have all the routines.
2001-11-11 01:35:21 +00:00
thorpej f48c450929 Build the cross-dbsym. 2001-11-09 15:07:25 +00:00
thorpej ca61e8a63a Support for building the new BFD-using dbsym(8) as a targeted host
tool.
2001-11-09 05:53:26 +00:00
jmc 67de198df5 XXX...Complete hack for now.
Add a stub for RMD160File which prints out a warning and returns NULL.

This allows mtree to be built when hosting from a 1.5.x box.
The real solution is to convert the src/tools bits into clean portable tools
and not have them so NetBSD-current centric.
2001-11-08 20:30:54 +00:00
tv 472dcba2fb * Always use the makewrapper when starting a build phase.
* Set stuff mostly in the environment, not on make(1)'s command line.
  This is needed for MACHINE and MACHINE_ARCH (noted by bjh21), and keeps
  the mk.conf-overriding-env behavior (suggested by several people).

* Use MAKEFLAGS to make the wrapper script more readable.

* When prepping objdir in tools for the default TOOLDIR value, just make
  that objdir; leave the recursive "make obj" for later.
2001-11-02 05:07:22 +00:00
thorpej d8c2abc4aa Make *really* sure that MACHINE is set to an empty string so that
it doesn't infect the linker script build (i.e. override any MACHINE=
that might already be in MAKEFLAGS).
2001-11-01 01:52:45 +00:00
tv a75f4fb35e Don't actually delete the default tooldir on "cleandir"; else we'll nuke
the nbmake that is probably currently running.

Just leave the "cleantools" manual target as a shortcut for the user.
2001-10-31 19:38:02 +00:00