gdal/gdal-2.3.1-perl-build.patch

47 lines
1.4 KiB
Diff

From 33beac3add11101ba09b3261adcd3375f87b51dd Mon Sep 17 00:00:00 2001
From: Pavel Raiskup <praiskup@redhat.com>
Date: Tue, 21 Aug 2018 12:58:49 +0200
Subject: [PATCH] swig-perl: fix make dep graph
Makefile_Geo__GDAL must depend on Makefile.PL, instead of
non-existing gdal_wrap.cc (otherwise the module rebuilds on every
make hit).
Upstream proposal:
https://github.com/OSGeo/gdal/pull/876
Also the 'generate' target should be .PHONY.
---
gdal/swig/perl/GNUmakefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/swig/perl/GNUmakefile b/swig/perl/GNUmakefile
index 68d389d..2dfd533 100644
--- a/swig/perl/GNUmakefile
+++ b/swig/perl/GNUmakefile
@@ -20,16 +20,14 @@ generate: ${WRAPPERS}
if [ -f OSR.pm ]; then mv OSR.pm lib/Geo; fi
if [ -f GNM.pm ]; then mv GNM.pm lib/Geo; fi
-build: gdal_wrap.cc Makefile_Geo__GDAL
+build: Makefile_Geo__GDAL
$(MAKE) -f Makefile_Geo__GDAL
$(MAKE) -f Makefile_Geo__GDAL__Const
$(MAKE) -f Makefile_Geo__OSR
if [ -f Makefile_Geo__OGR ]; then $(MAKE) -f Makefile_Geo__OGR; fi
if [ -f Makefile_Geo__GNM ]; then $(MAKE) -f Makefile_Geo__GNM; fi
-gdal_wrap.cc: generate
-
-Makefile_Geo__GDAL: gdal_wrap.cc
+Makefile_Geo__GDAL: Makefile.PL
perl Makefile.PL INSTALL_BASE=$(INST_PREFIX)
test: build
@@ -66,3 +64,5 @@ doc: .FORCE
.FORCE:
perl parse-for-doxygen.pl > all.pm; doxygen; rm -f all.pm
+
+.PHONY: generate