From bab35039535edd9bbf7dee27812787194a1d58ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lawrence=20Vel=C3=A1zquez?= <larryv@macports.org>
Date: Wed, 18 Mar 2015 02:02:45 -0400
Subject: [PATCH 1/6] lparse: Fix never-failing makefile recipes
Several recipes contain "`make ; cd ..`", so they ignore the exit status
of `make` and always "succeed". Grading on a curve.
---
dports/science/lparse/Portfile | 3 ++-
.../science/lparse/files/fix-recursive-make.patch | 28 ++++++++++++++++++++++
2 files changed, 30 insertions(+), 1 deletion(-)
create mode 100644 dports/science/lparse/files/fix-recursive-make.patch
diff --git a/dports/science/lparse/Portfile b/dports/science/lparse/Portfile
index 76cdcba..0bce756 100644
|
a
|
b
|
master_sites ${homepage}/src/ |
| 28 | 28 | checksums rmd160 131f6ea6235eeb7529d2564bb9ce904e5bc2358a \ |
| 29 | 29 | sha256 886d29723f7188296e48584a4a32b8f111414acb7ca8490af28ef6b7f1717298 |
| 30 | 30 | |
| 31 | | patchfiles patch-configure.diff |
| | 31 | patchfiles patch-configure.diff \ |
| | 32 | fix-recursive-make.patch |
| 32 | 33 | |
| 33 | 34 | # this configure argument is only used for installing |
| 34 | 35 | configure.pre_args --prefix=${destroot}${prefix}/bin |
diff --git a/dports/science/lparse/files/fix-recursive-make.patch b/dports/science/lparse/files/fix-recursive-make.patch
new file mode 100644
index 0000000..261f846
|
-
|
+
|
|
| | 1 | The suffixed "; cd" pipeline causes each recipe to completely ignore the |
| | 2 | exit status of its recursive make invocation, which is bad. |
| | 3 | |
| | 4 | (There's really no need to explicitly change back to the parent |
| | 5 | directory anyway, since make executes recipes in subshells). |
| | 6 | |
| | 7 | Index: Makefile.base |
| | 8 | =================================================================== |
| | 9 | --- Makefile.base.orig |
| | 10 | +++ Makefile.base |
| | 11 | @@ -1,13 +1,13 @@ |
| | 12 | |
| | 13 | lparse : |
| | 14 | - cd src ; make ; cd .. |
| | 15 | + cd src && $(MAKE) |
| | 16 | |
| | 17 | check : |
| | 18 | - cd test; make; cd .. |
| | 19 | + cd test && $(MAKE) |
| | 20 | |
| | 21 | clean : |
| | 22 | - cd src; make clean; cd .. |
| | 23 | - cd test; make clean; cd .. |
| | 24 | + cd src && $(MAKE) clean |
| | 25 | + cd test && $(MAKE) clean |
| | 26 | |
| | 27 | install : lparse |
| | 28 | cp src/lparse $(INSTALLATION_PATH)/ |