From 054ca7569a42904a11694f222da6a6db7d74da0a Mon Sep 17 00:00:00 2001 From: Marc-Antoine Ruel Date: Fri, 31 Dec 2021 07:53:35 -0500 Subject: Disable re2c from embedding the version number in the source file The checked in sources (depfile_parser.cc and lexer.cc) have the re2c version embedded in it. The output didn't change since re2c 1.3, except for the different version number. A reproducible build would use a pinned version of re2c anyway, so there is no need to hardcode its value in the checked in generated files. --- CMakeLists.txt | 2 +- configure.py | 2 +- src/depfile_parser.cc | 2 +- src/lexer.cc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fe1e03f..57ae548 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ if(RE2C) # the depfile parser and ninja lexers are generated using re2c. function(re2c IN OUT) add_custom_command(DEPENDS ${IN} OUTPUT ${OUT} - COMMAND ${RE2C} -b -i --no-generation-date -o ${OUT} ${IN} + COMMAND ${RE2C} -b -i --no-generation-date --no-version -o ${OUT} ${IN} ) endfunction() re2c(${PROJECT_SOURCE_DIR}/src/depfile_parser.in.cc ${PROJECT_BINARY_DIR}/depfile_parser.cc) diff --git a/configure.py b/configure.py index e0a5a22..4390434 100755 --- a/configure.py +++ b/configure.py @@ -479,7 +479,7 @@ def has_re2c(): return False if has_re2c(): n.rule('re2c', - command='re2c -b -i --no-generation-date -o $out $in', + command='re2c -b -i --no-generation-date --no-version -o $out $in', description='RE2C $out') # Generate the .cc files in the source directory so we can check them in. n.build(src('depfile_parser.cc'), 're2c', src('depfile_parser.in.cc')) diff --git a/src/depfile_parser.cc b/src/depfile_parser.cc index 2eca108..98fba2e 100644 --- a/src/depfile_parser.cc +++ b/src/depfile_parser.cc @@ -1,4 +1,4 @@ -/* Generated by re2c 2.2 */ +/* Generated by re2c */ // Copyright 2011 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/lexer.cc b/src/lexer.cc index af861ae..e5729f0 100644 --- a/src/lexer.cc +++ b/src/lexer.cc @@ -1,4 +1,4 @@ -/* Generated by re2c 2.2 */ +/* Generated by re2c */ // Copyright 2011 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); -- cgit v0.12