Files
verilator/bin/verilator_includer
T

21 lines
705 B
Perl
Raw Normal View History

#!/usr/bin/env perl
2006-08-26 11:35:28 +00:00
# DESCRIPTION: Print include statements for each ARGV
#
2022-01-01 08:26:40 -05:00
# Copyright 2003-2022 by Wilson Snyder. This program is free software; you
# 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;
print "// DESCR" . "IPTION: Generated by verilator_includer via makefile\n";
2006-08-26 11:35:28 +00:00
foreach my $param (@ARGV) {
if ($param =~ /^-D([^=]+)=(.*)/) {
print "#define $1 $2\n";
} else {
print "#include \"$param\"\n";
}
2006-08-26 11:35:28 +00:00
}