LedgerHQ / nanos-secure-sdk

Secure (ST31) SDK for Ledger Nano S
Apache License 2.0
98 stars 53 forks source link

sed fix for names that contain but do not end in '.c' #17

Closed rudi-cilibrasi closed 1 year ago

rudi-cilibrasi commented 6 years ago

If we start with the blue-app-helloworld and

cd src/
mkdir github.com
touch github.com/should_work.h

and inside github.com/should_work.c we can write simply:

#include "should_work.h"

then when trying to build with the standard SDK Makefile we get an error:

make: *** No rule to make target 'om/should_work.h', needed by 'obj/should_work.o'.  Stop.

This is because the last sed regular expression fixed in this PR incorrectly matches the github.com because it doesn't require that the word end after the .c. This PR fixes that by introducing appending a space at the end of every line, then requiring a space after the .c extension which ensures that filenames will incorrectly match less frequently. To fix any possible spacing errors extra spaces are removed using additional sed's at the end.

rudi-cilibrasi commented 6 years ago

https://github.com/LedgerHQ/nanos-secure-sdk/issues/16

fbeutin-ledger commented 1 year ago

Fixed in latest unified SDK