Ticket #47196: 0001-lparse-Fix-never-failing-makefile-recipes.patch

File 0001-lparse-Fix-never-failing-makefile-recipes.patch, 2.2 KB (added by larryv (Lawrence Velázquez), 9 years ago)

Fix never-failing makefile recipes

  • dports/science/lparse/Portfile

    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/ 
    2828checksums           rmd160  131f6ea6235eeb7529d2564bb9ce904e5bc2358a \
    2929                    sha256  886d29723f7188296e48584a4a32b8f111414acb7ca8490af28ef6b7f1717298
    3030
    31 patchfiles          patch-configure.diff
     31patchfiles          patch-configure.diff \
     32                    fix-recursive-make.patch
    3233
    3334# this configure argument is only used for installing
    3435configure.pre_args  --prefix=${destroot}${prefix}/bin
  • new file dports/science/lparse/files/fix-recursive-make.patch

    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
    - +  
     1The suffixed "; cd" pipeline causes each recipe to completely ignore the
     2exit status of its recursive make invocation, which is bad.
     3
     4(There's really no need to explicitly change back to the parent
     5directory anyway, since make executes recipes in subshells).
     6
     7Index: 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)/