summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/autoconf/autoconf/autoreconf-exclude.patch
blob: 2814196200860eae14b37a4b6a12d0a75ccf05ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
From 1a50157aa11da48921200a0d8d4308863716eab0 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@intel.com>
Date: Thu, 12 Mar 2020 17:25:23 +0000
Subject: [PATCH] autoreconf-exclude.patch

Upstream-Status: Inappropriate [oe specific]

---
 bin/autoreconf.in | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/bin/autoreconf.in b/bin/autoreconf.in
index 98ebab6..937f758 100644
--- a/bin/autoreconf.in
+++ b/bin/autoreconf.in
@@ -83,6 +83,7 @@ Operation modes:
   -i, --install            copy missing standard auxiliary files
       --no-recursive       don't rebuild sub-packages
   -s, --symlink            with -i, install symbolic links instead of copies
+  -x, --exclude=STEPS      steps we should not run
   -m, --make               when applicable, re-run ./configure && make
   -W, --warnings=CATEGORY  report the warnings falling in CATEGORY
                            (comma-separated list accepted)
@@ -141,6 +142,10 @@ my $run_make = 0;
 # Recurse into subpackages
 my $recursive = 1;
 
+# Steps to exclude
+my @exclude;
+my @ex;
+
 ## ---------- ##
 ## Routines.  ##
 ## ---------- ##
@@ -161,6 +166,7 @@ sub parse_args ()
 	  'B|prepend-include=s'	 => \@prepend_include,
 	  'i|install'            => \$install,
 	  's|symlink'            => \$symlink,
+  	  'x|exclude=s'          => \@exclude,
 	  'm|make'               => \$run_make,
 	  'recursive!'           => \$recursive);
 
@@ -170,6 +176,8 @@ sub parse_args ()
   parse_WARNINGS;
   parse_warnings @warning;
 
+  @exclude = map { split /,/ } @exclude;
+
   # Even if the user specified a configure.ac, trim to get the
   # directory, and look for configure.ac again.  Because (i) the code
   # is simpler, and (ii) we are still able to diagnose simultaneous
@@ -493,8 +501,11 @@ sub autoreconf_current_directory ($)
     }
   else
     {
+      @ex = grep (/^autopoint$/, @exclude);
+      if ($#ex == -1) {
       xsystem_hint ("autopoint is needed because this package uses Gettext",
                     $autopoint);
+      }
     }
 
 
@@ -691,9 +702,12 @@ sub autoreconf_current_directory ($)
 	{
 	  $libtoolize .= " --ltdl";
 	}
+      @ex = grep (/^libtoolize$/, @exclude);
+      if ($#ex == -1) {
       xsystem_hint ("libtoolize is needed because this package uses Libtool",
 		    $libtoolize);
       $rerun_aclocal = 1;
+      }
     }
   else
     {
@@ -730,8 +744,11 @@ sub autoreconf_current_directory ($)
     }
   elsif ($install)
     {
+      @ex = grep (/^gtkdocize$/, @exclude);
+      if ($#ex == -1) {
       xsystem_hint ("gtkdocize is needed because this package uses Gtkdoc",
 		    $gtkdocize);
+      }
     }
   else
     {
@@ -769,7 +786,10 @@ sub autoreconf_current_directory ($)
   # latter runs the former, and (ii) autoconf is stricter than
   # autoheader.  So all in all, autoconf should give better error
   # messages.
+  @ex = grep (/^autoconf$/, @exclude);
+  if ($#ex == -1) {
   xsystem ($autoconf);
+  }
 
 
   # -------------------- #
@@ -790,7 +810,10 @@ sub autoreconf_current_directory ($)
     }
   else
     {
+      @ex = grep (/^autoheader$/, @exclude);
+      if ($#ex == -1) {
       xsystem ($autoheader);
+      }
     }
 
 
@@ -807,7 +830,10 @@ sub autoreconf_current_directory ($)
       # We should always run automake, and let it decide whether it shall
       # update the file or not.  In fact, the effect of '$force' is already
       # included in '$automake' via '--no-force'.
+      @ex = grep (/^automake$/, @exclude);
+      if ($#ex == -1) {
       xsystem ($automake);
+      }
     }
 
   # ---------------------------------------------------- #