Pass correct preprocessor defines for Visual Studio
This commit is contained in:
parent
36a592bf94
commit
0ef625ee80
1 changed files with 3 additions and 5 deletions
8
misc/create_vcxsrc.sh
Normal file → Executable file
8
misc/create_vcxsrc.sh
Normal file → Executable file
|
@ -2,8 +2,9 @@
|
|||
|
||||
set -ex
|
||||
vcxsrc="$1-$2"
|
||||
yosysver="$2"
|
||||
gitsha="$3"
|
||||
yosysver="$2"
|
||||
yosysverstr="$yosysver (git sha1 $gitsha, Visual Studio)"
|
||||
|
||||
rm -rf YosysVS-Tpl-v1.zip YosysVS
|
||||
wget http://www.clifford.at/yosys/nogit/YosysVS-Tpl-v1.zip
|
||||
|
@ -17,7 +18,7 @@ mv YosysVS "$vcxsrc"
|
|||
head -n$n "$vcxsrc"/YosysVS/YosysVS.vcxproj
|
||||
egrep '\.(h|hh|hpp|inc)$' srcfiles.txt | sed 's,.*,<ClInclude Include="../yosys/&" />,'
|
||||
egrep -v '\.(h|hh|hpp|inc)$' srcfiles.txt | sed 's,.*,<ClCompile Include="../yosys/&" />,'
|
||||
echo '<ClCompile Include="../yosys/kernel/version.cc" />'
|
||||
echo "<ClCompile><PreprocessorDefinitions>YOSYS_VER_STR=\"${yosysverstr}\";%(PreprocessorDefinitions)</PreprocessorDefinitions></ClCompile>"
|
||||
tail -n +$((n+1)) "$vcxsrc"/YosysVS/YosysVS.vcxproj
|
||||
} > "$vcxsrc"/YosysVS/YosysVS.vcxproj.new
|
||||
|
||||
|
@ -27,9 +28,6 @@ mkdir -p "$vcxsrc"/yosys
|
|||
tar -cf - -T srcfiles.txt | tar -xf - -C "$vcxsrc"/yosys
|
||||
cp -r share "$vcxsrc"/
|
||||
|
||||
echo "namespace Yosys { extern const char *yosys_version_str; const char *yosys_version_str=\"Yosys" \
|
||||
"$yosysver (git sha1 $gitsha, Visual Studio)\"; }" > "$vcxsrc"/yosys/kernel/version.cc
|
||||
|
||||
cat > "$vcxsrc"/readme-git.txt << EOT
|
||||
Want to use a git working copy for the yosys source code?
|
||||
Open "Git Bash" in this directory and run:
|
||||
|
|
Loading…
Add table
Reference in a new issue