Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
doxverilog
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
doxverilog
Commits
98a54c57
Commit
98a54c57
authored
Jun 14, 2014
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added build support for Python3+ and Python2.6+
parent
3333536d
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
262 additions
and
246 deletions
+262
-246
configure
configure
+14
-6
install.doc
doc/install.doc
+1
-0
translator.py
doc/translator.py
+68
-67
configgen.py
src/configgen.py
+164
-164
lang_cfg.py
src/lang_cfg.py
+3
-3
languages.py
src/languages.py
+6
-6
portable_c.c
src/portable_c.c
+6
-0
No files found.
configure
View file @
98a54c57
...
@@ -594,9 +594,10 @@ fi
...
@@ -594,9 +594,10 @@ fi
# - check for python ----------------------------------------------------------
# - check for python ----------------------------------------------------------
python_version
=
0
printf
" Checking for python... "
printf
" Checking for python... "
if
test
"
$f_python
"
=
NO
;
then
if
test
"
$f_python
"
=
NO
;
then
python_names
=
"python2 python"
python_names
=
"python
3 python
2 python"
python_dirs
=
"
$bin_dirs
/usr/bin /usr/local/bin /bin /sbin"
python_dirs
=
"
$bin_dirs
/usr/bin /usr/local/bin /bin /sbin"
python_prog
=
NO
python_prog
=
NO
python_found
=
NO
python_found
=
NO
...
@@ -604,9 +605,16 @@ if test "$f_python" = NO; then
...
@@ -604,9 +605,16 @@ if test "$f_python" = NO; then
for
j
in
$python_dirs
;
do
for
j
in
$python_dirs
;
do
if
test
-x
"
$j
/
$i
"
;
then
if
test
-x
"
$j
/
$i
"
;
then
python_found
=
YES
python_found
=
YES
if
test
`
$j
/
$i
-c
"import sys; print sys.version_info[0]"
`
=
2
;
then
if
test
`
$j
/
$i
-c
"import sys; print(sys.version_info[0])"
`
=
3
;
then
python_prog
=
"
$j
/
$i
"
python_prog
=
"
$j
/
$i
"
;
python_version
=
`
$j
/
$i
-c
"import platform; print(platform.python_version())"
`
;
break
2
break
2
elif
test
`
$j
/
$i
-c
"import sys; print(sys.version_info[0])"
`
=
2
;
then
if
test
`
$j
/
$i
-c
"import sys; print(sys.version_info[1])"
`
-ge
6
;
then
python_prog
=
"
$j
/
$i
"
;
python_version
=
`
$j
/
$i
-c
"import platform; print(platform.python_version())"
`
;
break
2
fi
fi
fi
fi
fi
done
done
...
@@ -616,14 +624,14 @@ fi
...
@@ -616,14 +624,14 @@ fi
if
test
"
$f_python
"
=
NO
;
then
if
test
"
$f_python
"
=
NO
;
then
if
test
"
$python_found
"
=
YES
;
then
if
test
"
$python_found
"
=
YES
;
then
echo
"version should be python 2."
echo
"version should be python 2.
6 or higher.
"
else
else
echo
"not found!"
;
echo
"not found!"
;
fi
fi
echo
echo
exit
2
exit
2
fi
fi
echo
"using
$f_python
"
;
echo
"using
$f_python
(version
$python_version
)
"
;
# - check for perl ------------------------------------------------------------
# - check for perl ------------------------------------------------------------
...
...
doc/install.doc
View file @
98a54c57
...
@@ -556,6 +556,7 @@ open-source tools:
...
@@ -556,6 +556,7 @@ open-source tools:
<li>GNU bison version 2.5 (Linux) and 2.3 (MacOSX)
<li>GNU bison version 2.5 (Linux) and 2.3 (MacOSX)
<li>GNU make version 3.81
<li>GNU make version 3.81
<li>Perl version 5.12
<li>Perl version 5.12
<li>Python verion 2.7 and 3.4
<li>TeX Live 2009 (or later)
<li>TeX Live 2009 (or later)
</ul>
</ul>
...
...
doc/translator.py
View file @
98a54c57
This diff is collapsed.
Click to expand it.
src/configgen.py
View file @
98a54c57
This diff is collapsed.
Click to expand it.
src/lang_cfg.py
View file @
98a54c57
...
@@ -2,7 +2,7 @@ import sys
...
@@ -2,7 +2,7 @@ import sys
if
(
len
(
sys
.
argv
)
>
1
):
if
(
len
(
sys
.
argv
)
>
1
):
if
(
sys
.
argv
[
1
]
==
"ENONLY"
):
if
(
sys
.
argv
[
1
]
==
"ENONLY"
):
print
"#define ENGLISH_ONLY"
print
(
"#define ENGLISH_ONLY"
)
else
:
else
:
for
x
in
x
range
(
1
,
len
(
sys
.
argv
)):
for
x
in
range
(
1
,
len
(
sys
.
argv
)):
print
"#define LANG_
%
s"
%
(
sys
.
argv
[
x
]
)
print
(
"#define LANG_
%
s"
%
(
sys
.
argv
[
x
])
)
src/languages.py
View file @
98a54c57
...
@@ -15,7 +15,7 @@ for f in files:
...
@@ -15,7 +15,7 @@ for f in files:
# generating file is lang_cfg.py
# generating file is lang_cfg.py
# the rules file has to output lang_cfg.h
# the rules file has to output lang_cfg.h
#
#
print
"""
\
print
(
"""
\
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<VisualStudioToolFile
<VisualStudioToolFile
Name="languages"
Name="languages"
...
@@ -52,7 +52,7 @@ print """\
...
@@ -52,7 +52,7 @@ print """\
/>
/>
</Values>
</Values>
</EnumProperty>
</EnumProperty>
"""
"""
)
#
#
# generate loop, English is mandatory (so cannot be chosen)
# generate loop, English is mandatory (so cannot be chosen)
#
#
...
@@ -76,7 +76,7 @@ for f in new_list:
...
@@ -76,7 +76,7 @@ for f in new_list:
l1
=
l
.
replace
(
"-"
,
""
)
l1
=
l
.
replace
(
"-"
,
""
)
# capatalize first letter
# capatalize first letter
l
=
l
.
title
()
l
=
l
.
title
()
print
"""
\
print
(
"""
\
<EnumProperty
<EnumProperty
Name="
%
s"
Name="
%
s"
DisplayName="Use
%
s"
DisplayName="Use
%
s"
...
@@ -96,11 +96,11 @@ for f in new_list:
...
@@ -96,11 +96,11 @@ for f in new_list:
/>
/>
</Values>
</Values>
</EnumProperty>
</EnumProperty>
"""
%
(
l1
,
l
,
l
,
l
,
f
[
1
],
l
)
"""
%
(
l1
,
l
,
l
,
l
,
f
[
1
],
l
)
)
print
"""
\
print
(
"""
\
</Properties>
</Properties>
</CustomBuildRule>
</CustomBuildRule>
</Rules>
</Rules>
</VisualStudioToolFile>
</VisualStudioToolFile>
"""
"""
)
src/portable_c.c
View file @
98a54c57
#if defined(__APPLE__) || defined(macintosh)
// define this before including iconv.h to avoid a mapping of
// iconv_open and friends to libicon_open (done by mac ports),
// while the symbols without 'lib' are linked from /usr/lib/libiconv
#define LIBICONV_PLUG
#endif
#include <iconv.h>
#include <iconv.h>
// These functions are implemented in a C file, because there are different
// These functions are implemented in a C file, because there are different
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment