mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
92b1d80e0c
commit
27471e1f7c
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue