diff --git a/Makefile.in b/Makefile.in index cae884e1f..11803c705 100644 --- a/Makefile.in +++ b/Makefile.in @@ -16,12 +16,16 @@ # 59 Temple Place - Suite 330 # Boston, MA 02111-1307, USA # -#ident "$Id: Makefile.in,v 1.113 2002/01/28 00:52:41 steve Exp $" +#ident "$Id: Makefile.in,v 1.114 2002/02/03 07:05:36 steve Exp $" # # SHELL = /bin/sh -VERSION = 0.5 +# This version string is only used in the version message printed +# by the compiler. It reflects the assigned version number for the +# product as a whole. Most components also print the CVS Name: token +# in order to get a more automatic version stamp as well. +VERSION = 0.6 prefix = @prefix@ exec_prefix = @exec_prefix@ @@ -68,7 +72,7 @@ all: ivl@EXEEXT@ libvpi.a cd vvm ; $(MAKE) all cd vpi ; $(MAKE) all cd ivlpp ; $(MAKE) all - cd driver ; $(MAKE) all + cd driver ; $(MAKE) VERSION=$(VERSION) all cd tgt-verilog ; $(MAKE) all cd tgt-stub ; $(MAKE) all for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) all); done diff --git a/driver/Makefile.in b/driver/Makefile.in index d61a890b5..d8210a61e 100644 --- a/driver/Makefile.in +++ b/driver/Makefile.in @@ -18,12 +18,12 @@ # 59 Temple Place - Suite 330 # Boston, MA 02111-1307, USA # -#ident "$Id: Makefile.in,v 1.10 2001/11/17 17:57:58 steve Exp $" +#ident "$Id: Makefile.in,v 1.11 2002/02/03 07:05:36 steve Exp $" # # SHELL = /bin/sh -VERSION = 0.0 +VERSION = 0.6 prefix = @prefix@ exec_prefix = @exec_prefix@ @@ -46,7 +46,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ CPPFLAGS = @CPPFLAGS@ @DEFS@ -CFLAGS = @CFLAGS@ -I. -I$(srcdir)/.. +CFLAGS = @CFLAGS@ -I. -I$(srcdir)/.. -DVERSION='"$(VERSION)"' CXXFLAGS = @CXXFLAGS@ -I. -I$(srcdir)/.. LDFLAGS = @LDFLAGS@ diff --git a/driver/iverilog.man b/driver/iverilog.man index 4bb3d3b91..14c7f60ab 100644 --- a/driver/iverilog.man +++ b/driver/iverilog.man @@ -1,10 +1,10 @@ -.TH iverilog 1 "$Date: 2001/12/08 04:13:07 $" Version "$Date: 2001/12/08 04:13:07 $" +.TH iverilog 1 "$Date: 2002/02/03 07:05:37 $" Version "$Date: 2002/02/03 07:05:37 $" .SH NAME iverilog - Icarus Verilog compiler .SH SYNOPSIS .B iverilog -[-ESv] [-Cpath] [-ccmdfile] [-Dmacro[=defn]] [-pflag=value] +[-ESVv] [-Cpath] [-ccmdfile] [-Dmacro[=defn]] [-pflag=value] [-Iincludedir] [-mmodule] [-Nfile] [-ooutputfilename] [-stopmodule] [-ttype] [-Tmin/typ/max] [-Wclass] [-ypath] sourcefile @@ -111,7 +111,11 @@ Use this switch to specify the target output format. See the .B -v Turn on verbose messages. This will print the command lines that are executed to perform the actual compilation, along with version -information from the various components. +information from the various components, as well as the version of the +product as a whole. +.TP 8 +.B -V +Print the version of the compiler, and exit. .TP 8 .B -W\fIclass\fP Turn on different classes of warnings. See the \fBWARNING TYPES\fP diff --git a/driver/main.c b/driver/main.c index 6eb3a8033..7011648f1 100644 --- a/driver/main.c +++ b/driver/main.c @@ -16,12 +16,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -#ident "$Id: main.c,v 1.31 2001/11/21 02:20:34 steve Exp $" +#ident "$Id: main.c,v 1.32 2002/02/03 07:05:37 steve Exp $" # include "config.h" + const char HELP[] = -"Usage: iverilog [-ESv] [-B base] [-C path] [-c cmdfile]\n" +"Usage: iverilog [-ESvV] [-B base] [-C path] [-c cmdfile]\n" " [-D macro[=defn]] [-I includedir] [-m module]\n" " [-N file] [-o filename] [-p flag=value]\n" " [-s topmodule] [-t target] [-T min|typ|max]\n" @@ -347,6 +348,7 @@ int main(int argc, char **argv) char*cmd; unsigned ncmd; int e_flag = 0; + int version_flag = 0; int opt, idx; char*cp; @@ -392,7 +394,7 @@ int main(int argc, char **argv) source_file = fopen(source_path, "w"); assert(source_file); - while ((opt = getopt(argc, argv, "B:C:c:D:Ef:hI:m:N::o:p:Ss:T:t:vW:y:")) != EOF) { + while ((opt = getopt(argc, argv, "B:C:c:D:Ef:hI:m:N::o:p:Ss:T:t:vVW:y:")) != EOF) { switch (opt) { case 'B': @@ -493,6 +495,9 @@ int main(int argc, char **argv) case 'v': verbose_flag = 1; break; + case 'V': + version_flag = 1; + break; case 'W': process_warning_switch(optarg); break; @@ -508,6 +513,15 @@ int main(int argc, char **argv) } } + if (version_flag || verbose_flag) { + printf("Icarus Verilog version " VERSION "\n"); + printf("Copyright 1998-2002 Stephen Williams\n"); + printf("$Name: $\n"); + + if (version_flag) + return 0; + } + if (command_filename) { int rc; @@ -624,6 +638,9 @@ int main(int argc, char **argv) /* * $Log: main.c,v $ + * Revision 1.32 2002/02/03 07:05:37 steve + * Support print of version number. + * * Revision 1.31 2001/11/21 02:20:34 steve * Pass list of file to ivlpp via temporary file. *