Codebase list adms / 4e6504d
Update upstream source from tag 'upstream/2.3.7' Update to upstream version '2.3.7' with Debian dir ae834b9e5db7364aad47582edc098cff9d11a103 Bastien Roucariès 2 years ago
15 changed file(s) with 166 addition(s) and 136 deletion(s). Raw diff Collapse all Expand all
2727
2828 ## Build
2929 - bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER && ./bootstrap.sh"
30 - bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER && ./configure --enable-maintainer-mode --prefix=/c/adms-win%MBITS% --disable-shared"
30 - bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER && ./configure --prefix=/c/adms-win%MBITS% --disable-shared"
3131 - bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER && make distcheck"
3232 - bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER && make install"
3333
2727 - case $BUILD_SYSTEM in
2828 autotools)
2929 ./bootstrap.sh &&
30 ./configure --enable-maintainer-mode --prefix=/usr &&
30 ./configure --prefix=/usr &&
3131 make distcheck &&
3232 sudo make install
3333 ;;
3434 cmake)
3535 mkdir build && cd build &&
36 cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DUSE_MAINTAINER_MODE=ON &&
36 cmake .. -DCMAKE_INSTALL_PREFIX=/usr &&
3737 make &&
3838 sudo make install
3939 ;;
2626 PROJECT(ADMS C)
2727 cmake_minimum_required(VERSION 2.8)
2828
29 # TODO: store version in a sensible place
30 # e.g. qucs: file(STRINGS "${qucs-project_SOURCE_DIR}/VERSION" QUCS_VERSION)
31
2932 SET(PACKAGE_NAME "adms")
30 SET(PACKAGE_VERSION "2.3.6")
33 SET(PACKAGE_VERSION "2.3.7")
3134 SET(PACKAGE_BUGREPORT "qucs-bugs@lists.sourceforge.net")
32
33 OPTION ( USE_MAINTAINER_MODE "Enable generation of code (parser source) from Perl scripts." OFF )
3435
3536 # Default to static libs ( shared needs work, BUG with MinGW).
3637 OPTION ( BUILD_STATIC_LIBS "Build static libraries." ON )
5354
5455 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
5556
56 # Only care about Perl in case maintainer needs to recreate sources
57 # Perl is used to recreate sources
5758 # * mkelements.pl
5859 # * mktext.pl
5960 # * mkgrammar.pl
60 if ( USE_MAINTAINER_MODE )
61 # Checking for perl modules requires FindPerlModules.cmake
62 # Check all required modules at once
63 SET(CMAKE_MODULE_PATH "${ADMS_SOURCE_DIR}/cmake/modules")
64 include(FindPerlModules)
65 find_package(PerlModules COMPONENTS XML::LibXML)
66 if(NOT PERLMODULES_FOUND)
67 message(FATAL_ERROR "Not all required perl modules were found on your system")
68 endif(NOT PERLMODULES_FOUND)
69 endif ( USE_MAINTAINER_MODE )
61 # Checking for perl modules requires FindPerlModules.cmake
62 # Check all required modules at once
63 SET(CMAKE_MODULE_PATH "${ADMS_SOURCE_DIR}/cmake/modules")
64 include(FindPerlModules)
65 find_package(PerlModules COMPONENTS XML::LibXML)
66 if(NOT PERLMODULES_FOUND)
67 message(FATAL_ERROR "Not all required perl modules were found on your system")
68 endif(NOT PERLMODULES_FOUND)
7069
7170
7271 find_package(BISON 2.5)
00 adms-2.3.6:
1 * Fix parser for parameter lists in subdevice instanciation.
1 * Fix parser for parameter lists in subdevice instantiation.
22 * Remove duplicated constants on provided headers.
33 * Fix crash on x64 when printing the message about standard headers.
44
1919 * Autotools, add back support for static and shared libraries build.
2020 * Build shared libraries by default. Tested on Linux, Mac OSX, and MSYS2.
2121 See the configure --disable-shared flag to change that.
22 * CMake contiues to builds static libraries only.
22 * CMake continues to builds static libraries only.
2323
2424 * Fix out-of-tree build for Autotools and CMake.
2525
26 * Check scaling factors againd LRM v2.4.0
26 * Check scaling factors against LRM v2.4.0
2727 * Add missing K scaling (uppercase kilo)
2828 * standard scale_factor T|G|M|K|k|m|u|n|p|f|a
2929 * Add testset (va and xml files) to test the scaling factors
4848 * avoid spurious fatal error from an included file which last line contains
4949 onlywhite space.
5050 * preprocessorYacc.y:
51 * fix BSIM6 parse problem, string macro arg broken by continuator
51 * fix BSIM6 parse problem, string macro arg broken by line continuation
5252 caused 'unexpected end-of-line' error.
5353 * verilogLex.l:
5454 * Change string recognition to allow embedded \" as literal quote
9393 mica: same c code as 1.1.8
9494 03-05-2005: removed admsNS directory
9595 release adms-2.0.1
96
97
98
96 ===== gap ====
97 21-11-2016: 2.3.6
98 **-08-2020: 2.3.7. minor release.
99 reproducible build, typo fixes,
100 include path, instructions
3838 - GNU Flex
3939 - GNU Bison (tested with 2.5+)
4040 - GNU Libtool
41 - Perl with XML::LibXml (only for maintainers)
41 - Perl with XML::LibXml
4242 - GD modules to manually update documentation images
4343
4444 Installing dependencies on Linux Debian/Ubuntu:
5757
5858 #### Compilation Using Autotools
5959
60 The `--enable-maintainer-mode` makes sure the required files are generated (using Perl and LibXml).
60 Use the default commands to compile, generate files and install.
6161
6262 sh bootstrap.sh
63 ./configure --enable-maintainer-mode
63 ./configure
6464 make install
6565
6666 Autotools it currently used for creating release packages, the `adms-x.x.x.tar.gz` source code archive.
6767
6868 sh bootstrap.sh
69 ./configure --enable-maintainer-mode
69 ./configure
7070 make clean
7171 make dist
7272
7373 #### Compilation Using CMake
7474
75 The `-DUSE_MAINTAINER_MODE=ON` makes sure the required files are generated (using Perl and LibXml).
76
7775 mkdir cmake; cd cmake
78 cmake .. -DUSE_MAINTAINER_MODE=ON -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/install/location/
76 cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/install/location/
7977 make install
8078
8179 Packaging is not yet supported with CMake. At the moment, only static libraries can be build with CMake.
8280
83
8481 ### Users Install from Tarball
8582
8683 This section is relevant in case ADMS is compiled from a source code archive (`adms-x.x.x.tar.gz`).
87 Users should be able to build without Perl (and the maintainer required modules XML::LibXml and GD).
8884
8985 #### Compilation Using Autotools
9086
10096 mkdir build; cd build
10197 cmake .. -DCMAKE_INSTALL_PREFIX=[/install/location/]
10298 make install
99
100
101 #### Building an RPM
102
103 Go through all the aclocal/automake/configure process to ensure you have all the dependencies installed.
104
105 Chances are you will need to install these packages: gcc-c++ flex bison libtool libtool-ltdl-devel
106
107 Then rename the ADSM directory to ADSM-2.3.0 and tar it to make ~/rpmbuild/SOURCES/ADMS-2.3.0.tar.gz
108
109 Then copy the spec file into your rpmbuild/SPECS directory
110
111 Then build with rpmbuild -ba SPECS/adms.spec
103112
104113
105114 ## Credits
188197 3- run: libtoolize --force --ltdl -c (create libltdl and config.guess, config.sub, ltmain.sh in auxconf)
189198 4- run: automake -a -c (create missing, mkinstalldirs, install-sh in auxconf and all Makefile.in)
190199 5- run: autoconf (create configure)
191 6- run: ./configure --enable-maintainer-mode
200 6- run: ./configure
192201 In three shots:
193202 rm -rf auxconf && autoheader && mkdir auxconf && aclocal && libtoolize --force --ltdl -c
194203 touch ChangeLog && automake -a -c && autoconf
195 ./configure --enable-maintainer-mode
196 ```
204 ./configure
205 ```
2121 INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ) # for admsPreprocessor.h, amdsVeriloga.h
2222 INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ) # for generated source code
2323
24 # Maintainer mode runs the Perl scrips that generate source code
25 if ( USE_MAINTAINER_MODE )
24 # Run the Perl scrips to generate source code
25 # Run mkelements.pl
26 # Read in `adms.xml` and generete portions of adms and admst
27 # Generate outputs:
28 # adms.h
29 # adms.c
30 # admstpathYacc.y
31 # admstpathYacc.h
32 # admstpath.dtd
33 MESSAGE(STATUS "Running mkelements.pl code generator")
2634
27 # Run mkelements.pl
28 # Read in `adms.xml` and generete portions of adms and admst
29 # Generate outputs:
30 # adms.h
31 # adms.c
32 # admstpathYacc.y
33 # admstpathYacc.h
34 # admstpath.dtd
35 MESSAGE(STATUS "Running mkelements.pl code generator")
35 EXECUTE_PROCESS(
36 COMMAND perl ${CMAKE_SOURCE_DIR}/admsXml/mkelements.pl ${CMAKE_SOURCE_DIR}
37 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
38 RESULT_VARIABLE element_result )
39
40 IF(element_result EQUAL 0)
41 MESSAGE(STATUS "mkelement.pl completed successfully")
42 ELSE(element_result EQUAL 0)
43 MESSAGE(FATAL_ERROR "mkelement.pl failed. Exit code: ${element_result}")
44 ENDIF(element_result EQUAL 0)
45
46
47 # Run mkctext.pl
48 # Wrap source files as C code
49 # Generate outputs:
50 # constants.vams.c
51 # disciplines.vams.c
52 # adms.implicit.xml.c
53 # dummy.va.c
54 # dummy.xml.c
55 SET(CTEXT
56 constants.vams
57 disciplines.vams
58 adms.implicit.xml
59 dummy.va
60 dummy.xml )
61
62 FOREACH( inc ${CTEXT} )
63 MESSAGE(STATUS "Running mkctext.pl code generator on ${inc}")
3664
3765 EXECUTE_PROCESS(
38 COMMAND perl ${CMAKE_SOURCE_DIR}/admsXml/mkelements.pl ${CMAKE_SOURCE_DIR}
66 COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/mkctext.pl ${CMAKE_CURRENT_SOURCE_DIR}/${inc}
3967 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
40 RESULT_VARIABLE element_result )
68 RESULT_VARIABLE text_result )
4169
42 IF(element_result EQUAL 0)
43 MESSAGE(STATUS "mkelement.pl completed successfully")
44 ELSE(element_result EQUAL 0)
45 MESSAGE(FATAL_ERROR "mkelement.pl failed. Exit code: ${element_result}")
46 ENDIF(element_result EQUAL 0)
70 IF(text_result EQUAL 0)
71 MESSAGE(STATUS "mkctext.pl completed successfully")
72 ELSE(text_result EQUAL 0)
73 MESSAGE(FATAL_ERROR "mkctext.pl failed. Exit code: ${text_result}")
74 ENDIF(text_result EQUAL 0)
75 ENDFOREACH()
4776
4877
49 # Run mkctext.pl
50 # Wrap source files as C code
51 # Generate outputs:
52 # constants.vams.c
53 # disciplines.vams.c
54 # adms.implicit.xml.c
55 # dummy.va.c
56 # dummy.xml.c
57 SET(CTEXT
58 constants.vams
59 disciplines.vams
60 adms.implicit.xml
61 dummy.va
62 dummy.xml )
78 # Run mkgrammar.pl
79 # Process verilogaYacc.y.in and generate the parser
80 # Generate output:
81 # verilogaYacc.y
82 #
83 MESSAGE(STATUS "Running mkgrammar.pl code generator")
6384
64 FOREACH( inc ${CTEXT} )
65 MESSAGE(STATUS "Running mkctext.pl code generator on ${inc}")
85 EXECUTE_PROCESS(
86 COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/mkgrammar.pl ${CMAKE_CURRENT_SOURCE_DIR}/verilogaYacc.y.in
87 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
88 RESULT_VARIABLE grammar_result )
6689
67 EXECUTE_PROCESS(
68 COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/mkctext.pl ${CMAKE_CURRENT_SOURCE_DIR}/${inc}
69 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
70 RESULT_VARIABLE text_result )
71
72 IF(text_result EQUAL 0)
73 MESSAGE(STATUS "mkctext.pl completed successfully")
74 ELSE(text_result EQUAL 0)
75 MESSAGE(FATAL_ERROR "mkctext.pl failed. Exit code: ${text_result}")
76 ENDIF(text_result EQUAL 0)
77 ENDFOREACH()
78
79
80 # Run mkgrammar.pl
81 # Process verilogaYacc.y.in and generate the parser
82 # Generate output:
83 # verilogaYacc.y
84 #
85 MESSAGE(STATUS "Running mkgrammar.pl code generator")
86
87 EXECUTE_PROCESS(
88 COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/mkgrammar.pl ${CMAKE_CURRENT_SOURCE_DIR}/verilogaYacc.y.in
89 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
90 RESULT_VARIABLE grammar_result )
91
92 IF(grammar_result EQUAL 0)
93 MESSAGE(STATUS "mkgrammar.pl completed successfully")
94 ELSE(grammar_result EQUAL 0)
95 MESSAGE(FATAL_ERROR "mkgrammar.pl failed. Exit code: ${grammar_result}")
96 ENDIF(grammar_result EQUAL 0)
97
98 ENDIF ( USE_MAINTAINER_MODE )
90 IF(grammar_result EQUAL 0)
91 MESSAGE(STATUS "mkgrammar.pl completed successfully")
92 ELSE(grammar_result EQUAL 0)
93 MESSAGE(FATAL_ERROR "mkgrammar.pl failed. Exit code: ${grammar_result}")
94 ENDIF(grammar_result EQUAL 0)
9995
10096 # Issue with flex:
10197 # BISON_TARGET, FLEX_TARGET and ADD_FLEX_BISON_DEPENDENCY
99 # use mkctext.pl to create C files containing the contents of each input file
1010 # in a C character array. The output is used by make check only
1111
12 # Perl XML::LibXml module are only required for maintainer
13 # Parser created by maintainer
14 # BUG: these rules are also required when building from git.
15 # workaround: default to maintainer mode when building from git.
16 if MAINTAINER_MODE
17
1812 $(incfilec):%.c:% ${srcdir}/mkctext.pl
1913 $(PERL) ${srcdir}/mkctext.pl $< $(top_srcdir)
2014
2317
2418 verilogaYacc.y: ${srcdir}/verilogaYacc.y.in ${srcdir}/mkgrammar.pl
2519 $(PERL) ${srcdir}/mkgrammar.pl ${srcdir}/verilogaYacc.y.in
26
27 endif
2820
2921 dist_man_MANS = admsXml.1 admsCheck.1
3022
4032 libadmsPreprocessor_la_LDFLAGS=-no-undefined
4133 libadmsPreprocessor_la_LIBADD=libadmsElement.la
4234
43 verilogYacc.h: verilogYacc.c
35 verilogaYacc.h: verilogaYacc.c
4436 libadmsVeriloga_la_SOURCES=verilogaYacc.y verilogaLex.l verilogaYacc.h
4537 libadmsVeriloga_la_CPPFLAGS=-DinsideVeriloga
4638 libadmsVeriloga_la_LDFLAGS=-no-undefined
5749
5850 admsXml_SOURCES=admsXml.c
5951 admsXml_LDADD=-lm libadmsElement.la libadmsVeriloga.la libadmsPreprocessor.la libadmsAdmstpath.la
52 admsXml_CPPFLAGS=${AM_CPPFLAGS} -DADMS_INCLUDEDIR=\"${pkgincludedir}\"
6053
6154 admsXml.c: adms.implicit.xml.c
6255
154154 <admst:value-to select="dependency" string="nonlinear"/>
155155 </admst:otherwise>
156156 </admst:choose>
157 </admst:when>
158 <admst:when test="[name='\$port_connected']">
159 <admst:value-to select="dependency" string="constant"/>
157160 </admst:when>
158161 <admst:otherwise>
159162 <admst:apply-templates select="arguments" match="e:dependency"/>
190193 name='idt' or
191194 name='ddt' or
192195 name='\$param_given' or
196 name='\$port_connected' or
193197 name='\$given' or
194198 name='ddx' or
195199 name='flicker_noise' or
615615 adms_slist_push(&pproot()->skipp_text,(p_adms)(long)(0));
616616 pproot()->includePath=getlist_from_argv(argc,argv,"-I","directory");
617617 adms_slist_push(&pproot()->includePath,(p_adms)".");
618 #ifdef ADMS_INCLUDEDIR
619 adms_slist_push(&pproot()->includePath,(p_adms)ADMS_INCLUDEDIR);
620 #endif
618621 adms_preprocessor_get_define_from_argv(argc,argv);
619622 adms_preprocessor_define_add_default("insideADMS");
620623 adms_message_verbose(("create temporary file %s\n",mytmpverilogamsfile))
4545 `define M_LN10 2.30258509299404568401
4646 `define P_C 299792458 // m / s
4747 `define P_H 6.62607004081e-34 //planck constant. in \text{ J⋅s}
48 `define P_MU0 1.2566370614e-6 // v. perm. H / m or T·m / A or Wb / (A·m) or V·s / (A·m)
48 `define P_U0 1.2566370614e-6 // v. perm. H / m or T·m / A or Wb / (A·m) or V·s / (A·m)
4949
5050 `endif // CONSTANTS_VAMS
18831883 }
18841884 push @Location03," ENDIFIDENT\n";
18851885 }
1886 foreach(keys(%A))
1886 foreach(sort keys(%A))
18871887 {
18881888 my($aname,$ee)=($_,$A{$_});
18891889 push @Location03," IFIDENT($aname)\n";
7070 die "bisonrule should terminate with ';' - see $_" if(not m/^\s+;$/);
7171 }
7272 }
73 map {print OFH "\%token <_lexval> $_\n";} keys %Token;
73 map {print OFH "\%token <_lexval> $_\n";} sort keys %Token;
7474 print OFH "\n";
7575 map {print OFH "\%type <_yaccval> $_->{name}\n";} @allbisonrule;
7676 print OFH "\n";
11 # Process this file with autoconf to produce a configure script.
22
33 AC_PREREQ(2.61)
4 AC_INIT([adms],[2.3.6],[qucs-devel@lists.sourceforge.net])
4 AC_INIT([adms],[2.3.7],[qucs-devel@lists.sourceforge.net])
55 AC_CONFIG_HEADER([config.h])
66
77 # specific configuration.
2525 AM_INIT_AUTOMAKE([foreign])
2626 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
2727
28 # Maintainer mode is used to detect/run Perl (XML::LibXml) and make dist tarball
29 AM_MAINTAINER_MODE
30
3128 AC_CHECK_PROG(GIT,git,yes)
3229 AC_MSG_CHECKING([for git repo])
33 AS_IF([test x"$GIT" = "xyes" && test -d $srcdir/.git],
34 [have_git_repo=yes
35 AM_MAINTAINER_MODE([enable])],
36 [have_git_repo=no])
37 AC_MSG_RESULT([$have_git_repo])
3830
3931 AX_PROG_FLEX([],[AC_MSG_WARN(Program flex not found (found $LEX))
4032 AC_MSG_ERROR(Please install gnu flex from http://www.gnu.org/software/flex/)])
9688 AC_PROG_LIBTOOL
9789 AC_SUBST([LIBTOOL_DEPS])
9890
99 dnl Perl, XML::LibXML module required for maintainer
100 if test $USE_MAINTAINER_MODE = yes; then
91 dnl Perl, XML::LibXML module required
92 AC_PATH_PROG(PERL, perl, :)
93 if test "$PERL" = ":"; then
94 AC_MSG_ERROR([The $PACKAGE package requires an installed perl.])
95 fi;
10196
102 AC_PATH_PROG(PERL, perl, :)
103 if test "$PERL" = ":"; then
104 AC_MSG_ERROR([The $PACKAGE package requires an installed perl.])
105 fi;
106
107 AX_PERL_MODULE_VERSION([XML::LibXML 2],[],[
108 AC_MSG_RESULT(failed)
109 AC_MSG_ERROR([Perl package XML::LibXML may be downloaded from http://search.cpan.org/dist/libXML])])
110 fi
97 AX_PERL_MODULE_VERSION([XML::LibXML 2],[],[
98 AC_MSG_RESULT(failed)
99 AC_MSG_ERROR([Perl package XML::LibXML may be downloaded from http://search.cpan.org/dist/libXML])])
111100
112101 # Define preprocessor flag for static build (MinGW).
113102 AS_IF([test "x$enable_shared" = "xno"], [
130119 Configure Information:
131120 Host : $host
132121
133 Maintainer mode : $USE_MAINTAINER_MODE
134
135122 C Compiler : $CC
136123 DEFS : $DEFS
137124 CFLAGS : $CFLAGS
0 Name: ADMS
1 Version: 2.3.0
2 Release: 1%{?dist}
3 Summary: code generator that converts electrical compact device models.. transforms Verilog-AMS code into other target languages
4 License: GPL
5 URL: https://github.com/Qucs/ADMS
6 Source0: ADMS-2.3.0.tar.gz
7
8 #BuildRequires:
9 #Requires:
10
11 %description
12
13
14 %prep
15 %setup -q
16
17
18 %build
19 %configure
20 make %{?_smp_mflags}
21
22
23 %install
24 rm -rf $RPM_BUILD_ROOT
25 %make_install
26
27
28 %files
29 %doc
30 %{_bindir}/*
31 /usr/include/adms/*
32 /usr/lib64/*
33 /usr/share/man/man1/*
34
35
36 %changelog