From 818ca5c42853f231c8875ade94fc78657b77db29 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Fri, 4 Mar 2016 22:54:35 +0900 Subject: [PATCH 1/4] Replace dependency to psed by sed psed has been removed from the code packaging of perl in 5.22 and it is used by the perl scripts in src/tools/msvc on Windows to create probes.h. Like Bison and Flex, sed is available as part of MSYS, so when compiling the code from git the environment to set up does not change much. Note to reviewers of this patch: we may want to have probes.h part of a source tarball to allow people to compile Postgres on Windows without having to install MSYS to satisfy the dependency with sed.. --- doc/src/sgml/install-windows.sgml | 23 +++++++++++++++-------- src/tools/msvc/Solution.pm | 2 +- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/doc/src/sgml/install-windows.sgml b/doc/src/sgml/install-windows.sgml index f08cca7..6c11d2d 100644 --- a/doc/src/sgml/install-windows.sgml +++ b/doc/src/sgml/install-windows.sgml @@ -196,8 +196,8 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin'; - Bison and - Flex + Bison, + Flex and sed Bison and Flex are @@ -207,9 +207,15 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin'; - Both Bison and Flex - are included in the msys tool suite, available - from as part of the + sed is required to build from Git and to build + from a release file. + + + + Bison, Flex and + sed are included in the + msys tool suite, available from + as part of the MinGW compiler suite. You can also get msys as part of msysGit from . @@ -217,9 +223,10 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin'; You will need to add the directory containing - flex.exe and bison.exe to the - PATH environment variable in buildenv.pl unless - they are already in PATH. In the case of MinGW, the directory is the + flex.exe, bison.exe and + sed.exe to the PATH environment variable in + buildenv.pl unless they are already in PATH. + In the case of MinGW, the directory is the \msys\1.0\bin subdirectory of your MinGW installation directory. For msysGit, it's the bin directory in your Git install directory. Do not add the MinGW compiler diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index ac116b7..cb1d1a4 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -313,7 +313,7 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY { print "Generating probes.h...\n"; system( -'psed -f src/backend/utils/Gen_dummy_probes.sed src/backend/utils/probes.d > src/include/utils/probes.h' +'sed -f src/backend/utils/Gen_dummy_probes.sed src/backend/utils/probes.d > src/include/utils/probes.h' ); } -- 2.7.2