Browse Source

New upstream version 0.35+git20180503+dfsg

Andreas Bombe 9 months ago
parent
commit
3be9bced3c
176 changed files with 5908 additions and 4365 deletions
  1. 1
    3
      .gitignore
  2. 68
    48
      .travis.yml
  3. 3
    0
      CONTRIBUTING
  4. 0
    340
      COPYING
  5. 3
    433
      COPYING.md
  6. 28
    13
      Makefile.in
  7. 4
    1
      NEWS.md
  8. 10
    7
      README.md
  9. 29
    8
      configure
  10. 144
    0
      dist/linux/build.sh
  11. 0
    193
      dist/linux/buildtest.sh
  12. 24
    0
      dist/linux/create.sh
  13. 32
    0
      dist/linux/deploy2dockerhub.sh
  14. 0
    5
      dist/linux/docker/build-fedora26+mcode
  15. 0
    7
      dist/linux/docker/build-stretch+mcode
  16. 0
    7
      dist/linux/docker/build-stretch+mcode+gpl
  17. 0
    7
      dist/linux/docker/build-ubuntu14+llvm-3.8
  18. 0
    7
      dist/linux/docker/build-ubuntu14+mcode
  19. 11
    0
      dist/linux/docker/build/buster
  20. 12
    0
      dist/linux/docker/build/fedora26
  21. 11
    0
      dist/linux/docker/build/stretch
  22. 16
    0
      dist/linux/docker/build/ubuntu14
  23. 16
    0
      dist/linux/docker/build/ubuntu16
  24. 16
    0
      dist/linux/docker/build/ubuntu18
  25. 10
    0
      dist/linux/docker/run/buster
  26. 12
    0
      dist/linux/docker/run/fedora26
  27. 10
    0
      dist/linux/docker/run/stretch
  28. 16
    0
      dist/linux/docker/run/ubuntu14
  29. 16
    0
      dist/linux/docker/run/ubuntu16
  30. 16
    0
      dist/linux/docker/run/ubuntu18
  31. 114
    0
      dist/linux/test.sh
  32. 73
    41
      dist/linux/travis-ci.sh
  33. 13
    0
      dist/linux/travis-enc-dockerhub.sh
  34. 2
    1
      dist/linux/travis-utils.sh
  35. 5
    2
      dist/windows/appveyor/build.ps1
  36. 2
    5
      dist/windows/compile-ghdl.ps1
  37. 12
    18
      dist/windows/compile-libraries.ps1
  38. 37
    34
      dist/windows/targets.psm1
  39. 427
    0
      doc/COPYING_DOC.md
  40. 3
    0
      doc/about.rst
  41. 2
    2
      doc/appendix/Meta.rst
  42. 11
    1
      doc/building/Building.rst
  43. 1
    1
      doc/building/Directories.rst
  44. 35
    49
      doc/building/PrecompileVendorPrimitives.rst
  45. 34
    16
      doc/building/gcc/GNULinux-GNAT.rst
  46. 14
    14
      doc/building/gcc/Windows-MinGW-GNAT.rst
  47. 35
    4
      doc/building/gcc/index.rst
  48. 14
    17
      doc/building/llvm/GNULinux-GNAT.rst
  49. 9
    9
      doc/building/llvm/Windows-MinGW-GNAT.rst
  50. 3
    11
      doc/building/llvm/index.rst
  51. 9
    9
      doc/building/mcode/GNULinux-GNAT.rst
  52. 2
    2
      doc/building/mcode/Windows-GNATGPL.rst
  53. 9
    9
      doc/building/mcode/Windows-MinGW-GNAT.rst
  54. 3
    3
      doc/building/mcode/index.rst
  55. 12
    12
      doc/conf.py
  56. 6
    6
      doc/contribute.rst
  57. 73
    53
      doc/getting/Releases.rst
  58. 453
    456
      doc/ghdl.texi
  59. 14
    2
      doc/index.rst
  60. 22
    25
      doc/shields.inc
  61. 13
    15
      doc/shieldswho.inc
  62. 6
    10
      doc/using/Simulation.rst
  63. 37
    40
      libraries/Makefile.inc
  64. 28
    19
      libraries/vendors/README.md
  65. 2
    2
      libraries/vendors/compile-altera.ps1
  66. 2
    2
      libraries/vendors/compile-intel.ps1
  67. 2
    2
      libraries/vendors/compile-lattice.ps1
  68. 0
    250
      libraries/vendors/compile-vunit.sh
  69. 2
    2
      libraries/vendors/compile-xilinx-ise.ps1
  70. 2
    2
      libraries/vendors/compile-xilinx-vivado.ps1
  71. 1
    1
      libraries/vendors/compile-xilinx-vivado.sh
  72. 3
    8
      libraries/vendors/config.psm1
  73. 3
    6
      libraries/vendors/config.sh
  74. 49
    0
      setup.py.in
  75. 1
    1
      src/bug.adb
  76. 1
    1
      src/dyn_tables.ads
  77. 32
    30
      src/files_map.adb
  78. 1
    3
      src/files_map.ads
  79. 1
    2
      src/ghdldrv/default_paths.ads.in
  80. 5
    0
      src/ghdldrv/ghdlcomp.adb
  81. 6
    9
      src/ghdldrv/ghdldrv.adb
  82. 32
    34
      src/ghdldrv/ghdllocal.adb
  83. 1
    1
      src/ghdldrv/ghdlmain.adb
  84. 7
    18
      src/ghdldrv/ghdlprint.adb
  85. 7
    6
      src/ghdldrv/ghdlrun.adb
  86. 2
    0
      src/ghdldrv/ghdlxml.adb
  87. 20
    9
      src/grt/grt-disp_signals.adb
  88. 3
    0
      src/grt/grt-disp_signals.ads
  89. 3
    1
      src/grt/grt-errors.ads
  90. 16
    3
      src/grt/grt-lib.adb
  91. 9
    4
      src/grt/grt-lib.ads
  92. 32
    10
      src/grt/grt-main.adb
  93. 11
    0
      src/grt/grt-main.ads
  94. 56
    46
      src/grt/grt-options.adb
  95. 5
    0
      src/grt/grt-options.ads
  96. 54
    47
      src/grt/grt-processes.adb
  97. 14
    1
      src/grt/grt-processes.ads
  98. 236
    212
      src/grt/grt-signals.adb
  99. 15
    10
      src/grt/grt-signals.ads
  100. 4
    2
      src/grt/grt-stats.adb
  101. 6
    8
      src/grt/grt-vpi.adb
  102. 46
    51
      src/libraries.adb
  103. 0
    21
      src/name_table.adb
  104. 0
    18
      src/name_table.ads
  105. 6
    6
      src/options.adb
  106. 4
    1
      src/ortho/mcode/ortho_ident.adb
  107. 11
    2
      src/std_names.adb
  108. 42
    31
      src/std_names.ads
  109. 1
    7
      src/types.ads
  110. 1
    1
      src/version.in
  111. 9
    7
      src/vhdl/canon.adb
  112. 8
    3
      src/vhdl/disp_tree.adb
  113. 5
    1
      src/vhdl/disp_vhdl.adb
  114. 111
    29
      src/vhdl/elocations.adb
  115. 32
    1
      src/vhdl/elocations.adb.in
  116. 65
    35
      src/vhdl/elocations.ads
  117. 67
    2
      src/vhdl/elocations_meta.adb
  118. 7
    1
      src/vhdl/elocations_meta.ads
  119. 6
    14
      src/vhdl/errorout.adb
  120. 2
    1
      src/vhdl/errorout.ads
  121. 55
    57
      src/vhdl/evaluation.adb
  122. 3
    4
      src/vhdl/evaluation.ads
  123. 0
    7
      src/vhdl/ieee-vital_timing.adb
  124. 25
    2
      src/vhdl/iirs.adb
  125. 5
    0
      src/vhdl/iirs.adb.in
  126. 61
    24
      src/vhdl/iirs.ads
  127. 6
    1
      src/vhdl/iirs_utils.adb
  128. 266
    206
      src/vhdl/nodes_meta.adb
  129. 8
    0
      src/vhdl/nodes_meta.ads
  130. 135
    61
      src/vhdl/parse.adb
  131. 3
    10
      src/vhdl/python/libghdl/__init__.py
  132. 1
    0
      src/vhdl/python/libghdl/thin.py
  133. 129
    1
      src/vhdl/python/libghdl/thinutils.py
  134. 64
    40
      src/vhdl/scanner.adb
  135. 11
    1
      src/vhdl/scanner.ads
  136. 11
    9
      src/vhdl/sem.adb
  137. 2
    2
      src/vhdl/sem_assocs.adb
  138. 37
    23
      src/vhdl/sem_decls.adb
  139. 13
    5
      src/vhdl/sem_expr.adb
  140. 37
    11
      src/vhdl/sem_inst.adb
  141. 46
    12
      src/vhdl/sem_names.adb
  142. 3
    2
      src/vhdl/sem_psl.adb
  143. 2
    4
      src/vhdl/sem_scopes.adb
  144. 10
    0
      src/vhdl/sem_scopes.ads
  145. 33
    3
      src/vhdl/sem_specs.adb
  146. 4
    0
      src/vhdl/sem_stmts.adb
  147. 41
    8
      src/vhdl/sem_types.adb
  148. 35
    3
      src/vhdl/simulate/simul-annotations.adb
  149. 185
    49
      src/vhdl/simulate/simul-debugger.adb
  150. 7
    0
      src/vhdl/simulate/simul-debugger.ads
  151. 38
    22
      src/vhdl/simulate/simul-elaboration.adb
  152. 22
    14
      src/vhdl/simulate/simul-environments.adb
  153. 12
    6
      src/vhdl/simulate/simul-environments.ads
  154. 206
    146
      src/vhdl/simulate/simul-execution.adb
  155. 15
    4
      src/vhdl/simulate/simul-execution.ads
  156. 89
    34
      src/vhdl/simulate/simul-simulation-main.adb
  157. 0
    1
      src/vhdl/std_package.adb
  158. 1
    1
      src/vhdl/translate/ortho_front.adb
  159. 0
    4
      src/vhdl/translate/trans-chap12.adb
  160. 18
    6
      src/vhdl/translate/trans-chap2.adb
  161. 470
    168
      src/vhdl/translate/trans-chap3.adb
  162. 40
    7
      src/vhdl/translate/trans-chap3.ads
  163. 87
    61
      src/vhdl/translate/trans-chap4.adb
  164. 4
    3
      src/vhdl/translate/trans-chap5.adb
  165. 43
    23
      src/vhdl/translate/trans-chap6.adb
  166. 48
    58
      src/vhdl/translate/trans-chap7.adb
  167. 12
    12
      src/vhdl/translate/trans-chap8.adb
  168. 39
    23
      src/vhdl/translate/trans-chap9.adb
  169. 11
    8
      src/vhdl/translate/trans-foreach_non_composite.adb
  170. 5
    10
      src/vhdl/translate/trans-helpers2.adb
  171. 26
    28
      src/vhdl/translate/trans-rtis.adb
  172. 199
    173
      src/vhdl/translate/trans.adb
  173. 91
    23
      src/vhdl/translate/trans.ads
  174. 2
    1
      src/vhdl/translate/trans_decls.ads
  175. 78
    49
      src/vhdl/translate/translation.adb
  176. 4
    5
      src/vhdl/translate/translation.ads

+ 1
- 3
.gitignore View File

@@ -12,9 +12,7 @@ b~*.ad?
12 12
 testsuite/get_entities
13 13
 
14 14
 # Generated files on windows.
15
-build/
16
-dist/mcode/build/
17
-dist/mcode/lib/
15
+/build/
18 16
 
19 17
 # Generated directories on Linux
20 18
 lib/

+ 68
- 48
.travis.yml View File

@@ -1,62 +1,82 @@
1 1
 branches:
2 2
   except:
3
-  - appveyor
3
+    - appveyor
4 4
 
5
-language: c
5
+os: linux
6
+dist: trusty
7
+sudo: required
8
+services: docker
9
+language: minimal
10
+install: skip
11
+script: "./dist/linux/travis-ci.sh"
6 12
 
7
-matrix:
8
-  include:
9
-    - os: linux
10
-      dist: trusty
11
-      sudo: required
12
-      services: docker
13
-      env: IMAGE=stretch+mcode
14
-    - os: linux
15
-      dist: trusty
16
-      sudo: required
17
-      services: docker
18
-      env: IMAGE=stretch+mcode+gpl
19
-    - os: linux
20
-      dist: trusty
21
-      sudo: required
22
-      services: docker
23
-      env: IMAGE=ubuntu14+mcode
24
-    - os: linux
25
-      dist: trusty
26
-      sudo: required
27
-      services: docker
28
-      env: IMAGE=ubuntu14+llvm-3.8
29
-    - os: linux
30
-      dist: trusty
31
-      sudo: required
32
-      services: docker
33
-      env: IMAGE=fedora26+mcode
34
-    - os: osx
35
-      osx_image: xcode7.3
36
-      env: IMAGE=macosx+mcode
37
-      cache:
38
-        directories:
39
-          - gnat
40
-
41
-install: true
42
-
43
-script:
44
-- ./dist/linux/travis-ci.sh
45
-
46
-before_deploy:
47
-- "echo ready to deploy"
13
+addons:
14
+  apt:
15
+    packages:
16
+      - docker-ce
48 17
 
49 18
 deploy:
50
-  - provider: releases
19
+  - &deploy-docker
20
+    provider: script
21
+    skip_cleanup: true
22
+    script: ./dist/linux/deploy2dockerhub.sh "$IMAGE" "$TRAVIS_COMMIT_MESSAGE"
23
+    on:
24
+      repo: 1138-4EB/ghdl
25
+      branch: master
26
+  - &deploy-releases
27
+    provider: releases
51 28
     skip_cleanup: true
52 29
     api_key:
53 30
       secure: ji6LXOmD5V2N+ELHZr4oJsmxPhedk+8W6jfCqQdEbewQ42N+fKOq3lgqJni7ZdfpZaulB9OHPTApv3bwOjXjtN9rfBGmq//U9CwvzHmUeomdQv6WQOVevaWSXl3DNL9fk3yKynyFrsv4pvr45L8GIjaHLggKcYhNFPJ2rrnJlDoFT9MqQNpmP7Bg/LnwVQiv+ZDPkLlMWQzrXzLamdQILARPQka+kCdXl/sHH6OKvLgRvu9yvyXYSSfbyAHP+THISS5gDciizSBeWGlU75kgj/N+mkV+8NvtTTfEIgG8y49WJz6aBooTmRzk/jZW1dKMbDR6c5bpTmRvMZSzeSBuAR6WLhr6HevgCPi/1fX1y3pkVSrgBUF5KcxPgWCZp0I05QjaJOdvQDl1hH4TlVwpT18lM2+cWrui9fS7spnk/AuNKX882C5QWWRy28lIPasCVnwfeKX8a9KAwY9OqVOenoLC1yx7NJOGfH1bjuSYYxyR4XgLiGTHKALAuknCyD9QL0o378IwqxHMcsN0Gsd+GndMu0/b8GvSqfzDpV1XknqabQFwkZLs+Yydw0snfBUzXw9TfOk78IiPYEgXAxsQKBAkK7qvO36HIxLlSQXglXU1D4IDtQYDUel6vKll4pgu0WMxStQCbj51yDVJKvRhzwiBNC6Pwgzt2JTrpwM/T/U=
54 31
     file: "ghdl-*.tgz"
55 32
     file_glob: true
56 33
     on:
57
-      repo: tgingold/ghdl
58
-      tags: true
34
+      repo: ghdl/ghdl
59 35
       all_branches: true
