1

I have a makefile which I am running through nmake, as opposed to gnumake.

I have some code taken from a makefile intended to gnumake...

# out_repo = 

ifndef out_repo
$(error out_repo is not set)
endif

This does not work with nmake. Is there a way in nmake where I can have the same behaviour, where the make process will error out if a variable is not defined?

Scorb
  • 1,654
  • 13
  • 70
  • 144

1 Answers1

2

The equivalent code in NMAKE syntax would be:

# out_repo = 

!ifndef out_repo
!error out_repo is not set
!endif

See my answer to https://stackoverflow.com/a/54046754/318716 for a reference to older, more useful, NMAKE documentation.

Joseph Quinsey
  • 9,553
  • 10
  • 54
  • 77