diff options
author | Gerald Combs <gerald@wireshark.org> | 2014-08-08 11:20:53 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2014-08-08 18:59:43 +0000 |
commit | 8b364ea06b0f0dbf938a88388836ea8262bd6997 (patch) | |
tree | 37d36c995329c31ceb7922dfebebe3db2bf4d10d /config.nmake | |
parent | 24da9a86ecce68d26fb8f3e9f6689910d7f9f973 (diff) | |
download | wireshark-8b364ea06b0f0dbf938a88388836ea8262bd6997.tar.gz |
Autodiscover flex and bison in config.nmake.
Change-Id: I4683d0eeb06e5616103f3e6e25ce7f1549a2bb05
Reviewed-on: https://code.wireshark.org/review/3510
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'config.nmake')
-rw-r--r-- | config.nmake | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/config.nmake b/config.nmake index 6e512085f1..d8734f8355 100644 --- a/config.nmake +++ b/config.nmake @@ -804,21 +804,37 @@ POD2HTML=$(SH) pod2html # command for sed (cygwin's sed recommended) SED=sed -# Command for lex/flexx. Cygwin's flex or Chocolatey's win_flex +# Command for Flex. Cygwin's flex or Chocolatey's win_flex # recommended. # Absolute or relative paths must be Windows-style -#LEX=win_flex -#LEX=%ChocolateyInstall%\bin\win_flex +#LEX=\custom\path\to\flex + +# Find flex automatically +!IF !DEFINED(LEX) +!IF DEFINED(CHOCOLATEYINSTALL) && EXIST("$(CHOCOLATEYINSTALL)\bin\win_flex.exe") +LEX=$(CHOCOLATEYINSTALL)\bin\win_flex +!ELSE IF EXIST("$(CYGWIN_PATH)\flex.exe") +# We add Cygwin to PATH below. LEX=flex +!ENDIF +!ENDIF -# Command for yacc/bison. Cygwin's bison or Chocolatey's win_bison +# Command for Bison. Cygwin's bison or Chocolatey's win_bison # recommended. # Absolute or relative paths must be Windows-style -#YACC=win_bison -#YACC=%ChocolateyInstall%\bin\win_bison +#YACC=\custom\path\to\bison + +# Find bison automatically +!IF !DEFINED(YACC) +!IF DEFINED(CHOCOLATEYINSTALL) && EXIST("$(CHOCOLATEYINSTALL)\bin\win_bison.exe") +YACC=$(CHOCOLATEYINSTALL)\bin\win_bison +!ELSE IF EXIST("$(CYGWIN_PATH)\bison.exe") +# We add Cygwin to PATH below. YACC=bison +!ENDIF +!ENDIF # Commands to convert UNIX line endings to DOS/Windows UNIX2DOS=u2d |