build - Fix handling of MACHINE_PLATFORM
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 31 Oct 2012 02:35:36 +0000 (19:35 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 31 Oct 2012 02:35:36 +0000 (19:35 -0700)
* Generate MACHINE_PLATFORM from sysctl -n hw.platform, bmake does not
  generate a default for this (it's DragonFly-specific).

* Fixes manual module builds e.g. building from the source dir instead of
  as part of a kernel build.

share/mk/sys.mk

index c3d2bb3..625f459 100644 (file)
@@ -142,7 +142,7 @@ YFLAGS              ?=      -d
 # prevent buildworld from breaking.
 #
 .if !defined(MACHINE_PLATFORM)
-MACHINE_PLATFORM=pc32
+MACHINE_PLATFORM!=sysctl -n hw.platform
 .endif
 .if ${MACHINE} == "pc32"
 MACHINE=i386