New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make error on OS X 'sed -r' fails #4

Open
lakidd opened this Issue Feb 1, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@lakidd
Copy link

lakidd commented Feb 1, 2017

Hi, sorry this is a little vague but on OS X, sed does not support 'sed -r'
This seems to cause the secrets file not to be parsed and included correctly.
This can be fixed by
a) brew install gnu-sed
b) change the components.mk to use gsed rather than sed.

I've fixed it now and didn't capture the exact messages, sorry for the vagueness

@NZSmartie

This comment has been minimized.

Copy link
Owner

NZSmartie commented Feb 1, 2017

No worries. Although I would like you to post your componentsmk file here so i can compare.

I don't own any Apple products so I wont be of much help without input like yours.

@lakidd

This comment has been minimized.

Copy link

lakidd commented Feb 1, 2017

Here you go..
I got the fix from here
pyrsmk/molt#8

#
# Main component makefile.
#
# This Makefile can be left empty. By default, it will take the sources in the
# src/ directory, compile them and link them into lib(subdirectory_name).a
# in the build directory. This behaviour is entirely configurable,
# please read the ESP-IDF documents if you need to do this.
#

# Add additional subfolders to the build bath
COMPONENT_SRCDIRS += interfaces

COMPONENT_EMBED_TXTFILES := iotnode.crt
COMPONENT_EMBED_TXTFILES += iotnode.key

SHELL := /bin/bash
SECRETS := ${COMPONENT_PATH}/secrets
SECRETS := $(shell cat ${SECRETS} | gsed -r 's/^\#.*$$//g; s/^([^=]+)$$/ -D\1/m; s/^([^=]+=)(.*)$$/ -D\1"\2"/' | tr -d '\n')

CFLAGS += $(SECRETS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment