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
|
|
|
|
#
|
2022-01-01 13:26:40 +00:00
|
|
|
# Copyright 2003-2022 by Wilson Snyder. This program is free software; you
|
2020-03-21 15:24:24 +00:00
|
|
|
# can 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.
|
|
|
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
2006-08-26 11:35:28 +00:00
|
|
|
######################################################################
|
|
|
|
|
|
|
|
require 5.005;
|
|
|
|
use warnings;
|
2021-09-08 03:50:28 +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([^=]+)=(.*)/) {
|
2021-09-08 03:50:28 +00:00
|
|
|
print "#define $1 $2\n";
|
2014-11-27 15:52:38 +00:00
|
|
|
} else {
|
2021-09-08 03:50:28 +00:00
|
|
|
print "#include \"$param\"\n";
|
2014-11-27 15:52:38 +00:00
|
|
|
}
|
2006-08-26 11:35:28 +00:00
|
|
|
}
|