Can't figure out how to read file from nmake

前端 未结 3 1280
傲寒
傲寒 2020-12-21 11:47

I am doing something like this:

all: 
    @SET /p filecontent= < somefile.txt
    @echo %filecontent%

However the filecontent

3条回答
  •  情深已故
    2020-12-21 12:13

    You could try something like this:

    # ---- vitaly.mak ----
    
    target1:
    # create and invoke a temporary cmd file
    @<

    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.

提交回复
热议问题