Changeset View
Changeset View
Standalone View
Standalone View
src/kconfig_compiler/checkkcfg.pl
1 | #!/usr/bin/perl | 1 | #!/usr/bin/perl | ||
---|---|---|---|---|---|
2 | 2 | | |||
3 | if ( @ARGV != 1 ) { | 3 | if ( @ARGV < 1 ) { | ||
4 | print STDERR "Missing arg: filename\n"; | 4 | print STDERR "Missing arg: filename\n"; | ||
5 | exit 1; | 5 | exit 1; | ||
6 | } | 6 | } | ||
7 | 7 | | |||
8 | $file = $ARGV[0]; | 8 | $file = $ARGV[0]; | ||
9 | 9 | | |||
10 | $file =~ /^(.*)\.[^\.]*$/; | 10 | $file =~ /^(.*)\.[^\.]*$/; | ||
11 | $filebase = $1; | 11 | $filebase = $1; | ||
12 | 12 | | |||
13 | $file_h = "$filebase.h"; | 13 | $header_extension = @ARGV > 1 ? $ARGV[1] : "h"; | ||
14 | $file_cpp = "$filebase.cpp"; | 14 | $source_extension = @ARGV > 2 ? $ARGV[2] : "cpp"; | ||
15 | $file_h = "$filebase.$header_extension"; | ||||
16 | $file_cpp = "$filebase.$source_extension"; | ||||
15 | 17 | | |||
16 | $kcfgc = $file . "c"; | 18 | $kcfgc = $file . "c"; | ||
17 | 19 | | |||
18 | $cmd = "./kconfig_compiler_kf5 $file $kcfgc"; | 20 | $cmd = "./kconfig_compiler_kf5 $file $kcfgc"; | ||
19 | 21 | | |||
20 | #print "CMD $cmd\n"; | 22 | #print "CMD $cmd\n"; | ||
21 | 23 | | |||
22 | if ( system( $cmd ) != 0 ) { | 24 | if ( system( $cmd ) != 0 ) { | ||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |