2020-01-10 01:01:12 +00:00
|
|
|
#!/usr/bin/env perl
|
2006-08-26 11:35:28 +00:00
|
|
|
# DESCRIPTION: Print include statements for each ARGV
|
|
|
|
#
|
2020-01-06 23:05:53 +00:00
|
|
|
# Copyright 2003-2020 by Wilson Snyder. This package is free software; you can
|
2009-05-04 21:07:57 +00:00
|
|
|
# redistribute it and/or modify it under the terms of either the GNU Lesser
|
|
|
|
# General Public License Version 3 or the Perl Artistic License Version 2.0.
|
2006-08-26 11:35:28 +00:00
|
|
|
######################################################################
|
|
|
|
|
|
|
|
require 5.005;
|
|
|
|
use warnings;
|
2009-12-03 01:09:13 +00:00
|
|
|
print "// DESCR"."IPTION: Generated by verilator_includer via makefile\n";
|
2006-08-26 11:35:28 +00:00
|
|
|
foreach my $param (@ARGV) {
|
2014-11-27 15:52:38 +00:00
|
|
|
if ($param =~ /^-D([^=]+)=(.*)/) {
|
2017-10-10 11:18:01 +00:00
|
|
|
print "#define $1 $2\n"
|
2014-11-27 15:52:38 +00:00
|
|
|
} else {
|
2017-10-10 11:18:01 +00:00
|
|
|
print "#include \"$param\"\n"
|
2014-11-27 15:52:38 +00:00
|
|
|
}
|
2006-08-26 11:35:28 +00:00
|
|
|
}
|