0

I'm following this tutorial to add an automatic build versioning system on Kinetis KDS(Eclipse CDT, Windows 10).

The example evaluates expressions using Linux shell commands like this

-Xlinker --defsym -Xlinker __BUILD_NUMBER=$$(cat $(BUILD_NUMBER_FILE))

that obviously doesn't work on Windows.

I tried various combinations using type instead of cat, but none of them worked.

What's the fastest way to define a symbol as the content of a file?

Alex
  • 119
  • 12

1 Answers1

0

Assuming the build-number file is a one-liner, then like this:

set /p BUILDNO=<build-number.txt
...
gcc ... -Xlinker --defsym -Xlinker __BUILD_NUMBER=%BUILDNO%
Mike Kinghan
  • 55,740
  • 12
  • 153
  • 182