diff options
Diffstat (limited to 'src/kconfig_compiler/checkkcfg.pl')
-rwxr-xr-x | src/kconfig_compiler/checkkcfg.pl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/kconfig_compiler/checkkcfg.pl b/src/kconfig_compiler/checkkcfg.pl index 9ebcbf83..03d187c9 100755 --- a/src/kconfig_compiler/checkkcfg.pl +++ b/src/kconfig_compiler/checkkcfg.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -if ( @ARGV != 1 ) { +if ( @ARGV < 1 ) { print STDERR "Missing arg: filename\n"; exit 1; } @@ -10,8 +10,10 @@ $file = $ARGV[0]; $file =~ /^(.*)\.[^\.]*$/; $filebase = $1; -$file_h = "$filebase.h"; -$file_cpp = "$filebase.cpp"; +$header_extension = @ARGV > 1 ? $ARGV[1] : "h"; +$source_extension = @ARGV > 2 ? $ARGV[2] : "cpp"; +$file_h = "$filebase.$header_extension"; +$file_cpp = "$filebase.$source_extension"; $kcfgc = $file . "c"; |