I am doing like that:
all:
@SET /p filecontent= < somefile.txt
@echo %filecontent%
however filecontent variable does not seem to hold the contents of the file somefile.txt
I am doing like that:
all:
@SET /p filecontent= < somefile.txt
@echo %filecontent%
however filecontent variable does not seem to hold the contents of the file somefile.txt
It is possible to read a file that is not a valid nmake file using
!INCLUDE
. For examle if we have a version fileversion
that contains a single line of text we can do that:It is not working if the file contains more than one line.
Simply ensure
somefile.txt
is in acceptable nmake syntax, and then!include
it. Thus:You could try something like this:
I think a cmd/bat file run within nmake.exe cannot affect the environment of nmake. So you must use the password that you grabbed from the secret.txt within the temporary cmd file.