36
+      tags: true
37
+
38
+# For each linux build, a different job/instance (with the constraints
39
+# above) is executed in parallel in stage 'test'.
40
+env:
41
+  matrix:
42
+    - IMAGE=stretch+mcode
43
+    - IMAGE=stretch+mcode+gpl
44
+#    - IMAGE=buster+mcode
45
+#    - IMAGE=buster+mcode+gpl
46
+    - IMAGE=ubuntu14+mcode
47
+    - IMAGE=ubuntu14+llvm-3.8
48
+#    - IMAGE=ubuntu16+mcode
49
+#    - IMAGE=ubuntu16+llvm-3.9
50
+#    - IMAGE=ubuntu18+mcode
51
+#    - IMAGE=ubuntu18+llvm-5.0
52
+    - IMAGE=fedora26+mcode
53
+#    - IMAGE=fedora26+llvm
54
+  global:
55
+    - secure: "MZHtYkWdYK+SeYzJvWD8I0tbkdHGjmWyNDn70a2RrNYFu363Zt51ZvksEtkjrS7kdje6l6VPfLjilX5UtywIM1Mg6nt/rsw4p62+bGhMyhfXiqS3eqEfH2sThjosy773X8iotm2sW0ax0oHX07ZLcuTbZ+TK2cMGarZ+LzNT8IiMaeaWu4W7aE5LRxSmVRwcACUOa3NiC7GY/qC7vU2C8QNdXSlU3fSp17K5eccrkkBuiEhRTsdr3ZIhjOjrYzqHKWC3a0uHn/fJsbepsVM6FGt+zAwo0VqdXXCE2ts8EOATvFgEaCGxUgfGd/yvNsAG7sjF3nweR9Z11dpMbBE+TjxlLCXQ31v1Oj7pH6vcgjCYV69cZiLbsDhxTJFQ08qbm3xK8dmTUXFy1scrMSd8D/Q3Uf0LjHkH5Q5dL8TOyqejs57fUTIBtBUpCTvvGOErdZQAOWJc93sC9RQB7BuCDR2yR7rPTJr4KUwspe1uScA/H9cQS2p42SeJ4+Yyjtwod3IQWjr6+/pdNPoImleOP0dXSDCXpAIsbv6TR9curS3geLJuTmu5UnLzbURDr7Whtop3lCPbiN0H9jThSuyIxWUI+6JDGDG89RXbCyZvGz97sIShYstWg0U0xLWmw9IDez2HtK5VKuTT/hE7gDicZ0erN6r1dlix3SpuCtH1MlA=" #U
56
+    - secure: "kIA09oCHzoHMK4LsfwcaVaMuoAFpd1M+M8tW3b9Rvki/hEB3y46edlb88lWVM7RgkNoCaIPwAZD7Wf3Xiq9Y7wWmqRsWQNRaorC0xke5SuyMwCSQSNo9S5jAu9SM5uxENCH9yucJl/vm2juYitJCHyYYMb4x17fy3sHKULNJ+JBqnrgOuTBYM1JOIkJVO1P5LqEXmqTtr6KgQgiTMtlvnM7hxjapgoyM3J1376f+Kfky0hUoDD7LFLXu8yQCn5Fnar8wR3czK6Qknafmckt5yWJxGOZobMDfKwOdA0fpU+XiArNQ/1NM80fGXq4YOGK5ycVQkO2ACxDqHYfQRYLlIfrUGp75BoXWwN6O1GoOrFcF7ZIoSaLoK3hZdvzRFT7dpUQFlosn00Y7VzqbosQM5QS5TBBqO+DExnkb399OpXI7o0lrlr232kjAeYqEb6N1n3M9BpiNW9Je4plJa/RDKwYsnC8Qak4G08PVTe6V711W1UtqMPd6efWFYTNvRW9tjO3v1lFGaGJ99ABP0AYLIDYWV3zfgvp0UzQOKFdWJj7dMQxdLMQ/bIETKn8P7NFjOWic4pgtp3zekZCL27blhc0fyHm62HUiVLT+VGFOI/nyclzBIZStSVuxPj2LvmAIiMnUNmWwds1ZqIZ21eiNykkn+k52ddTRHXIh2fhvWfg=" #P
60 57
 
61
-after_deploy:
62
-- "echo deployed"
58
+stages:
59
+  - create ghdl/build and ghdl/run images
60
+  - test
61
+
62
+jobs:
63
+  include:
64
+    # A single job is described in its own stage, to create and push ghdl/build and ghdl/run images.
65
+    - stage: create ghdl/build and ghdl/run images
66
+      env: IMAGE=""
67
+      script: if echo "$TRAVIS_COMMIT_MESSAGE" | grep -F -q "[ci images]"; then ./dist/linux/create.sh; fi;
68
+      deploy:
69
+        - <<: *deploy-docker
70
+    # A single additional job is described in stage 'test' for the macos build.
71
+    # The constraints above are used, except explicitly overriden.
72
+    - stage: test
73
+      os: osx
74
+      language: c
75
+      osx_image: xcode7.3
76
+      install: true
77
+      cache:
78
+        directories:
79
+          - gnat
80
+      env: IMAGE=macosx+mcode
81
+      deploy:
82
+        - <<: *deploy-releases

+ 3
- 0
CONTRIBUTING View File

@@ -0,0 +1,3 @@
1
+First off, thanks for taking the time to contribute!
2
+
3
+Either to [report a bug](http://ghdl.readthedocs.io/en/doc-gcc/contribute.html#reporting-bugs), [request enhancements](http://ghdl.readthedocs.io/en/doc-gcc/contribute.html#requesting-enhancements) or to [contribute modifications](http://ghdl.readthedocs.io/en/doc-gcc/contribute.html#fork-modify-and-pull-request), please read [Contributing](http://ghdl.readthedocs.io/en/doc-gcc/contribute.html) in the [Docs](http://ghdl.readthedocs.io/en/doc-gcc/index.html).

+ 0
- 340
COPYING View File

@@ -1,340 +0,0 @@
1
-		    GNU GENERAL PUBLIC LICENSE
2
-		       Version 2, June 1991
3
-
4
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
6
- Everyone is permitted to copy and distribute verbatim copies
7
- of this license document, but changing it is not allowed.
8
-
9
-			    Preamble
10
-
11
-  The licenses for most software are designed to take away your
12
-freedom to share and change it.  By contrast, the GNU General Public
13
-License is intended to guarantee your freedom to share and change free
14
-software--to make sure the software is free for all its users.  This
15
-General Public License applies to most of the Free Software
16
-Foundation's software and to any other program whose authors commit to
17
-using it.  (Some other Free Software Foundation software is covered by
18
-the GNU Library General Public License instead.)  You can apply it to
19
-your programs, too.
20
-
21
-  When we speak of free software, we are referring to freedom, not
22
-price.  Our General Public Licenses are designed to make sure that you
23
-have the freedom to distribute copies of free software (and charge for
24
-this service if you wish), that you receive source code or can get it
25
-if you want it, that you can change the software or use pieces of it
26
-in new free programs; and that you know you can do these things.
27
-
28
-  To protect your rights, we need to make restrictions that forbid
29
-anyone to deny you these rights or to ask you to surrender the rights.
30
-These restrictions translate to certain responsibilities for you if you
31
-distribute copies of the software, or if you modify it.
32
-
33
-  For example, if you distribute copies of such a program, whether
34
-gratis or for a fee, you must give the recipients all the rights that
35
-you have.  You must make sure that they, too, receive or can get the
36
-source code.  And you must show them these terms so they know their
37
-rights.
38
-
39
-  We protect your rights with two steps: (1) copyright the software, and
40
-(2) offer you this license which gives you legal permission to copy,
41
-distribute and/or modify the software.
42
-
43
-  Also, for each author's protection and ours, we want to make certain
44
-that everyone understands that there is no warranty for this free
45
-software.  If the software is modified by someone else and passed on, we
46
-want its recipients to know that what they have is not the original, so
47
-that any problems introduced by others will not reflect on the original
48
-authors' reputations.
49
-
50
-  Finally, any free program is threatened constantly by software
51
-patents.  We wish to avoid the danger that redistributors of a free
52
-program will individually obtain patent licenses, in effect making the
53
-program proprietary.  To prevent this, we have made it clear that any
54
-patent must be licensed for everyone's free use or not licensed at all.
55
-
56
-  The precise terms and conditions for copying, distribution and
57
-modification follow.
58
-
59
-		    GNU GENERAL PUBLIC LICENSE
60
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
-
62
-  0. This License applies to any program or other work which contains
63
-a notice placed by the copyright holder saying it may be distributed
64
-under the terms of this General Public License.  The "Program", below,
65
-refers to any such program or work, and a "work based on the Program"
66
-means either the Program or any derivative work under copyright law:
67
-that is to say, a work containing the Program or a portion of it,
68
-either verbatim or with modifications and/or translated into another
69
-language.  (Hereinafter, translation is included without limitation in
70
-the term "modification".)  Each licensee is addressed as "you".
71
-
72
-Activities other than copying, distribution and modification are not
73
-covered by this License; they are outside its scope.  The act of
74
-running the Program is not restricted, and the output from the Program
75
-is covered only if its contents constitute a work based on the
76
-Program (independent of having been made by running the Program).
77
-Whether that is true depends on what the Program does.
78
-
79
-  1. You may copy and distribute verbatim copies of the Program's
80
-source code as you receive it, in any medium, provided that you
81
-conspicuously and appropriately publish on each copy an appropriate
82
-copyright notice and disclaimer of warranty; keep intact all the
83
-notices that refer to this License and to the absence of any warranty;
84
-and give any other recipients of the Program a copy of this License
85
-along with the Program.
86
-
87
-You may charge a fee for the physical act of transferring a copy, and
88
-you may at your option offer warranty protection in exchange for a fee.
89
-
90
-  2. You may modify your copy or copies of the Program or any portion
91
-of it, thus forming a work based on the Program, and copy and
92
-distribute such modifications or work under the terms of Section 1
93
-above, provided that you also meet all of these conditions:
94
-
95
-    a) You must cause the modified files to carry prominent notices
96
-    stating that you changed the files and the date of any change.
97
-
98
-    b) You must cause any work that you distribute or publish, that in
99
-    whole or in part contains or is derived from the Program or any
100
-    part thereof, to be licensed as a whole at no charge to all third
101
-    parties under the terms of this License.
102
-
103
-    c) If the modified program normally reads commands interactively
104
-    when run, you must cause it, when started running for such
105
-    interactive use in the most ordinary way, to print or display an
106
-    announcement including an appropriate copyright notice and a
107
-    notice that there is no warranty (or else, saying that you provide
108
-    a warranty) and that users may redistribute the program under
109
-    these conditions, and telling the user how to view a copy of this
110
-    License.  (Exception: if the Program itself is interactive but
111
-    does not normally print such an announcement, your work based on
112
-    the Program is not required to print an announcement.)
113
-
114
-These requirements apply to the modified work as a whole.  If
115
-identifiable sections of that work are not derived from the Program,
116
-and can be reasonably considered independent and separate works in
117
-themselves, then this License, and its terms, do not apply to those
118
-sections when you distribute them as separate works.  But when you
119
-distribute the same sections as part of a whole which is a work based
120
-on the Program, the distribution of the whole must be on the terms of
121
-this License, whose permissions for other licensees extend to the
122
-entire whole, and thus to each and every part regardless of who wrote it.
123
-
124
-Thus, it is not the intent of this section to claim rights or contest
125
-your rights to work written entirely by you; rather, the intent is to
126
-exercise the right to control the distribution of derivative or
127
-collective works based on the Program.
128
-
129
-In addition, mere aggregation of another work not based on the Program
130
-with the Program (or with a work based on the Program) on a volume of
131
-a storage or distribution medium does not bring the other work under
132
-the scope of this License.
133
-
134
-  3. You may copy and distribute the Program (or a work based on it,
135
-under Section 2) in object code or executable form under the terms of
136
-Sections 1 and 2 above provided that you also do one of the following:
137
-
138
-    a) Accompany it with the complete corresponding machine-readable
139
-    source code, which must be distributed under the terms of Sections
140
-    1 and 2 above on a medium customarily used for software interchange; or,
141
-
142
-    b) Accompany it with a written offer, valid for at least three
143
-    years, to give any third party, for a charge no more than your
144
-    cost of physically performing source distribution, a complete
145
-    machine-readable copy of the corresponding source code, to be
146
-    distributed under the terms of Sections 1 and 2 above on a medium
147
-    customarily used for software interchange; or,
148
-
149
-    c) Accompany it with the information you received as to the offer
150
-    to distribute corresponding source code.  (This alternative is
151
-    allowed only for noncommercial distribution and only if you
152
-    received the program in object code or executable form with such
153
-    an offer, in accord with Subsection b above.)
154
-
155
-The source code for a work means the preferred form of the work for
156
-making modifications to it.  For an executable work, complete source
157
-code means all the source code for all modules it contains, plus any
158
-associated interface definition files, plus the scripts used to
159
-control compilation and installation of the executable.  However, as a
160
-special exception, the source code distributed need not include
161
-anything that is normally distributed (in either source or binary
162
-form) with the major components (compiler, kernel, and so on) of the
163
-operating system on which the executable runs, unless that component
164
-itself accompanies the executable.
165
-
166
-If distribution of executable or object code is made by offering
167
-access to copy from a designated place, then offering equivalent
168
-access to copy the source code from the same place counts as
169
-distribution of the source code, even though third parties are not
170
-compelled to copy the source along with the object code.
171
-
172
-  4. You may not copy, modify, sublicense, or distribute the Program
173
-except as expressly provided under this License.  Any attempt
174
-otherwise to copy, modify, sublicense or distribute the Program is
175
-void, and will automatically terminate your rights under this License.
176
-However, parties who have received copies, or rights, from you under
177
-this License will not have their licenses terminated so long as such
178
-parties remain in full compliance.
179
-
180
-  5. You are not required to accept this License, since you have not
181
-signed it.  However, nothing else grants you permission to modify or
182
-distribute the Program or its derivative works.  These actions are
183
-prohibited by law if you do not accept this License.  Therefore, by
184
-modifying or distributing the Program (or any work based on the
185
-Program), you indicate your acceptance of this License to do so, and
186
-all its terms and conditions for copying, distributing or modifying
187
-the Program or works based on it.
188
-
189
-  6. Each time you redistribute the Program (or any work based on the
190
-Program), the recipient automatically receives a license from the
191
-original licensor to copy, distribute or modify the Program subject to
192
-these terms and conditions.  You may not impose any further
193
-restrictions on the recipients' exercise of the rights granted herein.
194
-You are not responsible for enforcing compliance by third parties to
195
-this License.
196
-
197
-  7. If, as a consequence of a court judgment or allegation of patent
198
-infringement or for any other reason (not limited to patent issues),
199
-conditions are imposed on you (whether by court order, agreement or
200
-otherwise) that contradict the conditions of this License, they do not
201
-excuse you from the conditions of this License.  If you cannot
202
-distribute so as to satisfy simultaneously your obligations under this
203
-License and any other pertinent obligations, then as a consequence you
204
-may not distribute the Program at all.  For example, if a patent
205
-license would not permit royalty-free redistribution of the Program by
206
-all those who receive copies directly or indirectly through you, then
207
-the only way you could satisfy both it and this License would be to
208
-refrain entirely from distribution of the Program.
209
-
210
-If any portion of this section is held invalid or unenforceable under
211
-any particular circumstance, the balance of the section is intended to
212
-apply and the section as a whole is intended to apply in other
213
-circumstances.
214
-
215
-It is not the purpose of this section to induce you to infringe any
216
-patents or other property right claims or to contest validity of any
217
-such claims; this section has the sole purpose of protecting the
218
-integrity of the free software distribution system, which is
219
-implemented by public license practices.  Many people have made
220
-generous contributions to the wide range of software distributed
221
-through that system in reliance on consistent application of that
222
-system; it is up to the author/donor to decide if he or she is willing
223
-to distribute software through any other system and a licensee cannot
224
-impose that choice.
225
-
226
-This section is intended to make thoroughly clear what is believed to
227
-be a consequence of the rest of this License.
228
-
229
-  8. If the distribution and/or use of the Program is restricted in
230
-certain countries either by patents or by copyrighted interfaces, the
231
-original copyright holder who places the Program under this License
232
-may add an explicit geographical distribution limitation excluding
233
-those countries, so that distribution is permitted only in or among
234
-countries not thus excluded.  In such case, this License incorporates
235
-the limitation as if written in the body of this License.
236
-
237
-  9. The Free Software Foundation may publish revised and/or new versions
238
-of the General Public License from time to time.  Such new versions will
239
-be similar in spirit to the present version, but may differ in detail to
240
-address new problems or concerns.
241
-
242
-Each version is given a distinguishing version number.  If the Program
243
-specifies a version number of this License which applies to it and "any
244
-later version", you have the option of following the terms and conditions
245
-either of that version or of any later version published by the Free
246
-Software Foundation.  If the Program does not specify a version number of
247
-this License, you may choose any version ever published by the Free Software
248
-Foundation.
249
-
250
-  10. If you wish to incorporate parts of the Program into other free
251
-programs whose distribution conditions are different, write to the author
252
-to ask for permission.  For software which is copyrighted by the Free
253
-Software Foundation, write to the Free Software Foundation; we sometimes
254
-make exceptions for this.  Our decision will be guided by the two goals
255
-of preserving the free status of all derivatives of our free software and
256
-of promoting the sharing and reuse of software generally.
257
-
258
-			    NO WARRANTY
259
-
260
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
262
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
266
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
267
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
-REPAIR OR CORRECTION.
269
-
270
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
-POSSIBILITY OF SUCH DAMAGES.
279
-
280
-		     END OF TERMS AND CONDITIONS
281
-
282
-	    How to Apply These Terms to Your New Programs
283
-
284
-  If you develop a new program, and you want it to be of the greatest
285
-possible use to the public, the best way to achieve this is to make it
286
-free software which everyone can redistribute and change under these terms.
287
-
288
-  To do so, attach the following notices to the program.  It is safest
289
-to attach them to the start of each source file to most effectively
290
-convey the exclusion of warranty; and each file should have at least
291
-the "copyright" line and a pointer to where the full notice is found.
292
-
293
-    <one line to give the program's name and a brief idea of what it does.>
294
-    Copyright (C) <year>  <name of author>
295
-
296
-    This program is free software; you can redistribute it and/or modify
297
-    it under the terms of the GNU General Public License as published by
298
-    the Free Software Foundation; either version 2 of the License, or
299
-    (at your option) any later version.
300
-
301
-    This program is distributed in the hope that it will be useful,
302
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
303
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
304
-    GNU General Public License for more details.
305
-
306
-    You should have received a copy of the GNU General Public License
307
-    along with this program; if not, write to the Free Software
308
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
309
-
310
-
311
-Also add information on how to contact you by electronic and paper mail.
312
-
313
-If the program is interactive, make it output a short notice like this
314
-when it starts in an interactive mode:
315
-
316
-    Gnomovision version 69, Copyright (C) year  name of author
317
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
318
-    This is free software, and you are welcome to redistribute it
319
-    under certain conditions; type `show c' for details.
320
-
321
-The hypothetical commands `show w' and `show c' should show the appropriate
322
-parts of the General Public License.  Of course, the commands you use may
323
-be called something other than `show w' and `show c'; they could even be
324
-mouse-clicks or menu items--whatever suits your program.
325
-
326
-You should also get your employer (if you work as a programmer) or your
327
-school, if any, to sign a "copyright disclaimer" for the program, if
328
-necessary.  Here is a sample; alter the names:
329
-
330
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
331
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
332
-
333
-  <signature of Ty Coon>, 1 April 1989
334
-  Ty Coon, President of Vice
335
-
336
-This General Public License does not permit incorporating your program into
337
-proprietary programs.  If your program is a subroutine library, you may
338
-consider it more useful to permit linking proprietary applications with the
339
-library.  If this is what you want to do, use the GNU Library General
340
-Public License instead of this License.

