| 
									
										
										
										
											2018-01-14 01:18:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-12 16:02:26 +00:00
										 |  |  | dist: locales inx | 
					
						
							| 
									
										
										
										
											2019-04-21 01:55:26 +00:00
										 |  |  | 	bin/build-python | 
					
						
							| 
									
										
										
										
											2019-04-11 03:38:43 +00:00
										 |  |  | 	bin/build-electron | 
					
						
							| 
									
										
										
										
											2019-04-21 01:55:26 +00:00
										 |  |  | 	bin/build-distribution-archives | 
					
						
							| 
									
										
										
										
											2018-01-14 01:18:50 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | distclean: | 
					
						
							| 
									
										
										
										
											2019-04-12 16:02:26 +00:00
										 |  |  | 	rm -rf build dist inx locales *.spec *.tar.gz *.zip electron/node_modules electron/dist | 
					
						
							| 
									
										
										
										
											2018-02-05 03:38:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-08-20 19:07:12 +00:00
										 |  |  | .PHONY: inx | 
					
						
							| 
									
										
										
										
											2018-08-21 00:42:02 +00:00
										 |  |  | inx: locales | 
					
						
							| 
									
										
										
										
											2018-08-20 19:07:12 +00:00
										 |  |  | 	mkdir -p inx | 
					
						
							| 
									
										
										
										
											2018-08-21 01:59:49 +00:00
										 |  |  | 	if [ "$$BUILD" = "windows" ]; then \
 | 
					
						
							|  |  |  | 	    wine c:\\Python\\python.exe bin/generate-inx-files; \
 | 
					
						
							|  |  |  | 	else \
 | 
					
						
							|  |  |  | 	    bin/generate-inx-files; \
 | 
					
						
							|  |  |  | 	fi | 
					
						
							| 
									
										
										
										
											2018-08-20 19:07:12 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | .PHONY: messages.po | 
					
						
							| 
									
										
										
										
											2018-02-27 00:49:43 +00:00
										 |  |  | messages.po: | 
					
						
							| 
									
										
										
										
											2018-02-05 03:38:24 +00:00
										 |  |  | 	rm -f messages.po | 
					
						
							| 
									
										
										
										
											2018-08-20 19:17:55 +00:00
										 |  |  | 	bin/pyembroidery-gettext > pyembroidery-format-descriptions.py | 
					
						
							| 
									
										
										
										
											2019-04-03 03:07:38 +00:00
										 |  |  | 	bin/inkstitch-fonts-gettext > inkstitch-fonts-metadata.py | 
					
						
							| 
									
										
										
										
											2018-08-20 19:49:19 +00:00
										 |  |  | 	pybabel extract -o messages.po -F babel.conf --add-location=full --add-comments=l10n,L10n,L10N --sort-by-file --strip-comments -k N_ . | 
					
						
							| 
									
										
										
										
											2018-08-20 19:17:55 +00:00
										 |  |  | 	rm pyembroidery-format-descriptions.py | 
					
						
							| 
									
										
										
										
											2018-02-05 03:38:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-15 17:01:41 +00:00
										 |  |  | .PHONY: clean | 
					
						
							|  |  |  | clean: | 
					
						
							|  |  |  | 	rm -f messages.po pyembroidery-format-descriptions.py | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-05 03:38:24 +00:00
										 |  |  | .PHONY: locales | 
					
						
							|  |  |  | locales: | 
					
						
							|  |  |  | 	# message files will look like this: | 
					
						
							| 
									
										
										
										
											2018-02-05 04:01:59 +00:00
										 |  |  | 	#   translations/messages_en_US.po | 
					
						
							| 
									
										
										
										
											2018-02-05 03:38:24 +00:00
										 |  |  | 	if ls translations/*.po > /dev/null 2>&1; then \
 | 
					
						
							|  |  |  | 		for po in translations/*.po; do \
 | 
					
						
							| 
									
										
										
										
											2018-02-05 04:01:59 +00:00
										 |  |  | 			lang=$${po%.*}; \
 | 
					
						
							|  |  |  | 			lang=$${lang#*_}; \
 | 
					
						
							| 
									
										
										
										
											2018-02-05 03:38:24 +00:00
										 |  |  | 			mkdir -p locales/$$lang/LC_MESSAGES/; \
 | 
					
						
							|  |  |  | 			msgfmt $$po -o locales/$$lang/LC_MESSAGES/inkstitch.mo; \
 | 
					
						
							|  |  |  | 		done; \
 | 
					
						
							|  |  |  | 	else \
 | 
					
						
							| 
									
										
										
										
											2018-02-05 04:01:59 +00:00
										 |  |  | 		mkdir -p locales; \
 | 
					
						
							| 
									
										
										
										
											2018-02-05 03:38:24 +00:00
										 |  |  | 	fi | 
					
						
							| 
									
										
										
										
											2018-08-22 18:54:14 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | .PHONY: style | 
					
						
							|  |  |  | style: | 
					
						
							| 
									
										
										
										
											2019-04-12 19:32:37 +00:00
										 |  |  | 	flake8 . --count --max-complexity=10 --max-line-length=150 --statistics --exclude=pyembroidery,__init__.py,electron,build |