On Saturday 2008-04-26 16:22, Nick Andrew wrote: >On Sat, Apr 26, 2008 at 04:17:15PM +0200, Vegard Nossum wrote: >> I didn't want to get into the lands of parsing options since we would >> need to handle gcc options and skip arguments to those, etc. > >? > >use Getopt::Std qw(getopts); >use vars qw($opt_g); >getopts('g'); >[...] >if ($opt_g) { > graph(); >} Try this, at least it is known to handle pass_through, which is _just what we want_ for handling unknown options: use Getopt::Long; &Getopt::Long::Configure(qw(bundling pass_through)); &GetOptions("g" => \$opt_g, "I" => \@include_paths); -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html