QNX: Stop building early for unsupported platforms
authorChris Ring <cring@ti.com>
Thu, 3 Apr 2014 20:47:24 +0000 (13:47 -0700)
committerChris Ring <cring@ti.com>
Fri, 4 Apr 2014 00:12:52 +0000 (17:12 -0700)
Catch an unsupported platform sooner with a simple check.

Without this check, the build proceeds and fails halfway through with
a confusing error - in my case it was when the loader was being built
and some of the required preprocessor defines weren't set.

ipc-qnx.mak
qnx/Makefile

index ca19eb875aeaddc7d0d316c26c9f5281ccbbd294..b2922eb3f83a2b0007d9dcc4d91fab697c17fcc5 100644 (file)
@@ -1,5 +1,5 @@
 #
-#   Copyright (c) 2012-2013, Texas Instruments Incorporated
+#   Copyright (c) 2012-2014, Texas Instruments Incorporated
 #
 #   Redistribution and use in source and binary forms, with or without
 #   modification, are permitted provided that the following conditions
@@ -54,15 +54,15 @@ all: .qnx
 
 .qnx,%: PATH:=$(QNX_PATH):$(PATH)
 .qnx,%:
-       @echo "building Qnx user libraries for" $(*:.qnx,=) "..."
+       @echo "building Qnx user libraries for \"$(PLATFORM)\" platform..."
        @make -C qnx \
                 IPC_REPO=`pwd` \
-                PLATFORM=$(*:.qnx,=) \
+                PLATFORM=$(PLATFORM) \
                 BUILD_FOR_VIRTIO=false
 
 clean:
        @echo "cleaning Qnx user libraries ..."
-       @make -C qnx clean
+       @make -C qnx PLATFORM=$(PLATFORM) clean
 
 install: .install,$(PLATFORM)
 
@@ -72,7 +72,7 @@ install: .install,$(PLATFORM)
        @mkdir -p $(DESTDIR)
        @make -C qnx \
                 IPC_REPO=`pwd` \
-                PLATFORM=$(*:.qnx,=) \
+                PLATFORM=$(PLATFORM) \
                 BUILD_FOR_VIRTIO=false \
                DESTDIR=$(DESTDIR) \
                install
index d22d50a69f96ac04d132867def7d28662df0eb52..20a1b41333462dcbe806ed0b55355284d81ff8f6 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013, Texas Instruments Incorporated
+# Copyright (c) 2013-2014, Texas Instruments Incorporated
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -34,6 +34,10 @@ ifeq ("$(PLATFORM)","OMAP54XX")
     SYSLINK_PLATFORM=omap5430
 else ifeq ("$(PLATFORM)","DRA7XX")
     SYSLINK_PLATFORM=vayu
+else ifeq ("$(PLATFORM)","")
+    $(error Empty PLATFORM variable.  Did you forget to set in it products.mak?)
+else
+    $(error Unsupported platform: $(PLATFORM))
 endif
 
 all:  utils ipc3x_dev libs tests