+ 3
- 433
COPYING.md View File

@@ -1,4 +1,4 @@
1
-## GNU GENERAL PUBLIC LICENSE
1
+### GNU GENERAL PUBLIC LICENSE
2 2
 
3 3
 Version 2, June 1991
4 4
 
@@ -357,435 +357,5 @@ into proprietary programs. If your program is a subroutine library,
357 357
 you may consider it more useful to permit linking proprietary
358 358
 applications with the library. If this is what you want to do, use the
359 359
 [GNU Lesser General Public
360
-License](http://www.gnu.org/licenses/lgpl.html) instead of this
361
-
362
----
363
-
364
-License.Attribution-ShareAlike 4.0 International
365
-
366
-=======================================================================
367
-
368
-Creative Commons Corporation ("Creative Commons") is not a law firm and
369
-does not provide legal services or legal advice. Distribution of
370
-Creative Commons public licenses does not create a lawyer-client or
371
-other relationship. Creative Commons makes its licenses and related
372
-information available on an "as-is" basis. Creative Commons gives no
373
-warranties regarding its licenses, any material licensed under their
374
-terms and conditions, or any related information. Creative Commons
375
-disclaims all liability for damages resulting from their use to the
376
-fullest extent possible.
377
-
378
-Using Creative Commons Public Licenses
379
-
380
-Creative Commons public licenses provide a standard set of terms and
381
-conditions that creators and other rights holders may use to share
382
-original works of authorship and other material subject to copyright
383
-and certain other rights specified in the public license below. The
384
-following considerations are for informational purposes only, are not
385
-exhaustive, and do not form part of our licenses.
386
-
387
-     Considerations for licensors: Our public licenses are
388
-     intended for use by those authorized to give the public
389
-     permission to use material in ways otherwise restricted by
390
-     copyright and certain other rights. Our licenses are
391
-     irrevocable. Licensors should read and understand the terms
392
-     and conditions of the license they choose before applying it.
393
-     Licensors should also secure all rights necessary before
394
-     applying our licenses so that the public can reuse the
395
-     material as expected. Licensors should clearly mark any
396
-     material not subject to the license. This includes other CC-
397
-     licensed material, or material used under an exception or
398
-     limitation to copyright. More considerations for licensors:
399
-	wiki.creativecommons.org/Considerations_for_licensors
400
-
401
-     Considerations for the public: By using one of our public
402
-     licenses, a licensor grants the public permission to use the
403
-     licensed material under specified terms and conditions. If
404
-     the licensor's permission is not necessary for any reason--for
405
-     example, because of any applicable exception or limitation to
406
-     copyright--then that use is not regulated by the license. Our
407
-     licenses grant only permissions under copyright and certain
408
-     other rights that a licensor has authority to grant. Use of
409
-     the licensed material may still be restricted for other
410
-     reasons, including because others have copyright or other
411
-     rights in the material. A licensor may make special requests,
412
-     such as asking that all changes be marked or described.
413
-     Although not required by our licenses, you are encouraged to
414
-     respect those requests where reasonable. More_considerations
415
-     for the public: 
416
-	wiki.creativecommons.org/Considerations_for_licensees
417
-
418
-=======================================================================
419
-
420
-Creative Commons Attribution-ShareAlike 4.0 International Public
421
-License
422
-
423
-By exercising the Licensed Rights (defined below), You accept and agree
424
-to be bound by the terms and conditions of this Creative Commons
425
-Attribution-ShareAlike 4.0 International Public License ("Public
426
-License"). To the extent this Public License may be interpreted as a
427
-contract, You are granted the Licensed Rights in consideration of Your
428
-acceptance of these terms and conditions, and the Licensor grants You
429
-such rights in consideration of benefits the Licensor receives from
430
-making the Licensed Material available under these terms and
431
-conditions.
432
-
433
-
434
-Section 1 -- Definitions.
435
-
436
-  a. Adapted Material means material subject to Copyright and Similar
437
-     Rights that is derived from or based upon the Licensed Material
438
-     and in which the Licensed Material is translated, altered,
439
-     arranged, transformed, or otherwise modified in a manner requiring
440
-     permission under the Copyright and Similar Rights held by the
441
-     Licensor. For purposes of this Public License, where the Licensed
442
-     Material is a musical work, performance, or sound recording,
443
-     Adapted Material is always produced where the Licensed Material is
444
-     synched in timed relation with a moving image.
445
-
446
-  b. Adapter's License means the license You apply to Your Copyright
447
-     and Similar Rights in Your contributions to Adapted Material in
448
-     accordance with the terms and conditions of this Public License.
449
-
450
-  c. BY-SA Compatible License means a license listed at
451
-     creativecommons.org/compatiblelicenses, approved by Creative
452
-     Commons as essentially the equivalent of this Public License.
453
-
454
-  d. Copyright and Similar Rights means copyright and/or similar rights
455
-     closely related to copyright including, without limitation,
456
-     performance, broadcast, sound recording, and Sui Generis Database
457
-     Rights, without regard to how the rights are labeled or
458
-     categorized. For purposes of this Public License, the rights
459
-     specified in Section 2(b)(1)-(2) are not Copyright and Similar
460
-     Rights.
461
-
462
-  e. Effective Technological Measures means those measures that, in the
463
-     absence of proper authority, may not be circumvented under laws
464
-     fulfilling obligations under Article 11 of the WIPO Copyright
465
-     Treaty adopted on December 20, 1996, and/or similar international
466
-     agreements.
467
-
468
-  f. Exceptions and Limitations means fair use, fair dealing, and/or
469
-     any other exception or limitation to Copyright and Similar Rights
470
-     that applies to Your use of the Licensed Material.
471
-
472
-  g. License Elements means the license attributes listed in the name
473
-     of a Creative Commons Public License. The License Elements of this
474
-     Public License are Attribution and ShareAlike.
475
-
476
-  h. Licensed Material means the artistic or literary work, database,
477
-     or other material to which the Licensor applied this Public
478
-     License.
479
-
480
-  i. Licensed Rights means the rights granted to You subject to the
481
-     terms and conditions of this Public License, which are limited to
482
-     all Copyright and Similar Rights that apply to Your use of the
483
-     Licensed Material and that the Licensor has authority to license.
484
-
485
-  j. Licensor means the individual(s) or entity(ies) granting rights
486
-     under this Public License.
487
-
488
-  k. Share means to provide material to the public by any means or
489
-     process that requires permission under the Licensed Rights, such
490
-     as reproduction, public display, public performance, distribution,
491
-     dissemination, communication, or importation, and to make material
492
-     available to the public including in ways that members of the
493
-     public may access the material from a place and at a time
494
-     individually chosen by them.
495
-
496
-  l. Sui Generis Database Rights means rights other than copyright
497
-     resulting from Directive 96/9/EC of the European Parliament and of
498
-     the Council of 11 March 1996 on the legal protection of databases,
499
-     as amended and/or succeeded, as well as other essentially
500
-     equivalent rights anywhere in the world.
501
-
502
-  m. You means the individual or entity exercising the Licensed Rights
503
-     under this Public License. Your has a corresponding meaning.
504
-
505
-
506
-Section 2 -- Scope.
507
-
508
-  a. License grant.
509
-
510
-       1. Subject to the terms and conditions of this Public License,
511
-          the Licensor hereby grants You a worldwide, royalty-free,
512
-          non-sublicensable, non-exclusive, irrevocable license to
513
-          exercise the Licensed Rights in the Licensed Material to:
514
-
515
-            a. reproduce and Share the Licensed Material, in whole or
516
-               in part; and
517
-
518
-            b. produce, reproduce, and Share Adapted Material.
519
-
520
-       2. Exceptions and Limitations. For the avoidance of doubt, where
521
-          Exceptions and Limitations apply to Your use, this Public
522
-          License does not apply, and You do not need to comply with
523
-          its terms and conditions.
524
-
525
-       3. Term. The term of this Public License is specified in Section
526
-          6(a).
527
-
528
-       4. Media and formats; technical modifications allowed. The
529
-          Licensor authorizes You to exercise the Licensed Rights in
530
-          all media and formats whether now known or hereafter created,
531
-          and to make technical modifications necessary to do so. The
532
-          Licensor waives and/or agrees not to assert any right or
533
-          authority to forbid You from making technical modifications
534
-          necessary to exercise the Licensed Rights, including
535
-          technical modifications necessary to circumvent Effective
536
-          Technological Measures. For purposes of this Public License,
537
-          simply making modifications authorized by this Section 2(a)
538
-          (4) never produces Adapted Material.
539
-
540
-       5. Downstream recipients.
541
-
542
-            a. Offer from the Licensor -- Licensed Material. Every
543
-               recipient of the Licensed Material automatically
544
-               receives an offer from the Licensor to exercise the
545
-               Licensed Rights under the terms and conditions of this
546
-               Public License.
547
-
548
-            b. Additional offer from the Licensor -- Adapted Material.
549
-               Every recipient of Adapted Material from You
550
-               automatically receives an offer from the Licensor to
551
-               exercise the Licensed Rights in the Adapted Material
552
-               under the conditions of the Adapter's License You apply.
553
-
554
-            c. No downstream restrictions. You may not offer or impose
555
-               any additional or different terms or conditions on, or
556
-               apply any Effective Technological Measures to, the
557
-               Licensed Material if doing so restricts exercise of the
558
-               Licensed Rights by any recipient of the Licensed
559
-               Material.
560
-
561
-       6. No endorsement. Nothing in this Public License constitutes or
562
-          may be construed as permission to assert or imply that You
563
-          are, or that Your use of the Licensed Material is, connected
564
-          with, or sponsored, endorsed, or granted official status by,
565
-          the Licensor or others designated to receive attribution as
566
-          provided in Section 3(a)(1)(A)(i).
567
-
568
-  b. Other rights.
569
-
570
-       1. Moral rights, such as the right of integrity, are not
571
-          licensed under this Public License, nor are publicity,
572
-          privacy, and/or other similar personality rights; however, to
573
-          the extent possible, the Licensor waives and/or agrees not to
574
-          assert any such rights held by the Licensor to the limited
575
-          extent necessary to allow You to exercise the Licensed
576
-          Rights, but not otherwise.
577
-
578
-       2. Patent and trademark rights are not licensed under this
579
-          Public License.
580
-
581
-       3. To the extent possible, the Licensor waives any right to
582
-          collect royalties from You for the exercise of the Licensed
583
-          Rights, whether directly or through a collecting society
584
-          under any voluntary or waivable statutory or compulsory
585
-          licensing scheme. In all other cases the Licensor expressly
586
-          reserves any right to collect such royalties.
587
-
588
-
589
-Section 3 -- License Conditions.
590
-
591
-Your exercise of the Licensed Rights is expressly made subject to the
592
-following conditions.
593
-
594
-  a. Attribution.
595
-
596
-       1. If You Share the Licensed Material (including in modified
597
-          form), You must:
598
-
599
-            a. retain the following if it is supplied by the Licensor
600
-               with the Licensed Material:
601
-
602
-                 i. identification of the creator(s) of the Licensed
603
-                    Material and any others designated to receive
604
-                    attribution, in any reasonable manner requested by
605
-                    the Licensor (including by pseudonym if
606
-                    designated);
607
-
608
-                ii. a copyright notice;
609
-
610
-               iii. a notice that refers to this Public License;
611
-
612
-                iv. a notice that refers to the disclaimer of
613
-                    warranties;
614
-
615
-                 v. a URI or hyperlink to the Licensed Material to the
616
-                    extent reasonably practicable;
617
-
618
-            b. indicate if You modified the Licensed Material and
619
-               retain an indication of any previous modifications; and
620
-
621
-            c. indicate the Licensed Material is licensed under this
622
-               Public License, and include the text of, or the URI or
623
-               hyperlink to, this Public License.
624
-
625
-       2. You may satisfy the conditions in Section 3(a)(1) in any
626
-          reasonable manner based on the medium, means, and context in
627
-          which You Share the Licensed Material. For example, it may be
628
-          reasonable to satisfy the conditions by providing a URI or
629
-          hyperlink to a resource that includes the required
630
-          information.
631
-
632
-       3. If requested by the Licensor, You must remove any of the
633
-          information required by Section 3(a)(1)(A) to the extent
634
-          reasonably practicable.
635
-
636
-  b. ShareAlike.
637
-
638
-     In addition to the conditions in Section 3(a), if You Share
639
-     Adapted Material You produce, the following conditions also apply.
640
-
641
-       1. The Adapter's License You apply must be a Creative Commons
642
-          license with the same License Elements, this version or
643
-          later, or a BY-SA Compatible License.
644
-
645
-       2. You must include the text of, or the URI or hyperlink to, the
646
-          Adapter's License You apply. You may satisfy this condition
647
-          in any reasonable manner based on the medium, means, and
648
-          context in which You Share Adapted Material.
649
-
650
-       3. You may not offer or impose any additional or different terms
651
-          or conditions on, or apply any Effective Technological
652
-          Measures to, Adapted Material that restrict exercise of the
653
-          rights granted under the Adapter's License You apply.
654
-
655
-
656
-Section 4 -- Sui Generis Database Rights.
657
-
658
-Where the Licensed Rights include Sui Generis Database Rights that
659
-apply to Your use of the Licensed Material:
660
-
661
-  a. for the avoidance of doubt, Section 2(a)(1) grants You the right
662
-     to extract, reuse, reproduce, and Share all or a substantial
663
-     portion of the contents of the database;
664
-
665
-  b. if You include all or a substantial portion of the database
666
-     contents in a database in which You have Sui Generis Database
667
-     Rights, then the database in which You have Sui Generis Database
668
-     Rights (but not its individual contents) is Adapted Material,
669
-
670
-     including for purposes of Section 3(b); and
671
-  c. You must comply with the conditions in Section 3(a) if You Share
672
-     all or a substantial portion of the contents of the database.
673
-
674
-For the avoidance of doubt, this Section 4 supplements and does not
675
-replace Your obligations under this Public License where the Licensed
676
-Rights include other Copyright and Similar Rights.
677
-
678
-
679
-Section 5 -- Disclaimer of Warranties and Limitation of Liability.
680
-
681
-  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
682
-     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
683
-     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
684
-     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
685
-     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
686
-     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
687
-     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
688
-     ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
689
-     KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
690
-     ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
691
-
692
-  b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
693
-     TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
694
-     NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
695
-     INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
696
-     COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
697
-     USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
698
-     ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
699
-     DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
700
-     IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
701
-
702
-  c. The disclaimer of warranties and limitation of liability provided
703
-     above shall be interpreted in a manner that, to the extent
704
-     possible, most closely approximates an absolute disclaimer and
705
-     waiver of all liability.
706
-
707
-
708
-Section 6 -- Term and Termination.
709
-
710
-  a. This Public License applies for the term of the Copyright and
711
-     Similar Rights licensed here. However, if You fail to comply with
712
-     this Public License, then Your rights under this Public License
713
-     terminate automatically.
714
-
715
-  b. Where Your right to use the Licensed Material has terminated under
716
-     Section 6(a), it reinstates:
717
-
718
-       1. automatically as of the date the violation is cured, provided
719
-          it is cured within 30 days of Your discovery of the
720
-          violation; or
721
-
722
-       2. upon express reinstatement by the Licensor.
723
-
724
-     For the avoidance of doubt, this Section 6(b) does not affect any
725
-     right the Licensor may have to seek remedies for Your violations
726
-     of this Public License.
727
-
728
-  c. For the avoidance of doubt, the Licensor may also offer the
729
-     Licensed Material under separate terms or conditions or stop
730
-     distributing the Licensed Material at any time; however, doing so
731
-     will not terminate this Public License.
732
-
733
-  d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
734
-     License.
735
-
736
-
737
-Section 7 -- Other Terms and Conditions.
738
-
739
-  a. The Licensor shall not be bound by any additional or different
740
-     terms or conditions communicated by You unless expressly agreed.
741
-
742
-  b. Any arrangements, understandings, or agreements regarding the
743
-     Licensed Material not stated herein are separate from and
744
-     independent of the terms and conditions of this Public License.
745
-
746
-
747
-Section 8 -- Interpretation.
748
-
749
-  a. For the avoidance of doubt, this Public License does not, and
750
-     shall not be interpreted to, reduce, limit, restrict, or impose
751
-     conditions on any use of the Licensed Material that could lawfully
752
-     be made without permission under this Public License.
753
-
754
-  b. To the extent possible, if any provision of this Public License is
755
-     deemed unenforceable, it shall be automatically reformed to the
756
-     minimum extent necessary to make it enforceable. If the provision
757
-     cannot be reformed, it shall be severed from this Public License
758
-     without affecting the enforceability of the remaining terms and
759
-     conditions.
760
-
761
-  c. No term or condition of this Public License will be waived and no
762
-     failure to comply consented to unless expressly agreed to by the
763
-     Licensor.
764
-
765
-  d. Nothing in this Public License constitutes or may be interpreted
766
-     as a limitation upon, or waiver of, any privileges and immunities
767
-     that apply to the Licensor or You, including from the legal
768
-     processes of any jurisdiction or authority.
769
-
770
-
771
-=======================================================================
772
-
773
-Creative Commons is not a party to its public
774
-licenses. Notwithstanding, Creative Commons may elect to apply one of
775
-its public licenses to material it publishes and in those instances
776
-will be considered the “Licensor.” The text of the Creative Commons
777
-public licenses is dedicated to the public domain under the CC0 Public
778
-Domain Dedication. Except for the limited purpose of indicating that
779
-material is shared under a Creative Commons public license or as
780
-otherwise permitted by the Creative Commons policies published at
781
-creativecommons.org/policies, Creative Commons does not authorize the
782
-use of the trademark "Creative Commons" or any other trademark or logo
783
-of Creative Commons without its prior written consent including,
784
-without limitation, in connection with any unauthorized modifications
785
-to any of its public licenses or any other arrangements,
786
-understandings, or agreements concerning use of licensed material. For
787
-the avoidance of doubt, this paragraph does not form part of the
788
-public licenses.
789
-
790
-Creative Commons may be contacted at creativecommons.org.
791
-
360
+License](https://www.gnu.org/licenses/lgpl.html) instead of this
361
+License.

+ 28
- 13
Makefile.in View File

@@ -21,6 +21,7 @@ build=@build@
21 21
 srcdir=@srcdir@
22 22
 abs_srcdir=@abs_srcdir@
23 23
 GNATMAKE=@GNATMAKE@
24
+MAKE=@MAKE@
24 25
 prefix=@prefix@
25 26
 backend=@backend@
26 27
 libdirsuffix=@libdirsuffix@
@@ -34,9 +35,12 @@ LDFLAGS=@LDFLAGS@
34 35
 LIBBACKTRACE=@backtrace_lib@
35 36
 llvm_be=@llvm_be@
36 37
 build_mode=@build_mode@
38
+ghdl_version=@ghdl_version@
39
+libghdl_version=@libghdl_version@
37 40
 enable_werror=@enable_werror@
38 41
 enable_checks=@enable_checks@
39 42
 enable_openieee=@enable_openieee@
43
+enable_python=@enable_python@
40 44
 
41 45
 INSTALL_PROGRAM=install -m 755
42 46
 INSTALL_DATA=install -m 644
@@ -113,7 +117,7 @@ LIBVHDL_FLAGS_TO_PASS=\
113 117
  enable_openieee="$(enable_openieee)" \
114 118
  LN="$(LN)" CP="$(CP)" MKDIR="$(MKDIR)"
115 119
 
116
-all: Makefile all.$(backend)
120
+all: Makefile all.$(backend) all.libghdl.$(enable_python)
117 121
 
118 122
 install: install.$(backend)
119 123
 
@@ -144,10 +148,11 @@ version.tmp: $(srcdir)/src/version.in force
144 148
 #	Create version.tmp from version.in, using git date/hash
145 149
 	if test -d $(srcdir)/.git \
146 150
 	   && desc=`cd $(srcdir); git describe --dirty`; then \
147
-	  $(SED) -e "s/[(].*[)]/($$desc)/" < $< > $@; \
151
+          sub="s/[(].*[)]/($$desc)/"; \
148 152
 	else \
149
-	  $(CP) $< $@; \
150
-	fi
153
+	  sub="s/tarball/tarball/"; \
154
+        fi; \
155
+	$(SED) -e "$$sub" -e "s/@VER@/$(ghdl_version)/" < $< > $@; \
151 156
 
152 157
 version.ads: version.tmp
153 158
 #	Change version.ads only if version.tmp has been modified to avoid
@@ -187,10 +192,10 @@ gcc_vhdl_dir=$(gcc_src_dir)/gcc/vhdl
187 192
 
188 193
 all.gcc:
189 194
 	@echo "For installing sources in gcc, do:"
190
-	@echo "1) make copy-sources"
195
+	@echo "1) $(MAKE) copy-sources"
191 196
 	@echo "2) configure, build and install gcc"
192
-	@echo "3) make ghdllib"
193
-	@echo "4) make install"
197
+	@echo "3) $(MAKE) ghdllib"
198
+	@echo "4) $(MAKE) install"
194 199
 
195 200
 copy-sources.gcc: version.ads
196 201
 	$(RM) -rf $(gcc_vhdl_dir)
@@ -325,7 +330,7 @@ ghdl_simul$(EXEEXT): $(GRT_ADD_OBJS) $(GRT_SRC_DEPS) version.ads force
325 330
 libs.vhdl.simul: ghdl_simul$(EXEEXT)
326 331
 	$(MAKE) -f $(srcdir)/libraries/Makefile.inc $(LIBVHDL_FLAGS_TO_PASS) GHDL=$(PWD)/ghdl_simul$(EXEEXT) GHDL_FLAGS="" VHDLLIBS_COPY_OBJS=no vhdl.libs.all
327 332
 
328
-install.simul.program: install.dirs ghdl_simul(EXEEXT)
333
+install.simul.program: install.dirs ghdl_simul$(EXEEXT)
329 334
 	$(INSTALL_PROGRAM) ghdl_simul$(EXEEXT) $(DESTDIR)$(bindir)/ghdl$(EXEEXT)
330 335
 
331 336
 install.simul: install.simul.program install.vhdllib
@@ -335,9 +340,14 @@ install.simul: install.simul.program install.vhdllib
335 340
 
336 341
 LIBGHDL_INCFLAGS=$(GHDL_COMMON_INCFLAGS) -aI$(srcdir)/src/vhdl/python -aI$(srcdir)/src/ghdldrv
337 342
 
338
-libghdl$(SOEXT): $(GRT_SRC_DEPS) version.ads force
343
+libghdl_name=libghdl-$(libghdl_version)$(SOEXT)
344
+
345
+$(libghdl_name): $(GRT_SRC_DEPS) version.ads force
339 346
 	$(GNATMAKE) -I- -aI. -D pic -z libghdl -o $@ $(GNATFLAGS) $(PIC_FLAGS) -gnat05 $(LIBGHDL_INCFLAGS) -bargs -shared -Llibghdl_ -largs -shared $(SHLIB_FLAGS)
340 347
 
348
+all.libghdl.true: $(libghdl_name)
349
+all.libghdl.false:
350
+
341 351
 ################ ghdlsynth library ######################################
342 352
 
343 353
 GHDL_SYNTHLIB_INCFLAGS=$(GHDL_COMMON_INCFLAGS) -aI$(srcdir)/src/synth -aI$(srcdir)/src/ghdldrv -aI$(srcdir)/src/vhdl/simulate
@@ -404,19 +414,24 @@ install.vpi: all.vpi install.dirs
404 414
 	$(INSTALL_DATA) -p libghdlvpi$(SOEXT) $(DESTDIR)$(libdir)/
405 415
 	$(INSTALL_DATA) -p $(GRTSRCDIR)/vpi_user.h $(DESTDIR)$(incdir)/
406 416
 
417
+install.vpi.local: all.vpi
418
+	$(MKDIR) -p include lib
419
+	$(INSTALL_DATA) -p $(GRTSRCDIR)/vpi_user.h include/
420
+	$(INSTALL_DATA) -p libghdlvpi$(SOEXT) lib/
421
+
407 422
 ################ Libraries ###############################################
408 423
 
409 424
 LIBSRC_DIR:=$(srcdir)/libraries
410 425
 LIBDST_DIR:=$(libdirsuffix)
411 426
 
412 427
 VHDLLIB_SUBDIRS_COMMON= src/std src/synopsys src/openieee \
413
-  v87/std v87/ieee v87/synopsys \
414
-  v93/std v93/ieee v93/synopsys \
415
-  v08/std
428
+  std/v87 ieee/v87 synopsys/v87 \
429
+  std/v93 ieee/v93 synopsys/v93 \
430
+  std/v08
416 431
 
417 432
 VHDLLIB_SUBDIRS_FULL= src/ieee src/vital95 src/vital2000 src/mentor \
418 433
   src/ieee2008 \
419
-  v93/mentor v08/ieee v08/synopsys
434
+  mentor/v93 ieee/v08 synopsys/v08
420 435
 
421 436
 ifeq ($(enable_openieee),false)
422 437
 VHDLLIB_SUBDIRS=$(VHDLLIB_SUBDIRS_COMMON) $(VHDLLIB_SUBDIRS_FULL)

+ 4
- 1
NEWS.md View File

@@ -1,4 +1,7 @@
1
-**0.35** (2017-12-XX)
1
+**0.36-dev** (XXXX-XX-XX)
2
+- A new GitHub organization is created and the main repo is moved from [github.com/tgingold/ghdl](https://github.com/tgingold/ghdl) to [github.com/ghdl/ghdl](https://github.com/ghdl/ghdl). Old refs will continue working, because permanent redirects are set up. However, we suggest every contributor to update the remote URLs in their local clones.
3
+
4
+**0.35** (2017-12-14)
2 5
 - Assert and report messages are sent to stdout (#394)
3 6
 - Improve support for unbounded records
4 7
 - Bugs fixed

+ 10
- 7
README.md View File

@@ -1,9 +1,12 @@
1
-[![Documentation Status](https://readthedocs.org/projects/ghdl/badge/?version=latest)](http://ghdl.readthedocs.io) [![Join the chat at https://gitter.im/ghdl1/Lobby](https://img.shields.io/gitter/room/ghdl1/Lobby.svg?colorB=4cb696)](https://gitter.im/ghdl1/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![GNU General Public License 2](https://img.shields.io/badge/code%20license-GPLv2-bd0000.svg?style=flat)](https://github.com/tgingold/ghdl/blob/master/COPYING.md) [![Creative Commons Attribution-ShareAlike](https://img.shields.io/badge/doc%20license-CC--BY--SA--4.0-aab2ab.svg?style=flat)](https://github.com/tgingold/ghdl/blob/master/COPYING.md)
2
-[![Linux containers at Travis-CI](https://img.shields.io/travis/tgingold/ghdl/master.svg?style=flat&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAIP0lEQVR42qVXaUyUWRaFycyP%2BTVLemaSSfrPJN3JZJKOPyY6uBLTQgGlUMVeFHuxFaioKGpcAFFQUaOigAsmo7ghikZtxZVFCCKgqOi4ICoqqLjghqjcOeem%2B5sQFZnuL3l5VV%2B9d%2B9595577iuX%2F%2FcZNWrUX7y8vMyJiYmbpk6d2pKamto5bdq0LnxuT05OPhgUFOQcOXLkP35a7%2Bvr6%2FKLnmXLlun87t27X02YMKFkzpw5va2trXL37l158OCBPHz4UEdXV5fcu3dPbt26Jdu3b%2B%2Fz8%2FNrM5vNf%2BNeAPxlIHAi06xZs7rOnj0rL168kPb2dnn8%2BLE8evToo0EgHPfv35e1a9cKQOT9LKc2m03nyMhIv%2FXr18uzZ8%2F0pDU1NXLz5k0xTzSLycs0cHibBClhBOTJkycKqKmpSZCyGkTv10N27unpqfPw4cNDSkpK5OrVqzSmAHbu3CnXr1%2BXhIQECQkNkeCQYHEkxAPQRHEmJ0taWposWbJEOjs7dX1bW5s0NjYyEtW0OXny5KGBMJlMf1ixYsUHOqYRGmPYi4qK5PLly5KUlCSLFi0S5FqCAaSutk6io6MlMzNTtmzZIkwX9zASdXV10tLSQhALaRtEHdy5iLhYrdbbP53gxo0baqy7u1tWrlxJAErA7sfdYrFYNBINZxv0XUdHh5SXl8uhQ4eMPbW1tfqZqQwODv7rF0%2F%2FPZ6GhoZ%2B5v3AgQNKqqdPnyoBly9fztMxJeSFAeDcuXN8p9Wxf%2F9%2BBfH8%2BXMFcP78eSMlWN%2F8SafDhg0zPqOmG2%2Ffvi137tzRkF%2B6dEny8vLE399fUA1y%2BvRpGtMT%2B1n8JMQWKhUVFQTKiKlzkE7XHjlyRJqbm7lWI3n06NG%2B0aNHfzvAOVDq7Obm9mcIzIbS0lK5cuWKVFVVyerVq2Xv3r2aw5kzZ0pubq6cOnWKNa8njYyKlKRkpyBlPL2yPiUlhfzQVJ04cUI2bdrE1CmI%2Bvp6Wbp06bkRI0ZYBoAA4u9JIIAxGL9jxw5GgeRjCjT8GzdulM2bN2s5btu2TcJsNgmz2yU8IkIBHz58WIm4atUq6enpoS21iagyJbTL1BEYQe8zALi7u%2BdiAxcYg8iZd4a2srJST%2B9wOMTb25tk0gqYiPLjmDRpkkYhJCRE4uPjBeUmBw8e1JJ9%2Ffo108GDGLYJJjw8XAwAY8eOzedLIuZCkoY1Tzbv2rVLEV%2B4cIE5NpSOPCHrORh%2BpoX7GDVqx5kzZ2Tfvn2yZ88eVUVKOG1zMAoRiJoBADnJpEHmiMTh5prqaimHgeLiYs2p0%2BkkETUCXt5eUD8dVDod0A7OjIhGYcGCBVJQUCBlZWVMD21yZjQ1Aj4%2BPv8DMGbMmDCemDJKR%2BPGjRNfhNgeES7hkREML0tIAfiYzWK3h6kA2TBjPUNMkPjdKgmJiRIHdXTEIV0%2B3poWdEqBrGvYs7Oz5dixY0zhfwwAULGvwsLCVMvt4XaJdcRKQlIinahTdEE60FxDyQDOl1Whsrt48WI1Ghpqkxjso3OSkpGaN2%2Be5OfnGwNiRBUlSQnMNqAScEpvi9UiMbGxgj4uqFcl2ty5c2XGjBn6vbCwkGlibbM0WWpaEdAurX0eonhLMbmjJM7JyWFZ0h4JrLYCAwM%2FIJpRsOPqAlTqHPX%2FDXKHU4T2BAYFfsAirQA%2B1HNupNo1NTeR1RzqnJrBCGVkZGiX5MO%2BsBm86evrE9wjpL%2B%2Fn6%2B1R0yfPp0cqfxICRGuDoweEKkxJiaGZaSsfvnypTK8EyLCfK4tLEClPKQ9rqFCsu45U%2FO19gODgmXm7NkQsDICpQ0dGzZsoLBRP%2FrHjx%2F%2Fb5gwnFeDkeunTJnye7J0zZo1zB1DrBtfvXql9ezp4SFubv8Ci09rmeGmQxAsNQWB2xMdajpGurmRI4Zz2KBdKiJ1gNVyLC4uztUFOR6NcJsJBMz%2FHUrwPRWQqnfy5EluplHKL0nIk%2FIdDWl%2Bjx8%2FLu%2Ffv9eajgV33rx5w9Qoy69du8Zy43qt%2B6ysLA7VDcj%2BVj09yuMbzgDBLvhb3AHuV1ZWybp168h8CpPm8O3bt4IOSSlWIwsXLmQFkB%2FMNVlNpSQXWBX8TcO9detW2b17t8yfP5%2BVwshSrlnmjoEXTwWT4moyeda0tl6mkGhIESYC4elY6zCcg%2Fe5MDhPAJZEZYSUgLORd4Cjc%2B4FoBxGjaCQogyWMEVIbYP0f%2FzMXWD8KKvV8i4gIOA8ygcLEzhQQrEwvBgdsBzt%2BSLCeJcRYYulLCvDS3eXwvFSSO4lKF4l0lCB0%2B9CNPORqgpwIq3Fw8PDirT%2F8xOuSUbTgO%2FZ2Yva6uvr0GIb0UrvoSM%2B0ZGenk6RgSL6yAQQc5y7u5ghq%2F4BARJqs1ELlAe9vb1IUTd7B%2FZ3Qaq9nHDugVI3D3YdcwWzv0Y5uqI%2FpOMKTgYbTKYexMXHSaIz6bOD94OJCDfTwT7CywrbMWz24MLbi1R8DdJ%2B5NsQJSxIxeIqCExAVFRU%2B8WLF6WosEiNhIbZ6GRIIzo2WiIiI9gvMEeqPCMFJS6DPUQGyfwNkHZAlhnmtww3DTlTkj%2FliNrPvvHFqFihmC5DfXDyP1nQAZO%2BfFIoXxDb82cdE3gwOiLELuPHxje4c%2Bi1ziZPUzxuPjTyScMcDvCBf1IKCwpBQn90UYfEo2qiYqKVjAGBAc%2B9fXxqQdL0H1V3aBFAGeqMlpnKjmgQD62UTtiy%2FSwWtmYqm5IUXKFeMM%2FsomV2u%2F3vtAEuufysByfgRJX8DshTPU2mPPy7yQBBYzGWgC%2FVkOSXWVmZZHwnSPoD%2FlOmodXSsWFjsOe%2FCAcrQqMD2awAAAAASUVORK5CYII%3D)](https://travis-ci.org/tgingold/ghdl) [![Windows VMs at AppVeyor](https://ci.appveyor.com/api/projects/status/rsq60m5wcly3og8j?svg=true)](https://ci.appveyor.com/project/tgingold/ghdl) [![Commits since latest release](https://img.shields.io/github/commits-since/tgingold/ghdl/latest.svg?style=flat)](https://github.com/tgingold/ghdl/releases)
1
+[![Documentation Status](https://readthedocs.org/projects/ghdl/badge/?version=latest)](http://ghdl.readthedocs.io) [![Join the chat at https://gitter.im/ghdl1/Lobby](https://img.shields.io/gitter/room/ghdl1/Lobby.svg?colorB=4cb696)](https://gitter.im/ghdl1/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![GNU General Public License 2](https://img.shields.io/badge/code%20license-GPLv2-bd0000.svg?style=flat)](https://github.com/ghdl/ghdl/blob/master/COPYING.md) [![Creative Commons Attribution-ShareAlike](https://img.shields.io/badge/doc%20license-CC--BY--SA--4.0-aab2ab.svg?style=flat)](https://github.com/ghdl/ghdl/blob/master/doc/COPYING_DOC.md)
2
+[![Linux containers at Travis-CI](https://img.shields.io/travis/ghdl/ghdl/master.svg?style=flat&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAIP0lEQVR42qVXaUyUWRaFycyP%2BTVLemaSSfrPJN3JZJKOPyY6uBLTQgGlUMVeFHuxFaioKGpcAFFQUaOigAsmo7ghikZtxZVFCCKgqOi4ICoqqLjghqjcOeem%2B5sQFZnuL3l5VV%2B9d%2B9595577iuX%2F%2FcZNWrUX7y8vMyJiYmbpk6d2pKamto5bdq0LnxuT05OPhgUFOQcOXLkP35a7%2Bvr6%2FKLnmXLlun87t27X02YMKFkzpw5va2trXL37l158OCBPHz4UEdXV5fcu3dPbt26Jdu3b%2B%2Fz8%2FNrM5vNf%2BNeAPxlIHAi06xZs7rOnj0rL168kPb2dnn8%2BLE8evToo0EgHPfv35e1a9cKQOT9LKc2m03nyMhIv%2FXr18uzZ8%2F0pDU1NXLz5k0xTzSLycs0cHibBClhBOTJkycKqKmpSZCyGkTv10N27unpqfPw4cNDSkpK5OrVqzSmAHbu3CnXr1%2BXhIQECQkNkeCQYHEkxAPQRHEmJ0taWposWbJEOjs7dX1bW5s0NjYyEtW0OXny5KGBMJlMf1ixYsUHOqYRGmPYi4qK5PLly5KUlCSLFi0S5FqCAaSutk6io6MlMzNTtmzZIkwX9zASdXV10tLSQhALaRtEHdy5iLhYrdbbP53gxo0baqy7u1tWrlxJAErA7sfdYrFYNBINZxv0XUdHh5SXl8uhQ4eMPbW1tfqZqQwODv7rF0%2F%2FPZ6GhoZ%2B5v3AgQNKqqdPnyoBly9fztMxJeSFAeDcuXN8p9Wxf%2F9%2BBfH8%2BXMFcP78eSMlWN%2F8SafDhg0zPqOmG2%2Ffvi137tzRkF%2B6dEny8vLE399fUA1y%2BvRpGtMT%2B1n8JMQWKhUVFQTKiKlzkE7XHjlyRJqbm7lWI3n06NG%2B0aNHfzvAOVDq7Obm9mcIzIbS0lK5cuWKVFVVyerVq2Xv3r2aw5kzZ0pubq6cOnWKNa8njYyKlKRkpyBlPL2yPiUlhfzQVJ04cUI2bdrE1CmI%2Bvp6Wbp06bkRI0ZYBoAA4u9JIIAxGL9jxw5GgeRjCjT8GzdulM2bN2s5btu2TcJsNgmz2yU8IkIBHz58WIm4atUq6enpoS21iagyJbTL1BEYQe8zALi7u%2BdiAxcYg8iZd4a2srJST%2B9wOMTb25tk0gqYiPLjmDRpkkYhJCRE4uPjBeUmBw8e1JJ9%2Ffo108GDGLYJJjw8XAwAY8eOzedLIuZCkoY1Tzbv2rVLEV%2B4cIE5NpSOPCHrORh%2BpoX7GDVqx5kzZ2Tfvn2yZ88eVUVKOG1zMAoRiJoBADnJpEHmiMTh5prqaimHgeLiYs2p0%2BkkETUCXt5eUD8dVDod0A7OjIhGYcGCBVJQUCBlZWVMD21yZjQ1Aj4%2BPv8DMGbMmDCemDJKR%2BPGjRNfhNgeES7hkREML0tIAfiYzWK3h6kA2TBjPUNMkPjdKgmJiRIHdXTEIV0%2B3poWdEqBrGvYs7Oz5dixY0zhfwwAULGvwsLCVMvt4XaJdcRKQlIinahTdEE60FxDyQDOl1Whsrt48WI1Ghpqkxjso3OSkpGaN2%2Be5OfnGwNiRBUlSQnMNqAScEpvi9UiMbGxgj4uqFcl2ty5c2XGjBn6vbCwkGlibbM0WWpaEdAurX0eonhLMbmjJM7JyWFZ0h4JrLYCAwM%2FIJpRsOPqAlTqHPX%2FDXKHU4T2BAYFfsAirQA%2B1HNupNo1NTeR1RzqnJrBCGVkZGiX5MO%2BsBm86evrE9wjpL%2B%2Fn6%2B1R0yfPp0cqfxICRGuDoweEKkxJiaGZaSsfvnypTK8EyLCfK4tLEClPKQ9rqFCsu45U%2FO19gODgmXm7NkQsDICpQ0dGzZsoLBRP%2FrHjx%2F%2Fb5gwnFeDkeunTJnye7J0zZo1zB1DrBtfvXql9ezp4SFubv8Ci09rmeGmQxAsNQWB2xMdajpGurmRI4Zz2KBdKiJ1gNVyLC4uztUFOR6NcJsJBMz%2FHUrwPRWQqnfy5EluplHKL0nIk%2FIdDWl%2Bjx8%2FLu%2Ffv9eajgV33rx5w9Qoy69du8Zy43qt%2B6ysLA7VDcj%2BVj09yuMbzgDBLvhb3AHuV1ZWybp168h8CpPm8O3bt4IOSSlWIwsXLmQFkB%2FMNVlNpSQXWBX8TcO9detW2b17t8yfP5%2BVwshSrlnmjoEXTwWT4moyeda0tl6mkGhIESYC4elY6zCcg%2Fe5MDhPAJZEZYSUgLORd4Cjc%2B4FoBxGjaCQogyWMEVIbYP0f%2FzMXWD8KKvV8i4gIOA8ygcLEzhQQrEwvBgdsBzt%2BSLCeJcRYYulLCvDS3eXwvFSSO4lKF4l0lCB0%2B9CNPORqgpwIq3Fw8PDirT%2F8xOuSUbTgO%2FZ2Yva6uvr0GIb0UrvoSM%2B0ZGenk6RgSL6yAQQc5y7u5ghq%2F4BARJqs1ELlAe9vb1IUTd7B%2FZ3Qaq9nHDugVI3D3YdcwWzv0Y5uqI%2FpOMKTgYbTKYexMXHSaIz6bOD94OJCDfTwT7CywrbMWz24MLbi1R8DdJ%2B5NsQJSxIxeIqCExAVFRU%2B8WLF6WosEiNhIbZ6GRIIzo2WiIiI9gvMEeqPCMFJS6DPUQGyfwNkHZAlhnmtww3DTlTkj%2FliNrPvvHFqFihmC5DfXDyP1nQAZO%2BfFIoXxDb82cdE3gwOiLELuPHxje4c%2Bi1ziZPUzxuPjTyScMcDvCBf1IKCwpBQn90UYfEo2qiYqKVjAGBAc%2B9fXxqQdL0H1V3aBFAGeqMlpnKjmgQD62UTtiy%2FSwWtmYqm5IUXKFeMM%2FsomV2u%2F3vtAEuufysByfgRJX8DshTPU2mPPy7yQBBYzGWgC%2FVkOSXWVmZZHwnSPoD%2FlOmodXSsWFjsOe%2FCAcrQqMD2awAAAAASUVORK5CYII%3D)](https://travis-ci.org/ghdl/ghdl) [![Windows VMs at AppVeyor](https://ci.appveyor.com/api/projects/status/7hx4kfbhidv06sin?svg=true)](https://ci.appveyor.com/project/tgingold/ghdl-psgys) [![Commits since latest release](https://img.shields.io/github/commits-since/ghdl/ghdl/latest.svg?style=flat)](https://github.com/ghdl/ghdl/releases)
3
+
4
+**A new GitHub organization was created (2017-12-20) and the main repo was moved from [github.com/tgingold/ghdl](https://github.com/tgingold/ghdl) to [github.com/ghdl/ghdl](https://github.com/ghdl/ghdl). Old refs will continue working, because permanent redirects are set up. However, we suggest every contributor to update the remote URLs in their local clones. See
5
+[Changing a remote's URL](https://help.github.com/articles/changing-a-remote-s-url/).**
3 6
 
4 7
 # GHDL
5 8
 
6
-This directory contains the sources of GHDL, the open-source compilator and simulator for [VHDL](https://en.wikipedia.org/wiki/VHDL), a Hardware Description Language ([HDL](https://en.wikipedia.org/wiki/Hardware_description_language)). GHDL is not an interpreter: it allows you to analyse and elaborate sources to generate machine code from your design. Native program execution is the only way for high speed simulation.
9
+This directory contains the sources of GHDL, the open-source compiler and simulator for [VHDL](https://en.wikipedia.org/wiki/VHDL), a Hardware Description Language ([HDL](https://en.wikipedia.org/wiki/Hardware_description_language)). GHDL is not an interpreter: it allows you to analyse and elaborate sources to generate machine code from your design. Native program execution is the only way for high speed simulation.
7 10
 
8 11
 ## Main features
9 12
 
@@ -21,21 +24,21 @@ Supported third party projects: [VUnit](https://vunit.github.io), [OSVVM](http:/
21 24
 
22 25
 GHDL is free software:
23 26
 
24
-- [![GNU General Public License 2](https://img.shields.io/badge/code%20license-GPLv2-bd0000.svg?style=flat)](https://github.com/tgingold/ghdl/blob/master/COPYING.md)
25
-- [![Creative Commons Attribution-ShareAlike 4.0](https://img.shields.io/badge/doc%20license-Creative%20Commons%20Attribution--ShareAlike--4.0-aab2ab.svg?style=flat)](https://github.com/tgingold/ghdl/blob/master/COPYING.md) available at [![ghdl.readthedocs.io](https://img.shields.io/badge/ghdl-.readthedocs.io-2980b9.svg?style=flat)](https://ghdl.readthedocs.io)
27
+- [![GNU General Public License 2](https://img.shields.io/badge/code%20license-GPLv2-bd0000.svg?style=flat)](https://github.com/ghdl/ghdl/blob/master/COPYING.md)
28
+- [![Creative Commons Attribution-ShareAlike 4.0](https://img.shields.io/badge/doc%20license-Creative%20Commons%20Attribution--ShareAlike--4.0-aab2ab.svg?style=flat)](https://github.com/ghdl/ghdl/blob/master/doc/COPYING_DOC.md) available at [![ghdl.readthedocs.io](https://img.shields.io/badge/ghdl-.readthedocs.io-2980b9.svg?style=flat)](https://ghdl.readthedocs.io)
26 29
 - Some of the runtime libraries, are under different terms; see the individual source files for details.
27 30
 
28 31
 ## Getting GHDL
29 32
 
30 33
 ### Pre-built releases
31 34
 
32
-Periodically (not regularly), several binary distributions are made available through the [releases](https://github.com/tgingold/ghdl/releases) tab. If you can't find the one matching the platform and versions you need, you can build it yourself!
35
+Periodically (not regularly), several binary distributions are made available through the [releases](https://github.com/ghdl/ghdl/releases) tab. If you can't find the one matching the platform and versions you need, you can build it yourself!
33 36
 
34 37
 ### Building GHDL
35 38
 
36 39
 In order to follow the traditional way to `configure` and `make`, you need the GNU Ada compiler, GNAT GPL, 2014 (or later) for x86 (32 or 64 bits). GNAT GPL can be downloaded anonymously from [libre.adacore.com](http://libre.adacore.com/tools/gnat-gpl-edition/). Then, untar and run the *doinstall* script.
37 40
 
38
-*Depending on the OS and distribution you are using, you will also need to install some toolchain dependencies, such as `zlib`. See '[Building](http://ghdl.readthedocs.io/en/latest/building/index.html)' for specific package names.*
41
+*Depending on the OS and distribution you are using, you will also need to install some toolchain dependencies, such as `zlib`. See '[Building](http://ghdl.readthedocs.io/en/latest/building/Building.html)' for specific package names.*
39 42
 
40 43
 In the GHDL base directory, configure and build:
41 44
 ```sh

+ 29
- 8
configure View File

@@ -3,11 +3,19 @@
3 3
 # configure script for ghdl (c) 2014 Tristan Gingold
4 4
 #
5 5
 
6
+# Current version.  This is the only place where the version is written.
7
+# Any code that needs version should read it directly or indirectly from this
8
+# place.
9
+# Note the absence of spaces and the quotes.
10
+# Suffix "-dev" is used during development.
11
+ghdl_version="0.36-dev"
12
+
6 13
 backend=mcode
7 14
 CC=${CC:-gcc}
8 15
 CXX=${CXX:-clang++}
9 16
 CFLAGS=${CFLAGS:--g}
10 17
 GNATMAKE=${GNATMAKE:-gnatmake}
18
+MAKE=${MAKE:-make}
11 19
 LDFLAGS=
12 20
 prefix=/usr/local
13 21
 libdirsuffix=lib/ghdl
@@ -21,6 +29,7 @@ build_mode=
21 29
 enable_werror=true
22 30
 enable_checks=true
23 31
 enable_openieee=unknown
32
+enable_python=false
24 33
 EXEEXT=
25 34
 SOEXT=.so
26 35
 PIC_FLAGS=-fPIC
@@ -28,7 +37,7 @@ PIC_FLAGS=-fPIC
28 37
 show_help=no
29 38
 progname=$0
30 39
 
31
-subst_vars="CC CXX GNATMAKE CFLAGS LDFLAGS build srcdir abs_srcdir prefix backend libdirsuffix libdirreverse gcc_src_dir llvm_config llvm_be backtrace_lib build_mode EXEEXT SOEXT PIC_FLAGS default_pie enable_werror enable_checks enable_openieee"
40
+subst_vars="CC CXX GNATMAKE MAKE CFLAGS LDFLAGS build srcdir abs_srcdir prefix backend libdirsuffix libdirreverse gcc_src_dir llvm_config llvm_be backtrace_lib build_mode EXEEXT SOEXT PIC_FLAGS default_pie enable_werror enable_checks enable_openieee enable_python libghdl_version ghdl_version"
32 41
 
33 42
 # Find srcdir
34 43
 srcdir=`dirname $progname`
@@ -79,6 +88,8 @@ for opt do
79 88
       --disable-checks) enable_checks=false;;
80 89
       --enable-openieee) enable_openieee=true;;
81 90
       --disable-openieee) enable_openieee=false;;
91
+      --enable-python) enable_python=true;;
92
+      --disable-python) enable_python=false;;
82 93
       --enable-coverage) build_mode="coverage";;
83 94
       -h|-help|--help) show_help=yes;;
84 95
       *) echo "$0: unknown option $opt; try $0 --help"
@@ -102,6 +113,7 @@ Options [defaults in brackets]:
102 113
   --disable-werror            warnings don't stop build
103 114
   --disable-checks            disable internal checks
104 115
   --enable-openieee           use gpl-compatible sources for ieee library
116
+  --enable-python             build python libghdl
105 117
 EOF
106 118
 exit 0
107 119
 fi
@@ -216,8 +228,10 @@ if test $backend = llvm; then
216 228
 	llvm_be=llvm-nodebug
217 229
 	# Tested with llvm 3.5, so assume 3.6, 3.7 and 3.8
218 230
     elif check_version 3.9 $llvm_version ||
219
-         check_version 4.0 $llvm_version ||
220
-         check_version 5.0 $llvm_version; then
231
+	 check_version 4.0 $llvm_version ||
232
+	 check_version 5.0 $llvm_version ||
233
+	 check_version 6.0 $llvm_version ||
234
+	 false; then
221 235
 	echo "Debugging is not enabled with llvm $llvm_version"
222 236
 	llvm_be=llvm4-nodebug
223 237
     else
@@ -240,6 +254,9 @@ case "$build" in
240 254
     *)        SOEXT=".so";    EXEEXT="";     PIC_FLAGS="-fPIC";;
241 255
 esac
242 256
 
257
+# Define libghdl_version
258
+libghdl_version=`echo $ghdl_version | sed -e 's/[-.]/_/g'`
259
+
243 260
 # Check if gcc was configured with --enable-default-pie.  In that case -fPIC
244 261
 # should be added.
245 262
 if gcc -v 2>&1 | grep -q enable-default-pie; then
@@ -280,10 +297,14 @@ for v in $subst_vars; do
280 297
     echo $v=\"$vval\"
281 298
 done
282 299
 sed_opts=`echo $subst_vars | sed -e "s/\\([a-zA-Z_]*\\)/ -e \"s%@\1@%\$\1%g\"/g"`
283
-echo 'echo "Creating ghdl.gpr"'
284
-echo sed $sed_opts '< $srcdir/ghdl.gpr.in > ghdl.gpr'
285
-echo 'echo "Creating Makefile"'
286
-echo sed $sed_opts '< $srcdir/Makefile.in > Makefile'
300
+subst_files="ghdl.gpr Makefile"
301
+if [ "$enable_python" = true ]; then
302
+    subst_files="$subst_files setup.py"
303
+fi
304
+echo "for f in $subst_files; do"
305
+echo '  echo "Creating $f"'
306
+echo "  sed $sed_opts" '< $srcdir/${f}.in > $f'
307
+echo "done"
287 308
 } > config.status || \
288 309
 {
289 310
   echo "$progname: cannot create config.status"
@@ -299,7 +320,7 @@ if ! sh ./config.status; then
299 320
 fi
300 321
 
301 322
 # Create dirs
302
-make create-dirs
323
+$MAKE create-dirs
303 324
 
304 325
 # Generate ortho_code-x86-flags
305 326
 if test $backend = mcode; then

+ 144
- 0
dist/linux/build.sh View File

@@ -0,0 +1,144 @@
1
+#! /bin/bash
2
+
3
+. dist/linux/travis-utils.sh
4
+. dist/ansi_color.sh
5
+disable_color
6
+
7
+echo "$0" "$@"
8
+
9
+# Stop in case of error
10
+set -e
11
+
12
+# Transform long options to short ones
13
+for arg in "$@"; do
14
+  shift
15
+  case "$arg" in
16
+      "--color"|"-color")   set -- "$@" "-c";;
17
+      "--build"|"-build")   set -- "$@" "-b";;
18
+      "--pkg"|"-pkg")       set -- "$@" "-p";;
19
+      "--gpl"|"-gpl")       set -- "$@" "-g";;
20
+    *) set -- "$@" "$arg"
21
+  esac
22
+done
23
+# Parse args
24
+while getopts ":b:p:cg" opt; do
25
+  case $opt in
26
+    c) enable_color;;
27
+    b) BLD=$OPTARG ;;
28
+    p) PKG_NAME=$OPTARG;;
29
+    g) ISGPL=true;;
30
+    \?) printf "$ANSI_RED[GHDL - build] Invalid option: -$OPTARG $ANSI_NOCOLOR\n" >&2
31
+	exit 1 ;;
32
+    :)  printf "$ANSI_RED[GHDL - build] Option -$OPTARG requires an argument. $ANSI_NOCOLOR\n" >&2
33
+	exit 1 ;;
34
+  esac
35
+done
36
+
37
+rm -f build_ok
38
+
39
+#--- Env
40
+
41
+echo "travis_fold:start:env.docker"
42
+printf "$ANSI_YELLOW[Info] Environment $ANSI_NOCOLOR\n"
43
+env
44
+echo "travis_fold:end:env.docker"
45
+
46
+#--- GPL: gpl-ize sources
47
+
48
+if [ "$ISGPL" = "true" ]; then
49
+    echo "travis_fold:start:gpl.src"
50
+    printf "$ANSI_YELLOW[Source] create GPL sources $ANSI_NOCOLOR\n"
51
+    files=`echo *`
52
+    make -f Makefile.in srcdir=. clean-pure-gpl
53
+    mkdir ${PKG_NAME}
54
+    cp -pdrl $files ${PKG_NAME}
55
+    tar -zcf "${PKG_NAME}.tar.gz" ${PKG_NAME}
56
+    PKG_NAME="${PKG_NAME}-${BLD}"
57
+    echo "travis_fold:end:gpl.src"
58
+fi
59
+
60
+#--- Configure
61
+
62
+echo "travis_fold:start:configure"
63
+printf "$ANSI_YELLOW[GHDL - build] Configure $ANSI_NOCOLOR\n"
64
+
65
+CDIR=$(pwd)
66
+export prefix="$CDIR/install-$BLD"
67
+mkdir "$prefix"
68
+mkdir "build-$BLD"
69
+cd "build-$BLD"
70
+
71
+case "$BLD" in
72
+    mcode)
73
+	      config_opts=""
74
+        CXX=""
75
+    ;;
76
+    llvm)
77
+	      CXX="clang"
78
+	      config_opts="--with-llvm-config CXX=$CXX"
79
+    ;;
80
+    llvm-3.5)
81
+	      CXX="clang++"
82
+	      config_opts="--with-llvm-config=llvm-config-3.5 CXX=$CXX"
83
+    ;;
84
+    llvm-3.8)
85
+	      CXX="clang++-3.8"
86
+	      config_opts="--with-llvm-config=llvm-config-3.8 CXX=$CXX"
87
+    ;;
88
+    llvm-3.9)
89
+	      CXX="clang++-3.9"
90
+	      config_opts="--with-llvm-config=llvm-config-3.9 CXX=$CXX"
91
+    ;;
92
+    llvm-4.0)
93
+	      CXX="clang++-4.0"
94
+	      config_opts="--with-llvm-config=llvm-config-4.0 CXX=$CXX"
95
+    ;;
96
+    llvm-5.0)
97
+	      CXX="clang++-5.0"
98
+	      config_opts="--with-llvm-config=llvm-config-5.0 CXX=$CXX"
99
+    ;;
100
+    *)
101
+	      echo "$ANSI_RED[GHDL - build] Unknown build $BLD $ANSI_NOCOLOR"
102
+	      exit 1;;
103
+esac
104
+echo "../configure --prefix=$prefix $config_opts"
105
+../configure "--prefix=$prefix" $config_opts
106
+echo "travis_fold:end:configure"
107
+
108
+#--- make
109
+
110
+echo "travis_fold:start:make"
111
+travis_time_start
112
+printf "$ANSI_YELLOW[GHDL - build] Make $ANSI_NOCOLOR\n"
113
+make
114
+travis_time_finish
115
+echo "travis_fold:end:make"
116
+
117
+echo "travis_fold:start:install"
118
+printf "$ANSI_YELLOW[GHDL - build] Install $ANSI_NOCOLOR\n"
119
+make install
120
+cd ..
121
+echo "travis_fold:end:install"
122
+
123
+#--- package
124
+
125
+echo "travis_fold:start:tar.bin"
126
+printf "$ANSI_YELLOW[GHDL - build] Create package ${ANSI_DARKCYAN}${PKG_NAME}.tgz $ANSI_NOCOLOR\n"
127
+tar -zcvf "${PKG_NAME}.tgz" -C "$prefix" .
128
+echo "travis_fold:end:tar.bin"
129
+
130
+#--- build tools versions
131
+
132
+{
133
+    make --version | grep 'Make'
134
+    gnatls --version | grep 'GNATLS'
135
+    gcc --version | grep 'gcc'
136
+    if [ "$CXX" != "" ]; then
137
+	$CXX --version | grep 'clang'
138
+    fi
139
+} > BUILD_TOOLS
140
+
141
+#---
142
+
143
+echo "[SUCCESSFUL]"
144
+touch build_ok

+ 0
- 193
dist/linux/buildtest.sh View File

@@ -1,193 +0,0 @@
1
-#! /bin/bash
2
-
3
-. dist/ansi_color.sh
4
-disable_color
5
-
6
-echo "$0" "$@"
7
-
8
-# Stop in case of error
9
-set -e
10
-
11
-. dist/linux/travis-utils.sh
12
-
13
-rm -f build_ok
14
-
15
-# Transform long options to short ones
16
-for arg in "$@"; do
17
-  shift
18
-  case "$arg" in
19
-      "--color"|"-color")   set -- "$@" "-c";;
20
-      "--build"|"-build")   set -- "$@" "-b";;
21
-      "--pkg"|"-pkg")       set -- "$@" "-p";;
22
-      "--gpl"|"-gpl")       set -- "$@" "-g";;
23
-    *) set -- "$@" "$arg"
24
-  esac
25
-done
26
-# Parse args
27
-while getopts ":b:p:cg" opt; do
28
-  case $opt in
29
-    c) enable_color;;
30
-    b) BLD=$OPTARG ;;
31
-    p) PKG_NAME=$OPTARG;;
32
-    g) ISGPL=true;;
33
-    \?) printf "$ANSI_RED[GHDL] Invalid option: -$OPTARG $ANSI_NOCOLOR\n" >&2
34
-	exit 1 ;;
35
-    :)  printf "$ANSI_RED[GHDL] Option -$OPTARG requires an argument. $ANSI_NOCOLOR\n" >&2
36
-	exit 1 ;;
37
-  esac
38
-done
39
-
40
-#--- Env
41
-
42
-echo "travis_fold:start:env.docker"
43
-printf "$ANSI_YELLOW[Info] Environment $ANSI_NOCOLOR\n"
44
-env
45
-echo "travis_fold:end:env.docker"
46
-
47
-#--- GPL: gpl-ize sources
48
-
49
-if [ "$ISGPL" = "true" ]; then
50
-    echo "travis_fold:start:gpl.src"
51
-    printf "$ANSI_YELLOW[Source] create GPL sources $ANSI_NOCOLOR\n"
52
-    files=`echo *`
53
-    make -f Makefile.in srcdir=. clean-pure-gpl
54
-    mkdir ${PKG_NAME}
55
-    cp -pdrl $files ${PKG_NAME}
56
-    tar -zcf "${PKG_NAME}.tar.gz" ${PKG_NAME}
57
-    PKG_NAME="${PKG_NAME}-${BLD}"
58
-    echo "travis_fold:end:gpl.src"
59
-fi
60
-
61
-#--- Configure
62
-
63
-echo "travis_fold:start:configure"
64
-printf "$ANSI_YELLOW[GHDL] Configure $ANSI_NOCOLOR\n"
65
-
66
-CDIR=$(pwd)
67
-prefix="$CDIR/install-$BLD"
68
-mkdir "$prefix"
69
-mkdir "build-$BLD"
70
-cd "build-$BLD"
71
-
72
-case "$BLD" in
73
-    mcode)
74
-	config_opts="" ;;
75
-    llvm)
76
-	config_opts="--with-llvm-config" ;;
77
-    llvm-3.5)
78
-	config_opts="--with-llvm-config=llvm-config-3.5 CXX=clang++" ;;
79
-    llvm-3.8)
80
-	config_opts="--with-llvm-config=llvm-config-3.8 CXX=clang++-3.8" ;;
81
-    docker)
82
-	echo "Check docker container!"
83
-	exit 0;;
84
-    *)
85
-	echo "$ANSI_RED[GHDL - build] Unknown build $BLD $ANSI_NOCOLOR"
86
-	exit 1;;
87
-esac
88
-echo "../configure --prefix=$prefix $config_opts"
89
-../configure "--prefix=$prefix" $config_opts
90
-echo "travis_fold:end:configure"
91
-
92
-#--- make
93
-
94
-echo "travis_fold:start:make"
95
-travis_time_start
96
-printf "$ANSI_YELLOW[GHDL] Make $ANSI_NOCOLOR\n"
97
-make
98
-travis_time_finish
99
-echo "travis_fold:end:make"
100
-
101
-echo "travis_fold:start:install"
102
-printf "$ANSI_YELLOW[GHDL] Install $ANSI_NOCOLOR\n"
103
-make install
104
-cd ..
105
-echo "travis_fold:end:install"
106
-
107
-#--- package
108
-
109
-echo "travis_fold:start:tar.bin"
110
-printf "$ANSI_YELLOW[GHDL] Create package ${ANSI_DARKCYAN}${PKG_NAME}.tgz $ANSI_NOCOLOR\n"
111
-tar -zcvf "${PKG_NAME}.tgz" -C "$prefix" .
112
-echo "travis_fold:end:tar.bin"
113
-
114
-#--- test
115
-
116
-export ENABLECOLOR TASK
117
-export GHDL="$prefix/bin/ghdl"
118
-cd testsuite
119
-failures=""
120
-
121
-echo "travis_fold:start:tests.sanity"
122
-travis_time_start
123
-printf "$ANSI_YELLOW[Test] sanity $ANSI_NOCOLOR\n"
124
-cd sanity
125
-for d in [0-9]*; do
126
-    cd $d
127
-    if ./testsuite.sh > test.log 2>&1 ; then
128
-	echo "sanity $d: ok"
129
-	# Don't disp log
130
-    else
131
-	echo "${ANSI_RED}sanity $d: failed${ANSI_NOCOLOR}"
132
-	cat test.log
133
-	failures="$failures $d"
134
-    fi
135
-    cd ..
136
-    # Stop at the first failure
137
-    [ "$failures" = "" ] || break
138
-done
139
-cd ..
140
-travis_time_finish
141
-echo "travis_fold:end:tests.sanity"
142
-[ "$failures" = "" ] || exit 1
143
-
144
-if [ "$ISGPL" != "true" ]; then
145
-    echo "travis_fold:start:tests.gna"
146
-    travis_time_start
147
-    printf "$ANSI_YELLOW[Test] gna $ANSI_NOCOLOR\n"
148
-    cd gna
149
-    dirs=`./testsuite.sh --list-tests`
150
-    for d in $dirs; do
151
-	cd $d
152
-	if ./testsuite.sh > test.log 2>&1 ; then
153
-	    echo "gna $d: ok"
154
-	    # Don't disp log
155
-	else
156
-	    echo "${ANSI_RED}gna $d: failed${ANSI_NOCOLOR}"
157
-	    cat test.log
158
-	    failures="$failures $d"
159
-	fi
160
-	cd ..
161
-	# Stop at the first failure
162
-	[ "$failures" = "" ] || break
163
-    done
164
-    cd ..
165
-    travis_time_finish
166
-    echo "travis_fold:end:tests.gna"
167
-    [ "$failures" = "" ] || exit 1
168
-fi
169
-
170
-echo "travis_fold:start:tests.vests"
171
-travis_time_start
172
-printf "$ANSI_YELLOW[Test] vests $ANSI_NOCOLOR\n"
173
-cd vests
174
-if ./testsuite.sh > vests.log 2>&1 ; then
175
-    echo "${ANSI_GREEN}Vests is OK$ANSI_NOCOLOR"
176
-    wc -l vests.log
177
-else
178
-    cat vests.log
179
-    echo "${ANSI_RED}Vests failure$ANSI_NOCOLOR"
180
-    failures=vests
181
-fi
182
-cd ..
183
-travis_time_finish
184
-echo "travis_fold:end:tests.vests"
185
-[ "$failures" = "" ] || exit 1
186
-
187
-$GHDL --version
188
-cd ..
189
-
190
-#---
191
-
192
-echo "[SUCCESSFUL]"
193
-touch build_ok

+ 24
- 0
dist/linux/create.sh View File

@@ -0,0 +1,24 @@
1
+#! /bin/sh
2
+# This script is executed in the travis-ci environment.
3
+
4
+set -e
5
+
6
+. dist/linux/travis-utils.sh
7
+. dist/ansi_color.sh
8
+#disable_color
9
+
10
+scriptdir=$(dirname $0)
11
+
12
+for d in build run; do
13
+    currentdir="${scriptdir}/docker/$d"
14
+    for f in `ls $currentdir`; do
15
+        for tag in `grep -oP "FROM.*AS \K.*" ${currentdir}/$f`; do
16
+            echo "travis_fold:start:${f}-$tag"
17
+            travis_time_start
18
+            printf "$ANSI_BLUE[DOCKER build] ${d} : ${f} - ${tag}$ANSI_NOCOLOR\n"
19
+            docker build -t ghdl/${d}:${f}-${tag} --target $tag - < ${currentdir}/$f
20
+            travis_time_finish
21
+            echo "travis_fold:end:${f}-$tag"
22
+        done
23
+    done
24
+done

+ 32
- 0
dist/linux/deploy2dockerhub.sh View File

@@ -0,0 +1,32 @@
1
+#! /bin/sh
2
+
3
+set -e
4
+
5
+. dist/linux/travis-utils.sh
6
+. dist/ansi_color.sh
7
+#disable_color
8
+
9
+# Skip deploy if we are in stage 0 (i.e. IMAGE="") and there is no '[ci images]' in the commit message
10
+if [ "$1" = "skip" ] || [ "${1}$(echo $2 | grep -o '\[ci images\]')" = "" ]; then
11
+    printf "${ANSI_GREEN}SKIP DEPLOY2DOCKERHUB$ANSI_NOCOLOR\n";
12
+    exit 0;
13
+fi
14
+
15
+case $1 in
16
+  "")    FILTER="/";;
17
+  *)     FILTER="/ghdl /pkg";;
18
+esac
19
+
20
+docker login -u="$DOCKER_USER" -p="$DOCKER_PASS"
21
+for key in $FILTER; do
22
+  for tag in `echo $(docker images ghdl$key* | awk -F ' ' '{print $1 ":" $2}') | cut -d ' ' -f2-`; do
23
+      if [ "$tag" = "REPOSITORY:TAG" ]; then break; fi
24
+      echo "travis_fold:start:`echo $tag | grep -oP 'ghdl/\K.*'`"
25
+      travis_time_start
26
+      printf "$ANSI_YELLOW[DOCKER push] ${tag}$ANSI_NOCOLOR\n"
27
+      docker push $tag
28
+      travis_time_finish
29
+      echo "travis_fold:end:`echo $tag | grep -oP 'ghdl/\K.*'`"
30
+  done
31
+done
32
+docker logout

+ 0
- 5
dist/linux/docker/build-fedora26+mcode View File

@@ -1,5 +0,0 @@
1
-# Fedora 26
2
-FROM fedora:26
3
-
4
-RUN dnf --nodocs -y install gcc-gnat zlib-devel make \
5
-  && dnf clean all

+ 0
- 7
dist/linux/docker/build-stretch+mcode View File

@@ -1,7 +0,0 @@
1
-# Debian 9
2
-FROM debian:stretch-slim
3
-
4
-RUN apt-get update -qq \
5
-  && apt-get -y install --no-install-recommends \
6
-            gnat gcc make zlib1g-dev \
7
-  && apt-get clean

+ 0
- 7
dist/linux/docker/build-stretch+mcode+gpl View File

@@ -1,7 +0,0 @@
1
-# Debian 9
2
-FROM debian:stretch-slim
3
-
4
-RUN apt-get update -qq \
5
-  && apt-get -y install --no-install-recommends \
6
-            gnat gcc make zlib1g-dev \
7
-  && apt-get clean

+ 0
- 7
dist/linux/docker/build-ubuntu14+llvm-3.8 View File

@@ -1,7 +0,0 @@
1
-# Ubuntu 14
2
-FROM ubuntu:trusty
3
-
4
-RUN apt-get update -qq \
5
-  && apt-get -y install --no-install-recommends \
6
-            gnat gcc make zlib1g-dev llvm-3.8-dev clang-3.8 \
7
-  && apt-get clean

+ 0
- 7
dist/linux/docker/build-ubuntu14+mcode View File

@@ -1,7 +0,0 @@
1
-# Ubuntu 14
2
-FROM ubuntu:trusty
3
-
4
-RUN apt-get update -qq \
5
-  && apt-get -y install --no-install-recommends \
6
-            gnat gcc make zlib1g-dev \
7
-  && apt-get clean

+ 11
- 0
dist/linux/docker/build/buster View File

@@ -0,0 +1,11 @@
1
+# [build] Debian 10
2
+
3
+FROM debian:buster-slim AS mcode
4
+
5
+RUN apt-get update -qq \
6
+  && apt-get -y install --no-install-recommends \
7
+            gnat gcc make zlib1g-dev \
8
+  && apt-get autoclean && apt-get clean && apt-get autoremove
9
+
10
+
11
+FROM mcode AS mcode-gpl

+ 12
- 0
dist/linux/docker/build/fedora26 View File

@@ -0,0 +1,12 @@
1
+# [build] Fedora 26
2
+
3
+FROM fedora:26 AS mcode
4
+
5
+RUN dnf --nodocs -y install gcc-gnat zlib-devel make \
6
+  && dnf clean all --enablerepo=\*
7
+
8
+
9
+FROM mcode AS llvm
10
+
11
+RUN dnf --nodocs -y install llvm-devel gcc-c++ clang \
12
+    && dnf clean all --enablerepo=\*

+ 11
- 0
dist/linux/docker/build/stretch View File

@@ -0,0 +1,11 @@
1
+# [build] Debian 9
2
+
3
+FROM debian:stretch-slim AS mcode
4
+
5
+RUN apt-get update -qq \
6
+  && apt-get -y install --no-install-recommends \
7
+            gnat gcc make zlib1g-dev \
8
+  && apt-get autoclean && apt-get clean && apt-get autoremove
9
+
10
+
11
+FROM mcode AS mcode-gpl

+ 16
- 0
dist/linux/docker/build/ubuntu14 View File

@@ -0,0 +1,16 @@
1
+# [build] Ubuntu 14
2
+
3
+FROM ubuntu:trusty AS mcode
4
+
5
+RUN apt-get update -qq \
6
+  && apt-get -y install --no-install-recommends \
7
+            gnat gcc make zlib1g-dev \
8
+  && apt-get autoclean && apt-get clean && apt-get autoremove
9
+
10
+
11
+FROM mcode AS llvm-3.8
12
+
13
+RUN apt-get update -qq \
14
+  && apt-get -y install --no-install-recommends \
15
+            llvm-3.8-dev clang-3.8 \
16
+  && apt-get autoclean && apt-get clean && apt-get autoremove

+ 16
- 0
dist/linux/docker/build/ubuntu16 View File

@@ -0,0 +1,16 @@
1
+# [build] Ubuntu 16
2
+
3
+FROM ubuntu:xenial AS mcode
4
+
5
+RUN apt-get update -qq \
6
+  && apt-get -y install --no-install-recommends \
7
+            gnat gcc make zlib1g-dev \
8
+  && apt-get autoclean && apt-get clean && apt-get autoremove
9
+
10
+
11
+FROM mcode AS llvm-3.9
12
+
13
+RUN apt-get update -qq \
14
+  && apt-get -y install --no-install-recommends \
15
+            llvm-3.9-dev clang-3.9 \
16
+  && apt-get autoclean && apt-get clean && apt-get autoremove

+ 16
- 0
dist/linux/docker/build/ubuntu18 View File

@@ -0,0 +1,16 @@
1
+# [build] Ubuntu 18
2
+
3
+FROM ubuntu:bionic AS mcode
4
+
5
+RUN apt-get update -qq \
6
+  && apt-get -y install --no-install-recommends \
7
+            gnat gcc make zlib1g-dev \
8
+  && apt-get autoclean && apt-get clean && apt-get autoremove
9
+
10
+
11
+FROM mcode AS llvm-5.0
12
+
13
+RUN apt-get update -qq \
14
+  && apt-get -y install --no-install-recommends \
15
+            llvm-5.0-dev clang-5.0 \
16
+  && apt-get autoclean && apt-get clean && apt-get autoremove

+ 10
- 0
dist/linux/docker/run/buster View File

@@ -0,0 +1,10 @@
1
+# [run] Debian 10
2
+
3
+FROM debian:buster-slim AS mcode
4
+
5
+RUN apt-get update -qq \
6
+ && apt-get -y install libgnat-7 gcc libc6-dev \
7
+ && apt-get autoclean && apt-get clean && apt-get autoremove
8
+
9
+
10
+FROM mcode AS mcode-gpl

+ 12
- 0
dist/linux/docker/run/fedora26 View File

@@ -0,0 +1,12 @@
1
+# [run] Fedora 26
2
+
3
+FROM fedora:26 AS mcode
4
+
5
+RUN dnf --nodocs -y install libgnat gcc \
6
+  && dnf clean all --enablerepo=\*
7
+
8
+
9
+FROM mcode AS llvm
10
+
11
+RUN dnf --nodocs -y install llvm-libs zlib-devel \
12
+  && dnf clean all --enablerepo=\*

+ 10
- 0
dist/linux/docker/run/stretch View File

@@ -0,0 +1,10 @@
1
+# [run] Debian 9
2
+
3
+FROM debian:stretch-slim AS mcode
4
+
5
+RUN apt-get update -qq \
6
+ && apt-get -y install libgnat-6 gcc libc6-dev \
7
+ && apt-get autoclean && apt-get clean && apt-get autoremove
8
+
9
+
10
+FROM mcode AS mcode-gpl

+ 16
- 0
dist/linux/docker/run/ubuntu14 View File

@@ -0,0 +1,16 @@
1
+# [run] Ubuntu 14
2
+
3
+FROM ubuntu:trusty AS mcode
4
+
5
+RUN apt-get update -qq \
6
+  && apt-get -y install --no-install-recommends \
7
+            libgnat-4.6 gcc libc6-dev \
8
+  && apt-get autoclean && apt-get clean && apt-get autoremove
9
+
10
+
11
+FROM mcode AS llvm-3.8
12
+
13
+RUN apt-get update -qq \
14
+  && apt-get -y install --no-install-recommends \
15
+            libllvm-3.8 zlib1g-dev \
16
+  && apt-get autoclean && apt-get clean && apt-get autoremove

+ 16
- 0
dist/linux/docker/run/ubuntu16 View File

@@ -0,0 +1,16 @@
1
+# [run] Ubuntu 16
2
+
3
+FROM ubuntu:xenial AS mcode
4
+
5
+RUN apt-get update -qq \
6
+  && apt-get -y install --no-install-recommends \
7
+            libgnat-4.9 gcc libc6-dev \
8
+  && apt-get autoclean && apt-get clean && apt-get autoremove
9
+
10
+
11
+FROM mcode AS llvm-3.9
12
+
13
+RUN apt-get update -qq \
14
+  && apt-get -y install --no-install-recommends \
15
+            libllvm-3.9 zlib1g-dev \
16
+  && apt-get autoclean && apt-get clean && apt-get autoremove

+ 16
- 0
dist/linux/docker/run/ubuntu18 View File

@@ -0,0 +1,16 @@
1
+# [run] Ubuntu 18
2
+
3
+FROM ubuntu:bionic AS mcode
4
+
5
+RUN apt-get update -qq \
6
+  && apt-get -y install --no-install-recommends \
7
+            libgnat-7 gcc libc6-dev \
8
+  && apt-get autoclean && apt-get clean && apt-get autoremove
9
+
10
+
11
+FROM mcode AS llvm-5.0
12
+
13
+RUN apt-get update -qq \
14
+  && apt-get -y install --no-install-recommends \
15
+            libllvm5.0 zlib1g-dev \
16
+  && apt-get autoclean && apt-get clean && apt-get autoremove

+ 114
- 0
dist/linux/test.sh View File

@@ -0,0 +1,114 @@
1
+#! /bin/bash
2
+
3
+. dist/linux/travis-utils.sh
4
+. dist/ansi_color.sh
5
+disable_color
6
+
7
+echo "$0" "$@"
8
+
9
+# Stop in case of error
10
+set -e
11
+
12
+# Transform long options to short ones
13
+for arg in "$@"; do
14
+  shift
15
+  case "$arg" in
16
+      "--color"|"-color")   set -- "$@" "-c";;
17
+      "--gpl"|"-gpl")       set -- "$@" "-g";;
18
+    *) set -- "$@" "$arg"
19
+  esac
20
+done
21
+# Parse args
22
+while getopts ":b:p:cg" opt; do
23
+  case $opt in
24
+    c) enable_color;;
25
+    g) ISGPL=true;;
26
+    \?) printf "$ANSI_RED[GHDL - test] Invalid option: -$OPTARG $ANSI_NOCOLOR\n" >&2
27
+	exit 1 ;;
28
+    :)  printf "$ANSI_RED[GHDL - test] Option -$OPTARG requires an argument. $ANSI_NOCOLOR\n" >&2
29
+	exit 1 ;;
30
+  esac
31
+done
32
+
33
+rm -f test_ok
34
+
35
+export ENABLECOLOR
36
+if [ "$GHDL" = "" ]; then
37
+    export GHDL="$prefix/bin/ghdl"
38
+fi
39
+cd testsuite
40
+failures=""
41
+
42
+echo "travis_fold:start:tests.sanity"
43
+travis_time_start
44
+printf "$ANSI_YELLOW[GHDL - test] sanity $ANSI_NOCOLOR\n"
45
+cd sanity
46
+for d in [0-9]*; do
47
+    cd $d
48
+    if ./testsuite.sh > test.log 2>&1 ; then
49
+	echo "sanity $d: ok"
50
+	# Don't disp log
51
+    else
52
+	echo "${ANSI_RED}sanity $d: failed${ANSI_NOCOLOR}"
53
+	cat test.log
54
+	failures="$failures $d"
55
+    fi
56
+    cd ..
57
+    # Stop at the first failure
58
+    [ "$failures" = "" ] || break
59
+done
60
+cd ..
61
+travis_time_finish
62
+echo "travis_fold:end:tests.sanity"
63
+[ "$failures" = "" ] || exit 1
64
+
65
+if [ "$ISGPL" != "true" ]; then
66
+    echo "travis_fold:start:tests.gna"
67
+    travis_time_start
68
+    printf "$ANSI_YELLOW[GHDL - test] gna $ANSI_NOCOLOR\n"
69
+    cd gna
70
+    dirs=`./testsuite.sh --list-tests`
71
+    for d in $dirs; do
72
+	cd $d
73
+	if ./testsuite.sh > test.log 2>&1 ; then
74
+	    echo "gna $d: ok"
75
+	    # Don't disp log
76
+	else
77
+	    echo "${ANSI_RED}gna $d: failed${ANSI_NOCOLOR}"
78
+	    cat test.log
79
+	    failures="$failures $d"
80
+	fi
81
+	cd ..
82
+	# Stop at the first failure
83
+	[ "$failures" = "" ] || break
84
+    done
85
+    cd ..
86
+    travis_time_finish
87
+    echo "travis_fold:end:tests.gna"
88
+    [ "$failures" = "" ] || exit 1
89
+fi
90
+
91
+echo "travis_fold:start:tests.vests"
92
+travis_time_start
93
+printf "$ANSI_YELLOW[GHDL - test] vests $ANSI_NOCOLOR\n"
94
+cd vests
95
+if ./testsuite.sh > vests.log 2>&1 ; then
96
+    echo "${ANSI_GREEN}Vests is OK$ANSI_NOCOLOR"
97
+    wc -l vests.log
98
+else
99
+    cat vests.log
100
+    echo "${ANSI_RED}Vests failure$ANSI_NOCOLOR"
101
+    failures=vests
102
+fi
103
+cd ..
104
+travis_time_finish
105
+echo "travis_fold:end:tests.vests"
106
+[ "$failures" = "" ] || exit 1
107
+
108
+$GHDL --version
109
+cd ..
110
+
111
+#---
112
+
113
+echo "[SUCCESSFUL]"
114
+touch test_ok

+ 73
- 41
dist/linux/travis-ci.sh View File

@@ -1,11 +1,34 @@
1 1
 #! /bin/bash
2 2
 # This script is executed in the travis-ci environment.
3 3
 
4
+build_img_ghdl() {
5
+    # Build ghdl/ghdl from ghdl/run
6
+    echo "travis_fold:start:build_run"
7
+    travis_time_start
8
+    printf "$ANSI_BLUE[DOCKER build] ghdl : ${IMAGE_TAG}$ANSI_NOCOLOR\n"
9
+
10
+    PKG=`ls | grep -oP 'ghdl-.*tgz'`
11
+    mkdir tmp-img && cd tmp-img
12
+    cp ../$PKG ./
13
+    cp ../BUILD_TOOLS ./
14
+    echo "FROM ghdl/run:$IMAGE_TAG" > Dockerfile
15
+    echo "ADD $PKG /usr/local" >> Dockerfile
16
+    docker build -t ghdl/ghdl:$IMAGE_TAG .
17
+    cd ..
18
+    travis_time_finish
19
+    echo "travis_fold:end:build_run"
20
+}
21
+
22
+#---
23
+
4 24
 set -e
5 25
 
26
+. dist/linux/travis-utils.sh
6 27
 . dist/ansi_color.sh
7 28
 #disable_color
8 29
 
30
+scriptdir=$(dirname $0)
31
+
9 32
 
10 33
 # Display env (to debug)
11 34
 
@@ -14,19 +37,25 @@ printf "$ANSI_YELLOW[TRAVIS] Travis environment $ANSI_NOCOLOR\n"
14 37
 env | grep TRAVIS
15 38
 echo -en "travis_fold:end:travis_env\r"
16 39
 
40
+
41
+if [ "$IMAGE" = "" ]; then
42
+    echo "IMAGE not defined"
43
+    exit 1
44
+fi
45
+
46
+
47
+echo "travis_fold:start:fetch"
17 48
 # The command 'git describe' (used for version) needs the history. Get it.
18 49
 # But the following command fails if the repository is complete.
19 50
 git fetch --unshallow || true
20 51
 
21
-# Build version.tmp and replace version.in with it (so that the version is
22
-# correctly set).
23
-make -f Makefile.in srcdir=. version.tmp
24
-cp version.tmp src/version.in
52
+echo "travis_fold:end:fetch"
53
+
25 54
 
26 55
 # Compute package name
27 56
 
28 57
 PKG_SHORTCOMMIT="$(printf $TRAVIS_COMMIT | cut -c1-10)"
29
-PKG_VER=`grep Ghdl_Ver src/version.in | sed -e 's/.*"\(.*\)";/\1/'`
58
+PKG_VER=`grep "ghdl_version=" configure | sed -e 's/.*"\(.*\)";/\1/'`
30 59
 if [ -z "$TRAVIS_TAG" ]; then
31 60
     # No tag: use date + commit id
32 61
     PKG_TAG="$(date -u +%Y%m%d)-$PKG_SHORTCOMMIT";
@@ -34,28 +63,26 @@ elif expr "$TRAVIS_TAG" : 'v[0-9].*' > /dev/null; then
34 63
     # Remove leading 'v' in tags in the filenames.
35 64
     PKG_TAG="$(echo $TRAVIS_TAG | cut -c2-)"
36 65
 else
66
+    # Regular tag (like snapshots), nothing to change.
37 67
     PKG_TAG="$TRAVIS_TAG"
38 68
 fi
39 69
 
40
-if [ "$IMAGE" = "" ]; then
41
-    echo "IMAGE not defined"
42
-    exit 1
43
-fi
44
-
70
+# Extract from IMAGE (defined in .travis.yml)
45 71
 IFS='+' read -ra REFS <<< "$IMAGE"
46
-DDIST=${REFS[0]}
47
-DBLD=${REFS[1]}
48
-DGPL=${REFS[2]}
72
+DDIST=${REFS[0]}  # Linux distro (eg: ubuntuXX, fedoraXX)
73
+DBLD=${REFS[1]}   # Build/backend (eg: mcode, llvm)
74
+DGPL=${REFS[2]}   # GPL or not
49 75
 
50
-PKG_NAME="ghdl-${PKG_TAG}-${DBLD}-${DDIST}"
51
-BUILD_CMD="./dist/linux/buildtest.sh $ENABLECOLOR -b $DBLD"
76
+PKG_NAME="ghdl-${PKG_TAG}-${DDIST}-${DBLD}"
77
+BUILD_CMD_OPTS="$ENABLECOLOR -b $DBLD"
52 78
 if [ "$DGPL" = "gpl" ]; then
53
-    BUILD_CMD="$BUILD_CMD --gpl"
79
+    BUILD_CMD_OPTS="$BUILD_CMD_OPTS --gpl"
54 80
     PKG_NAME="ghdl-gpl-${PKG_TAG}"
55 81
 fi
56
-BUILD_CMD="${BUILD_CMD} -p $PKG_NAME"
82
+BUILD_CMD_OPTS="${BUILD_CMD_OPTS} -p $PKG_NAME"
83
+
84
+echo "build cmd: $BUILD_CMD_OPTS"
57 85
 
58
-echo "build cmd: $BUILD_CMD"
59 86
 
60 87
 # Build
61 88
 
@@ -64,37 +91,42 @@ if [ "$TRAVIS_OS_NAME" = "osx" ]; then
64 91
     ./dist/macosx/install-ada.sh || exit 1
65 92
     PATH=$PWD/gnat/bin:$PATH
66 93
 
67
-    bash -c "$BUILD_CMD"
94
+    bash -c "${scriptdir}/build.sh $BUILD_CMD_OPTS"
68 95
 else
69 96
     # Assume linux
70 97
 
71
-    # Create docker image
72
-
73
-    . ./dist/linux/travis-utils.sh
74
-
75
-    echo "travis_fold:start:create"
76
-    travis_time_start
77
-    printf "$ANSI_YELLOW[DOCKER build] Docker build $ANSI_NOCOLOR\n"
78
-
79
-    DOCKERFILE="dist/linux/docker/build-$IMAGE"
80
-
81
-    echo "dockerfile: $DOCKERFILE"
82
-    DOCKER_NAME=`echo $IMAGE | sed -e 's/+/-/g'`
98
+    # Build version.tmp and replace version.in with it (so that the version is
99
+    # correctly set).
100
+    # This is a little bit hack-ish, as it assumes that 'git' is not
101
+    # available in docker (otherwise it will describe as -dirty
102
+    # because this modifies the source file version.in).
103
+    ghdl_version_line=`grep -e '^ghdl_version' configure`
104
+    make -f Makefile.in srcdir=. $ghdl_version_line version.tmp
105
+    cp version.tmp src/version.in
106
+
107
+    # Run build in docker
108
+    IMAGE_TAG=`echo $IMAGE | sed -e 's/+/-/g'`
109
+    docker run --rm -t -v $(pwd):/work -w "/work" ghdl/build:$IMAGE_TAG bash -c "${scriptdir}/build.sh $BUILD_CMD_OPTS"
110
+fi
83 111
 
84
-    docker build -t $DOCKER_NAME - < $DOCKERFILE
85
-    travis_time_finish
86
-    echo "travis_fold:end:create"
112
+if [ ! -f build_ok ]; then
113
+    printf "$ANSI_RED[TRAVIS] BUILD failed $ANSI_NOCOLOR\n"
114
+    exit 1
115
+fi
87 116
 
88 117
 
89
-    # Run build+test in docker
118
+# Test
90 119
 
91
-    docker run --rm --tty --volume $(pwd):/work -w "/work" $DOCKER_NAME bash -c "$BUILD_CMD"
120
+if [ "$TRAVIS_OS_NAME" = "osx" ]; then
121
+    bash -c "prefix=$(realpath ./install-mcode) ${scriptdir}/test.sh $BUILD_CMD_OPTS"
122
+else
123
+    # Build ghdl/ghdl:$IMAGE_TAG image
124
+    build_img_ghdl
125
+    # Run test in docker container
126
+    docker run --rm -t -v $(pwd):/work -w "/work" ghdl/ghdl:$IMAGE_TAG bash -c "GHDL=ghdl ${scriptdir}/test.sh $BUILD_CMD_OPTS"
92 127
 fi
93 128
 
94
-
95
-ls -l ghdl-*
96
-
97
-if [ ! -f build_ok ]; then
98
-    printf "$ANSI_RED[TRAVIS] BUILD failed $ANSI_NOCOLOR\n"
129
+if [ ! -f test_ok ]; then
130
+    printf "$ANSI_RED[TRAVIS] TEST failed $ANSI_NOCOLOR\n"
99 131
     exit 1
100 132
 fi

+ 13
- 0
dist/linux/travis-enc-dockerhub.sh View File

@@ -0,0 +1,13 @@
1
+#!/bin/sh
2
+
3
+# - Run `$(command -v winpty) docker run --rm -it alpine sh -c "REPO='https://github.com/<user|organization>/<repo>'; USERNAME=<username>; PASSWORD=<password>; $(cat travis-enc.sh)"`
4
+# - Check the log and copy the secure key to `.travis.yml`: https://docs.travis-ci.com/user/environment-variables/#Defining-encrypted-variables-in-.travis.yml
5
+
6
+apk add -U --no-cache git openssh ruby ruby-dev libffi-dev build-base ruby-dev libc-dev libffi-dev linux-headers
7
+gem install travis --no-rdoc --no-ri
8
+
9
+git clone $REPO ./tmp-repo && cd tmp-repo
10
+
11
+travis login --org --auto
12
+travis encrypt DOCKER_USER=$USERNAME
13
+travis encrypt DOCKER_PASS=$PASSWORD

+ 2
- 1
dist/linux/travis-utils.sh View File

@@ -1,7 +1,8 @@
1 1
 # This is a trimmed down copy of
2 2
 # https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/templates/header.sh
3 3
 travis_time_start() {
4
-  travis_timer_id=$RANDOM
4
+  # `date +%N` returns the date in nanoseconds. It is used as a replacement for $RANDOM, which is only available in bash.
5
+  travis_timer_id=`date +%N`
5 6
   travis_start_time=$(travis_nanoseconds)
6 7
   echo "travis_time:start:$travis_timer_id"
7 8
 }

+ 5
- 2
dist/windows/appveyor/build.ps1 View File

@@ -53,13 +53,16 @@ $GHDL_BUILD_DIR =  "$($env:APPVEYOR_BUILD_FOLDER)\build\$BUILD_DIRNAME"
53 53
 
54 54
 if ($env:APPVEYOR_REPO_TAG -eq "true")
55 55
 {
56
-  $PREFIX_DIRNAME = "$($env:APPVEYOR_REPO_TAG_NAME)-$BUILD_DIRNAME"
56
+  # There is a tag. Remove the leading v.
57
+  $BUILD_VERSION = $($env:APPVEYOR_REPO_TAG_NAME) -creplace "^v", ""
57 58
 }
58 59
 else
59 60
 {
60
-  $PREFIX_DIRNAME = "$($env:APPVEYOR_BUILD_VERSION)-$BUILD_DIRNAME"
61
+  $BUILD_VERSION = $($env:APPVEYOR_BUILD_VERSION)
61 62
 }
62 63
 
64
+$PREFIX_DIRNAME = "$BUILD_VERSION-$BUILD_DIRNAME"
65
+
63 66
 $GHDL_PREFIX_DIR = "c:/Tools/GHDL/$PREFIX_DIRNAME"
64 67
 $ZipFile = "ghdl-$PREFIX_DIRNAME.zip"
65 68
 

+ 2
- 5
dist/windows/compile-ghdl.ps1 View File

@@ -90,11 +90,8 @@ $Script_WorkingDir =	Get-Location
90 90
 $GHDLRootDir =				Convert-Path (Resolve-Path ($PSScriptRoot + "\" + $RelPathToRoot))
91 91
 
92 92
 # set default values
93
-$EnableVerbose =			$PSCmdlet.MyInvocation.BoundParameters["Verbose"]
94
-$EnableDebug =				$PSCmdlet.MyInvocation.BoundParameters["Debug"]
95
-if ($EnableVerbose -eq $null)	{	$EnableVerbose =	$false	}
96
-if ($EnableDebug	 -eq $null)	{	$EnableDebug =		$false	}
97
-if ($EnableDebug	 -eq $true)	{	$EnableVerbose =	$true		}
93
+$EnableDebug =        [bool]$PSCmdlet.MyInvocation.BoundParameters["Debug"]
94
+$EnableVerbose =      [bool]$PSCmdlet.MyInvocation.BoundParameters["Verbose"] -or $EnableDebug
98 95
 
99 96
 # load modules from GHDL's 'libraries' directory
100 97
 Import-Module $PSScriptRoot\shared.psm1  -Verbose:$false -Debug:$false -ArgumentList "$Script_WorkingDir", $Hosted

+ 12
- 18
dist/windows/compile-libraries.ps1 View File

@@ -87,11 +87,8 @@ $Script_WorkingDir =	Get-Location
87 87
 $GHDLRootDir =				Convert-Path (Resolve-Path ($PSScriptRoot + "\" + $RelPathToRoot))
88 88
 
89 89
 # set default values
90
-$EnableVerbose =			$PSCmdlet.MyInvocation.BoundParameters["Verbose"]
91
-$EnableDebug =				$PSCmdlet.MyInvocation.BoundParameters["Debug"]
92
-if ($EnableVerbose -eq $null)	{	$EnableVerbose =	$false	}
93
-if ($EnableDebug	 -eq $null)	{	$EnableDebug =		$false	}
94
-if ($EnableDebug	 -eq $true)	{	$EnableVerbose =	$true		}
90
+$EnableDebug =        [bool]$PSCmdlet.MyInvocation.BoundParameters["Debug"]
91
+$EnableVerbose =      [bool]$PSCmdlet.MyInvocation.BoundParameters["Verbose"] -or $EnableDebug
95 92
 
96 93
 # load modules from GHDL's 'libraries' directory
97 94
 Import-Module $PSScriptRoot\shared.psm1 -Verbose:$false -Debug:$false -ArgumentList "$Script_WorkingDir", $Hosted
@@ -254,7 +251,6 @@ if ($VHDL87 -or $VHDL93 -or $VHDL2008)
254 251
 # ============================================================================
255 252
 if ($VHDL87)
256 253
 {	$VHDLVersion =				"87"
257
-	$VersionedDirectory =	"$VHDLDestinationLibraryDirectory\v$VHDLVersion"
258 254
 	Write-Host "Compiling libraries for VHDL-$VHDLVersion" -ForegroundColor Cyan
259 255
 	
260 256
 	# ----------------------------------------------------------------------
@@ -263,7 +259,7 @@ if ($VHDL87)
263 259
 	$VHDLLibrary =				"std"
264 260
 	Write-Host "  Compiling library '$VHDLLibrary'..." -ForegroundColor DarkCyan
265 261
 	
266
-	$LibraryDirectory = "$VersionedDirectory\$VHDLLibrary"
262
+	$LibraryDirectory = "$VHDLDestinationLibraryDirectory\$VHDLLibrary\v$VHDLVersion"
267 263
 	New-LibraryDirectory $LibraryDirectory	# $EnableVerbose
268 264
 	Set-Location $LibraryDirectory
269 265
 	
@@ -298,7 +294,7 @@ if ($VHDL87)
298 294
 	$VHDLFlavor =		"ieee"
299 295
 	Write-Host "  Compiling library '$VHDLLibrary'..." -ForegroundColor DarkCyan
300 296
 	
301
-	$LibraryDirectory = "$VersionedDirectory\$VHDLFlavor"
297
+	$LibraryDirectory = "$VHDLDestinationLibraryDirectory\$VHDLFlavor\v$VHDLVersion"
302 298
 	New-LibraryDirectory $LibraryDirectory	# $EnableVerbose
303 299
 	Set-Location $LibraryDirectory
304 300
 	
@@ -333,7 +329,7 @@ if ($VHDL87)
333 329
 	$VHDLFlavor =		"synopsys"
334 330
 	Write-Host "  Compiling library '$VHDLLibrary' ($VHDLFlavor)..." -ForegroundColor DarkCyan
335 331
 	
336
-	$LibraryDirectory = "$VersionedDirectory\$VHDLFlavor"
332
+	$LibraryDirectory = "$VHDLDestinationLibraryDirectory\$VHDLFlavor\v$VHDLVersion"
337 333
 	New-LibraryDirectory $LibraryDirectory	# $EnableVerbose
338 334
 	Set-Location $LibraryDirectory
339 335
 	
@@ -412,7 +408,6 @@ if ($VHDL87)
412 408
 # ============================================================================
413 409
 if ($VHDL93)
414 410
 {	$VHDLVersion =				"93"
415
-	$VersionedDirectory =	"$VHDLDestinationLibraryDirectory\v$VHDLVersion"
416 411
 	Write-Host "Compiling libraries for VHDL-$VHDLVersion" -ForegroundColor Cyan
417 412
 	
418 413
 	# ----------------------------------------------------------------------
@@ -421,7 +416,7 @@ if ($VHDL93)
421 416
 	$VHDLLibrary =				"std"
422 417
 	Write-Host "  Compiling library '$VHDLLibrary'..." -ForegroundColor DarkCyan
423 418
 	
424
-	$LibraryDirectory = "$VersionedDirectory\$VHDLLibrary"
419
+	$LibraryDirectory = "$VHDLDestinationLibraryDirectory\$VHDLLibrary\v$VHDLVersion"
425 420
 	New-LibraryDirectory $LibraryDirectory	# $EnableVerbose
426 421
 	Set-Location $LibraryDirectory
427 422
 	
@@ -456,7 +451,7 @@ if ($VHDL93)
456 451
 	$VHDLFlavor =		"ieee"
457 452
 	Write-Host "  Compiling library '$VHDLLibrary'..." -ForegroundColor DarkCyan
458 453
 	
459
-	$LibraryDirectory = "$VersionedDirectory\$VHDLFlavor"
454
+	$LibraryDirectory = "$VHDLDestinationLibraryDirectory\$VHDLFlavor\v$VHDLVersion"
460 455
 	New-LibraryDirectory $LibraryDirectory	# $EnableVerbose
461 456
 	Set-Location $LibraryDirectory
462 457
 	
@@ -515,7 +510,7 @@ if ($VHDL93)
515 510
 	$VHDLFlavor =		"synopsys"
516 511
 	Write-Host "  Compiling library '$VHDLLibrary' ($VHDLFlavor)..." -ForegroundColor DarkCyan
517 512
 	
518
-	$LibraryDirectory = "$VersionedDirectory\$VHDLFlavor"
513
+	$LibraryDirectory = "$VHDLDestinationLibraryDirectory\$VHDLFlavor\v$VHDLVersion"
519 514
 	New-LibraryDirectory $LibraryDirectory	# $EnableVerbose
520 515
 	Set-Location $LibraryDirectory
521 516
 	
@@ -597,7 +592,7 @@ if ($VHDL93)
597 592
 	$VHDLFlavor =		"mentor"
598 593
 	Write-Host "  Compiling library '$VHDLLibrary' ($VHDLFlavor)..." -ForegroundColor DarkCyan
599 594
 	
600
-	$LibraryDirectory = "$VersionedDirectory\$VHDLFlavor"
595
+	$LibraryDirectory = "$VHDLDestinationLibraryDirectory\$VHDLFlavor\v$VHDLVersion"
601 596
 	New-LibraryDirectory $LibraryDirectory	# $EnableVerbose
602 597
 	Set-Location $LibraryDirectory
603 598
 	
@@ -677,7 +672,6 @@ if ($VHDL93)
677 672
 # ==============================================================================
678 673
 if ($VHDL2008)
679 674
 {	$VHDLVersion =				"08"
680
-	$VersionedDirectory =	"$VHDLDestinationLibraryDirectory\v$VHDLVersion"
681 675
 	Write-Host "Compiling libraries for VHDL-$VHDLVersion" -ForegroundColor Cyan
682 676
 	
683 677
 	# ----------------------------------------------------------------------
@@ -686,7 +680,7 @@ if ($VHDL2008)
686 680
 	$VHDLLibrary =				"std"
687 681
 	Write-Host "  Compiling library '$VHDLLibrary'..." -ForegroundColor DarkCyan
688 682
 	
689
-	$LibraryDirectory = "$VersionedDirectory\$VHDLLibrary"
683
+	$LibraryDirectory = "$VHDLDestinationLibraryDirectory\$VHDLLibrary\v$VHDLVersion"
690 684
 	New-LibraryDirectory $LibraryDirectory	# $EnableVerbose
691 685
 	Set-Location $LibraryDirectory
692 686
 	
@@ -721,7 +715,7 @@ if ($VHDL2008)
721 715
 	$VHDLFlavor =		"ieee"
722 716
 	Write-Host "  Compiling library '$VHDLLibrary'..." -ForegroundColor DarkCyan
723 717
 	
724
-	$LibraryDirectory = "$VersionedDirectory\$VHDLFlavor"
718
+	$LibraryDirectory = "$VHDLDestinationLibraryDirectory\$VHDLFlavor\v$VHDLVersion"
725 719
 	New-LibraryDirectory $LibraryDirectory	# $EnableVerbose
726 720
 	Set-Location $LibraryDirectory
727 721
 	
@@ -780,7 +774,7 @@ if ($VHDL2008)
780 774
 	$VHDLFlavor =		"synopsys"
781 775
 	Write-Host "  Compiling library '$VHDLLibrary' ($VHDLFlavor)..." -ForegroundColor DarkCyan
782 776
 	
783
-	$LibraryDirectory = "$VersionedDirectory\$VHDLFlavor"
777
+	$LibraryDirectory = "$VHDLDestinationLibraryDirectory\$VHDLFlavor\v$VHDLVersion"
784 778
 	New-LibraryDirectory $LibraryDirectory	# $EnableVerbose
785 779
 	Set-Location $LibraryDirectory
786 780
 	

+ 37
- 34
dist/windows/targets.psm1 View File

@@ -1,29 +1,29 @@
1 1
 # EMACS settings: -*-	tab-width: 2; indent-tabs-mode: t -*-
2 2
 # vim: tabstop=2:shiftwidth=2:noexpandtab
3 3
 # kate: tab-width 2; replace-tabs off; indent-width 2;
4
-# 
4
+#
5 5
 # ==============================================================================
6 6
 #	Authors:						Patrick Lehmann
7
-# 
7
+#
8 8
 #	PowerShell Module:	The module provides build targets for GHDL.
9
-# 
9
+#
10 10
 # Description:
11 11
 # ------------------------------------
12 12
 #	This PowerShell module provides build targets for GHDL.
13 13
 #
14 14
 # ==============================================================================
15 15
 #	Copyright (C) 2016-2017 Patrick Lehmann
16
-#	
16
+#
17 17
 #	GHDL is free software; you can redistribute it and/or modify it under
18 18
 #	the terms of the GNU General Public License as published by the Free
19 19
 #	Software Foundation; either version 2, or (at your option) any later
20 20
 #	version.
21
-#	
21
+#
22 22
 #	GHDL is distributed in the hope that it will be useful, but WITHOUT ANY
23 23
 #	WARRANTY; without even the implied warranty of MERCHANTABILITY or
24 24
 #	FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
25 25
 #	for more details.
26
-#	
26
+#
27</