Had a mess with this today, and I’m unable to replicate your output.
I made the following Makefile (/tmp/makefile.mk
):
include $(OCPI_CDK_DIR)/include/ocpisetup.mk
$(info OCPI_CDK_DIR: $(OCPI_CDK_DIR))
$(info OCPI_INC_DIR: $(OCPI_INC_DIR))
$(info OCPI_LIB_DIR: $(OCPI_LIB_DIR))
$(info OCPI_EXPORT_DYNAMIC: $(OCPI_EXPORT_DYNAMIC))
$(info OCPI_API_LIBS: $(OCPI_API_LIBS))
$(info OCPI_SYSTEM_LIBS: $(OCPI_SYSTEM_LIBS))
$(info OCPI_PREREQUISITES_LIBS: $(OCPI_PREREQUISITES_LIBS))
I then manually set OCPI_CDK_DIR
and ran it:
export OCPI_CDK_DIR=/home/opencpi/opencpi/cdk
make -f /tmp/makefile.mk
This caused an error:
/home/opencpi/opencpi/cdk/include/ocpisetup.mk:28: *** missing separator. Stop.
After some messing around it looks like this is because cdk/opencpi-setup.sh -r
can produce text on stdout
, so I edited ocpisetup.mk
to pipe it to /dev/null
:
diff --git a/tools/include/ocpisetup.mk b/tools/include/ocpisetup.mk
index f17db7c97..16cd84299 100644
--- a/tools/include/ocpisetup.mk
+++ b/tools/include/ocpisetup.mk
@@ -26,4 +26,4 @@ define OCPI_NL
endef
$(eval $(subst ;,$(OCPI_NL),\
- $(shell source $(OCPI_CDK_DIR)/opencpi-setup.sh -r &> /dev/null; make -n -r -s -f $(OCPI_CDK_DIR)/include/setup-target-platform.mk ShellExternalVars=1)))
+ $(shell source $(OCPI_CDK_DIR)/opencpi-setup.sh -r; make -n -r -s -f $(OCPI_CDK_DIR)/include/setup-target-platform.mk ShellExternalVars=1)))
Note: This change might not be necessary for you. On the OpenCPI branch I tested this on I’ve made edits to the cdk/opencpi-setup.sh
script, so this might be due to my changes.
After making this change, running the makefile again produces this:
OCPI_CDK_DIR: /home/opencpi/opencpi/cdk
OCPI_INC_DIR: /home/opencpi/opencpi/cdk/include/aci
OCPI_LIB_DIR: /home/opencpi/opencpi/cdk/arch/lib
OCPI_EXPORT_DYNAMIC: -Xlinker -export-dynamic -Wl,-z,relro -Wl,-z,now
OCPI_API_LIBS: application remote_support container library msg_driver_interface metadata transport xfer util foreign os
OCPI_SYSTEM_LIBS: rt dl pthread
OCPI_PREREQUISITES_LIBS: lzma gmp gpsd
Some of the libs listed are different to yours, but I think that’s because I did this on an older commit, and I don’t know the build state of the repo.