From 5eaea58209772a4d6c0d4fc68853b03efdb1be06 Mon Sep 17 00:00:00 2001 From: Cary R Date: Tue, 18 Nov 2008 18:28:45 -0800 Subject: [PATCH] Update GNU address in -V output and add -V stub to VHDL target. This patch updates the GNU address in the -V output, adds the VERSION_TAG info to the tgt-vvp back end and adds the whole -V hook to the tgt-vhdl back end. --- driver/main.c | 8 ++++---- ivlpp/main.c | 8 ++++---- main.cc | 14 +++++++------- tgt-vhdl/Makefile.in | 2 +- tgt-vhdl/vhdl.cc | 25 +++++++++++++++++++++++++ tgt-vvp/vvp.c | 15 +++++++-------- 6 files changed, 48 insertions(+), 24 deletions(-) diff --git a/driver/main.c b/driver/main.c index 8d26cf1b2..e11045794 100644 --- a/driver/main.c +++ b/driver/main.c @@ -31,9 +31,9 @@ const char NOTICE[] = " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" " GNU General Public License for more details.\n" "\n" -" You should have received a copy of the GNU General Public License\n" -" along with this program; if not, write to the Free Software\n" -" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n" +" You should have received a copy of the GNU General Public License along\n" +" with this program; if not, write to the Free Software Foundation, Inc.,\n" +" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n" ; const char HELP[] = @@ -844,7 +844,7 @@ int main(int argc, char **argv) if (version_flag || verbose_flag) { printf("Icarus Verilog version " VERSION " (" VERSION_TAG ")\n\n"); - printf("Copyright 1998-2008 Stephen Williams\n"); + printf("Copyright 1998-2008 Stephen Williams\n\n"); puts(NOTICE); } diff --git a/ivlpp/main.c b/ivlpp/main.c index a8d761ebc..d25d286d2 100644 --- a/ivlpp/main.c +++ b/ivlpp/main.c @@ -31,9 +31,9 @@ const char NOTICE[] = " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" " GNU General Public License for more details.\n" "\n" -" You should have received a copy of the GNU General Public License\n" -" along with this program; if not, write to the Free Software\n" -" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n" +" You should have received a copy of the GNU General Public License along\n" +" with this program; if not, write to the Free Software Foundation, Inc.,\n" +" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n" ; # include @@ -289,7 +289,7 @@ int main(int argc, char*argv[]) case 'v': fprintf(stderr, "Icarus Verilog Preprocessor version " VERSION " (" VERSION_TAG ")\n\n"); - fprintf(stderr, "%s\n", COPYRIGHT); + fprintf(stderr, "%s\n\n", COPYRIGHT); fputs(NOTICE, stderr); break; diff --git a/main.cc b/main.cc index abdb03245..772f59ed3 100644 --- a/main.cc +++ b/main.cc @@ -33,9 +33,9 @@ const char NOTICE[] = " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" " GNU General Public License for more details.\n" "\n" -" You should have received a copy of the GNU General Public License\n" -" along with this program; if not, write to the Free Software\n" -" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n" +" You should have received a copy of the GNU General Public License along\n" +" with this program; if not, write to the Free Software Foundation, Inc.,\n" +" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n" ; # include @@ -589,10 +589,10 @@ int main(int argc, char*argv[]) return flag_errors; if (version_flag) { - cout << "\n\nIcarus Verilog Parser/Elaborator version " - << VERSION << " (" << VERSION_TAG << ")" << endl; - cout << COPYRIGHT << endl; - cout << endl << NOTICE << endl; + cout << "\nIcarus Verilog Parser/Elaborator version " + << VERSION << " (" << VERSION_TAG << ")" << endl << endl; + cout << COPYRIGHT << endl << endl; + cout << NOTICE << endl; dll_target_obj.test_version(flags["DLL"]); diff --git a/tgt-vhdl/Makefile.in b/tgt-vhdl/Makefile.in index c1bbe956d..20423541e 100644 --- a/tgt-vhdl/Makefile.in +++ b/tgt-vhdl/Makefile.in @@ -38,7 +38,7 @@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ -CPPFLAGS = @ident_support@ -I. -I$(srcdir)/.. @CPPFLAGS@ @DEFS@ @PICFLAG@ +CPPFLAGS = @ident_support@ -I. -I$(srcdir)/.. -DVERSION='"$(VERSION)"' @CPPFLAGS@ @DEFS@ @PICFLAG@ CXXFLAGS = -Wall @CXXFLAGS@ LDFLAGS = @LDFLAGS@ diff --git a/tgt-vhdl/vhdl.cc b/tgt-vhdl/vhdl.cc index ecf59b339..b2dc42248 100644 --- a/tgt-vhdl/vhdl.cc +++ b/tgt-vhdl/vhdl.cc @@ -18,6 +18,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include "version.h" #include "vhdl_target.h" #include "vhdl_element.hh" @@ -31,6 +32,24 @@ #include #include +static const char*version_string = +"Icarus Verilog VHDL Code Generator " VERSION " (" VERSION_TAG ")\n\n" +"Copyright (C) 2008 Nick Gasson (nick@nickg.me.uk)\n\n" +" This program is free software; you can redistribute it and/or modify\n" +" it under the terms of the GNU General Public License as published by\n" +" the Free Software Foundation; either version 2 of the License, or\n" +" (at your option) any later version.\n" +"\n" +" This program is distributed in the hope that it will be useful,\n" +" but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" +" GNU General Public License for more details.\n" +"\n" +" You should have received a copy of the GNU General Public License along\n" +" with this program; if not, write to the Free Software Foundation, Inc.,\n" +" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n" +; + /* * Maps a signal to the scope it is defined within. Also * provides a mechanism for renaming signals -- i.e. when @@ -194,3 +213,9 @@ extern "C" int target_design(ivl_design_t des) return g_errors; } + +extern "C" const char* target_query(const char*key) +{ + if (strcmp(key, "version") == 0) return version_string; + return 0; +} diff --git a/tgt-vvp/vvp.c b/tgt-vvp/vvp.c index 7d844721f..3fe0bf0ef 100644 --- a/tgt-vvp/vvp.c +++ b/tgt-vvp/vvp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001-2007 Stephen Williams (steve@icarus.com) + * Copyright (c) 2001-2008 Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU @@ -17,9 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -/* - */ - +# include "version.h" # include "vvp_priv.h" # include # include @@ -27,7 +25,8 @@ # include static const char*version_string = -"Icarus Verilog VVP Code Generator " VERSION "\n" +"Icarus Verilog VVP Code Generator " VERSION " (" VERSION_TAG ")\n\n" +"Copyright (c) 2001-2008 Stephen Williams (steve@icarus.com)\n\n" " This program is free software; you can redistribute it and/or modify\n" " it under the terms of the GNU General Public License as published by\n" " the Free Software Foundation; either version 2 of the License, or\n" @@ -38,9 +37,9 @@ static const char*version_string = " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" " GNU General Public License for more details.\n" "\n" -" You should have received a copy of the GNU General Public License\n" -" along with this program; if not, write to the Free Software\n" -" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n" +" You should have received a copy of the GNU General Public License along\n" +" with this program; if not, write to the Free Software Foundation, Inc.,\n" +" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n" ; FILE*vvp_out = 0;