mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Various improvements to version reporting on win32
This commit is contained in:
		
							parent
							
								
									57cd485236
								
							
						
					
					
						commit
						0471d158d9
					
				
					 3 changed files with 23 additions and 11 deletions
				
			
		
							
								
								
									
										7
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										7
									
								
								Makefile
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -325,11 +325,12 @@ endif
 | 
			
		|||
	echo -en 'Documentation at http://www.clifford.at/yosys/.\r\n' >> yosys-win32-mxebin-$(YOSYS_VER)/readme.txt
 | 
			
		||||
	sed -e 's,^[^ ]*:,,; s, ,\n,g; s, *\\,,; s,/[^/]*/\.\./,/,g; s,'"$$PWD/"',,' \
 | 
			
		||||
			$(addsuffix .d,$(basename $(OBJS))) | sort -u | grep '^[^/]' | grep -v kernel/version_ > srcfiles.txt
 | 
			
		||||
	bash misc/create_vcxsrc.sh yosys-win32-vcxsrc-$(YOSYS_VER)
 | 
			
		||||
	zip yosys-win32-vcxsrc-$(YOSYS_VER)/genfiles.zip $(GENFILES)
 | 
			
		||||
	bash misc/create_vcxsrc.sh yosys-win32-vcxsrc $(YOSYS_VER) $(GIT_REV)
 | 
			
		||||
	echo "namespace Yosys { extern const char *yosys_version_str; const char *yosys_version_str=\"Yosys (Version Information Unavailable)\"; }" > kernel/version.cc
 | 
			
		||||
	zip yosys-win32-vcxsrc-$(YOSYS_VER)/genfiles.zip $(GENFILES) kernel/version.cc
 | 
			
		||||
	zip -r yosys-win32-mxebin-$(YOSYS_VER).zip yosys-win32-mxebin-$(YOSYS_VER)/
 | 
			
		||||
	zip -r yosys-win32-vcxsrc-$(YOSYS_VER).zip yosys-win32-vcxsrc-$(YOSYS_VER)/
 | 
			
		||||
	rm -f srcfiles.txt
 | 
			
		||||
	rm -f srcfiles.txt kernel/version.cc
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
config-clean: clean
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -45,10 +45,6 @@
 | 
			
		|||
 | 
			
		||||
YOSYS_NAMESPACE_BEGIN
 | 
			
		||||
 | 
			
		||||
#if defined(_WIN32) && !defined(__MINGW32__)
 | 
			
		||||
const char *yosys_version_str = "Yosys for Windows (Version Information Unavailable)";
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
int autoidx = 1;
 | 
			
		||||
RTLIL::Design *yosys_design = NULL;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,9 @@
 | 
			
		|||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
set -ex
 | 
			
		||||
vcxsrc="$1"
 | 
			
		||||
vcxsrc="$1-$2"
 | 
			
		||||
yosysver="$2"
 | 
			
		||||
gitsha="$3"
 | 
			
		||||
 | 
			
		||||
rm -rf YosysVS-Tpl-v1.zip YosysVS
 | 
			
		||||
wget http://www.clifford.at/yosys/nogit/YosysVS-Tpl-v1.zip
 | 
			
		||||
| 
						 | 
				
			
			@ -15,6 +17,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" />'
 | 
			
		||||
	tail -n +$((n+1)) "$vcxsrc"/YosysVS/YosysVS.vcxproj
 | 
			
		||||
} > "$vcxsrc"/YosysVS/YosysVS.vcxproj.new
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -22,10 +25,13 @@ mv "$vcxsrc"/YosysVS/YosysVS.vcxproj.new "$vcxsrc"/YosysVS/YosysVS.vcxproj
 | 
			
		|||
 | 
			
		||||
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
 | 
			
		||||
Using a git working copy for the yosys source code:
 | 
			
		||||
 | 
			
		||||
Want to use a git working copy for the yosys source code?
 | 
			
		||||
Open "Git Bash" in this directory and run:
 | 
			
		||||
 | 
			
		||||
	mv yosys yosys.bak
 | 
			
		||||
| 
						 | 
				
			
			@ -35,5 +41,14 @@ Open "Git Bash" in this directory and run:
 | 
			
		|||
	unzip ../genfiles.zip
 | 
			
		||||
EOT
 | 
			
		||||
 | 
			
		||||
sed -i 's/$/\r/; s/\r\r*/\r/g;' "$vcxsrc"/YosysVS/YosysVS.vcxproj "$vcxsrc"/readme-git.txt
 | 
			
		||||
cat > "$vcxsrc"/readme-abc.txt << EOT
 | 
			
		||||
Yosys is using "ABC" for gate-level optimizations and technology
 | 
			
		||||
mapping. Download yosys-win32-mxebin-$yosysver.zip and copy the
 | 
			
		||||
following files from it into this directory:
 | 
			
		||||
 | 
			
		||||
	pthreadVC2.dll
 | 
			
		||||
	yosys-abc.exe
 | 
			
		||||
EOT
 | 
			
		||||
 | 
			
		||||
sed -i 's/$/\r/; s/\r\r*/\r/g;' "$vcxsrc"/YosysVS/YosysVS.vcxproj "$vcxsrc"/readme-git.txt "$vcxsrc"/readme-abc.txt
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue