From 864f5658da359a3ee58e24da19ebb8a65d7c38f6 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Tue, 15 Sep 2020 19:01:32 -0700 Subject: [PATCH] remove now-unnecessary ad hoc replacement of gml parser prefix Related to #1806. --- cmake/modify_gml2gv_gmlparse.cmake.in | 7 ------- cmd/tools/CMakeLists.txt | 13 ------------- cmd/tools/Makefile.am | 4 ++-- cmd/tools/gml2gv.vcxproj | 8 ++++---- 4 files changed, 6 insertions(+), 26 deletions(-) delete mode 100644 cmake/modify_gml2gv_gmlparse.cmake.in diff --git a/cmake/modify_gml2gv_gmlparse.cmake.in b/cmake/modify_gml2gv_gmlparse.cmake.in deleted file mode 100644 index 40cbf8c6e..000000000 --- a/cmake/modify_gml2gv_gmlparse.cmake.in +++ /dev/null @@ -1,7 +0,0 @@ -file(READ @CMAKE_CURRENT_BINARY_DIR@/gmlparse.h file_contents) -string(REPLACE "yy" "gml" file_contents "${file_contents}") -file(WRITE @CMAKE_CURRENT_BINARY_DIR@/gmlparse.h "${file_contents}") - -file(READ @CMAKE_CURRENT_BINARY_DIR@/gmlparse.c file_contents) -string(REPLACE "yy" "gml" file_contents "${file_contents}") -file(WRITE @CMAKE_CURRENT_BINARY_DIR@/gmlparse.c "${file_contents}") diff --git a/cmd/tools/CMakeLists.txt b/cmd/tools/CMakeLists.txt index 2dbf34cfa..9756c9d2d 100644 --- a/cmd/tools/CMakeLists.txt +++ b/cmd/tools/CMakeLists.txt @@ -99,19 +99,6 @@ BISON_TARGET(Gmlparse gmlparse.y ${CMAKE_CURRENT_BINARY_DIR}/gmlparse.c) FLEX_TARGET(Gmlscan gmlscan.l ${CMAKE_CURRENT_BINARY_DIR}/gmlscan.c) ADD_FLEX_BISON_DEPENDENCY(Gmlscan Gmlparse) -# Modify files generated by Bison and Flex, to match the Autotools build. -# - Replace "yy" with "gml" in all three files -configure_file( - "${TOP_SOURCE_DIR}/cmake/modify_gml2gv_gmlparse.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/modify_gml2gv_gmlparse.cmake" - @ONLY -) -add_custom_command( - OUTPUT ${BISON_Gmlparse_OUTPUTS} - COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/modify_gml2gv_gmlparse.cmake - APPEND -) - add_executable(gml2gv # Source files gml2gv.c diff --git a/cmd/tools/Makefile.am b/cmd/tools/Makefile.am index 5b5789f32..458e531c9 100644 --- a/cmd/tools/Makefile.am +++ b/cmd/tools/Makefile.am @@ -268,10 +268,10 @@ gv2gml_LDADD = \ gml2gv_SOURCES = gml2gv.c gmlparse.y gmlscan.l gmlparse.c: y.tab.c - @SED@ "s/yy/gml/g" < y.tab.c > gmlparse.c + cp -f y.tab.c gmlparse.c gmlparse.h: y.tab.h - @SED@ "s/yy/gml/g" < y.tab.h > gmlparse.h + cp -f y.tab.h gmlparse.h y.tab.c y.tab.h : y.output diff --git a/cmd/tools/gml2gv.vcxproj b/cmd/tools/gml2gv.vcxproj index 73bd6c3b2..10ff04472 100644 --- a/cmd/tools/gml2gv.vcxproj +++ b/cmd/tools/gml2gv.vcxproj @@ -74,8 +74,8 @@ win_flex --outfile=gmlscan.c -i gmlscan.l win_bison -dy -Wno-yacc gmlparse.y -o gmlparse-intermediate.c -sed "s/yy/gml/g" < gmlparse-intermediate.h > gmlparse.h -sed "s/yy/gml/g" < gmlparse-intermediate.c > gmlparse.c +copy gmlparse-intermediate.h gmlparse.h +copy gmlparse-intermediate.c gmlparse.c del gmlparse-intermediate.h del gmlparse-intermediate.c @@ -101,8 +101,8 @@ del gmlparse-intermediate.c win_flex --outfile=gmlscan.c -i gmlscan.l win_bison -dy -Wno-yacc gmlparse.y -o gmlparse-intermediate.c -sed "s/yy/gml/g" < gmlparse-intermediate.h > gmlparse.h -sed "s/yy/gml/g" < gmlparse-intermediate.c > gmlparse.c +copy gmlparse-intermediate.h gmlparse.h +copy gmlparse-intermediate.c gmlparse.c del gmlparse-intermediate.h del gmlparse-intermediate.c -- 2.40.0