[gimp] plug-ins/common: Allow arbitrary CFLAGS in mkgen.pl



commit 27471e1f7cdfdb0598a0cce537f5a4ebd5ce8eed
Author: Martin Nordholts <martinn src gnome org>
Date:   Sat Sep 4 13:36:36 2010 +0200

    plug-ins/common: Allow arbitrary CFLAGS in mkgen.pl
    
    Don't require a plug-in to specify a *FLAGS* variable in
    plugin-defs.pl, to make it possible to for example add
    
      cflags => '-fno-strict-aliasing'
    
    directly.

 plug-ins/common/mkgen.pl |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/plug-ins/common/mkgen.pl b/plug-ins/common/mkgen.pl
index edbec9a..7fc697e 100755
--- a/plug-ins/common/mkgen.pl
+++ b/plug-ins/common/mkgen.pl
@@ -118,9 +118,7 @@ EOT
 
 foreach (sort keys %plugins) {
     my $makename = $_;
-    my $MAKENAME;
     $makename =~ s/-/_/g;
-    $MAKENAME = "\U$makename";
 
     my $libgimp = "";
 
@@ -154,11 +152,11 @@ foreach (sort keys %plugins) {
 
     if (exists $plugins{$_}->{cflags}) {
 	my $cflags = $plugins{$_}->{cflags};
-	my $optflags = $cflags =~ /FLAGS/ ? $cflags : "$MAKENAME\E_CFLAGS";
+	my $cflagsvalue = $cflags =~ /FLAGS/ ? "\$($cflags)" : $cflags;
 
 	print MK <<EOT;
 
-${makename}_CFLAGS = \$($optflags)
+${makename}_CFLAGS = $cflagsvalue
 EOT
     }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]