diff options
author | Henning Makholm <henning@makholm.net> | 2006-02-19 18:00:00 (EST) |
---|---|---|
committer | Julien Jorge <julien.jorge@stuff-o-matic.com> | 2013-01-10 16:05:04 (EST) |
commit | 4877693228e5f942db451c5f2b0ccabb5b050813 (patch) | |
tree | 72b1f863eaa746e6aac955172e7081e40ee0418c /mkopti.pl | |
parent | 00a8b13b5bf8cf2c367a0db3ae09086e45230968 (diff) | |
download | xcftools-4877693228e5f942db451c5f2b0ccabb5b050813.zip xcftools-4877693228e5f942db451c5f2b0ccabb5b050813.tar.gz xcftools-4877693228e5f942db451c5f2b0ccabb5b050813.tar.bz2 |
Import of release 1.0.0
Diffstat (limited to 'mkopti.pl')
-rw-r--r-- | mkopti.pl | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -21,12 +21,13 @@ use strict ; use warnings ; my $mastersource = "options.i" ; my $target = shift ; -my @defines = ( "\U$target" ) ; +my @defines = ( "\U$target", "OPTI_TARGET \"$target\"" ) ; push @defines, "\U$1foo" if $target =~ /^(xcf(2|to))/ ; +push @defines, "XCF2FOO" if $target eq "xcfview" ; open INFILE, "-|", join(" ","cpp -imacros config.h", - (map "-D$_",@defines), - "-DTHISPROGRAM=$target",$mastersource) + (map {(my $a = "-D$_")=~s/ /=/; $a} @defines), + $mastersource) or die "Cannot preprocess options." ; open OUTFILE, ">", "$target.oi" @@ -73,7 +74,7 @@ while( <INFILE> ) { $long[0] =~ s/^(-[^-])/\\$1/ ; $$manref = "" ; my $next = ".TP 8\n" ; - $hasarg =~ s/"([^\"]*)"/\\fB$1\\fI/g ; + $hasarg =~ s/"([^\"]*)"/\\fB$1\\fP/g ; $hasarg = " \\fI$hasarg\\fR" if $hasarg ; for my $long ( @long ) { $$manref .= $next . "\\fB$long\\fR$hasarg" ; |