| 
									
										
										
										
											2013-06-03 18:13:56 +02:00
										 |  |  | #
 | 
					
						
							|  |  |  | # 2013 Nico Schottelius (nico-cdist at schottelius.org)
 | 
					
						
							|  |  |  | #
 | 
					
						
							|  |  |  | # This file is part of cdist.
 | 
					
						
							|  |  |  | #
 | 
					
						
							|  |  |  | # cdist is free software: you can redistribute it and/or modify
 | 
					
						
							|  |  |  | # it under the terms of the GNU General Public License as published by
 | 
					
						
							|  |  |  | # the Free Software Foundation, either version 3 of the License, or
 | 
					
						
							|  |  |  | # (at your option) any later version.
 | 
					
						
							|  |  |  | #
 | 
					
						
							|  |  |  | # cdist is distributed in the hope that it will be useful,
 | 
					
						
							|  |  |  | # but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					
						
							|  |  |  | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					
						
							|  |  |  | # GNU General Public License for more details.
 | 
					
						
							|  |  |  | #
 | 
					
						
							|  |  |  | # You should have received a copy of the GNU General Public License
 | 
					
						
							|  |  |  | # along with cdist. If not, see <http://www.gnu.org/licenses/>.
 | 
					
						
							|  |  |  | #
 | 
					
						
							|  |  |  | #
 | 
					
						
							| 
									
										
										
										
											2013-06-03 17:34:03 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-07 21:14:51 +02:00
										 |  |  | A2XM=a2x -f manpage --no-xmllint -a encoding=UTF-8 | 
					
						
							|  |  |  | A2XH=a2x -f xhtml --no-xmllint -a encoding=UTF-8 | 
					
						
							| 
									
										
										
										
											2013-06-20 09:22:17 +02:00
										 |  |  | helper=./bin/build-helper | 
					
						
							| 
									
										
										
										
											2013-06-07 21:14:51 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-03 22:29:49 +02:00
										 |  |  | MANDIR=docs/man | 
					
						
							|  |  |  | MAN1DSTDIR=$(MANDIR)/man1 | 
					
						
							|  |  |  | MAN7DSTDIR=$(MANDIR)/man7 | 
					
						
							|  |  |  | MANREF=$(MAN7DSTDIR)/cdist-reference.text | 
					
						
							|  |  |  | MANREFSH=$(MANDIR)/cdist-reference.text.sh | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | CHECKS=check-version check-date | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | DIST=dist-tag dist-branch-merge  | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | RELEASE=release-web release-man release-pypi release-archlinux-makepkg | 
					
						
							| 
									
										
										
										
											2013-06-03 18:16:50 +02:00
										 |  |  | RELEASE+=release-blog release-ml | 
					
						
							| 
									
										
										
										
											2013-06-03 22:29:49 +02:00
										 |  |  | RELEASE+=release-freecode release-archlinux-aur-upload | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | version=`git describe` | 
					
						
							|  |  |  | versionchangelog=`$(helper) changelog-version` | 
					
						
							|  |  |  | versionfile=cdist/version.py | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | archlinuxtar=cdist-${versionchangelog}-1.src.tar.gz | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | $(versionfile): | 
					
						
							| 
									
										
										
										
											2013-06-07 21:14:51 +02:00
										 |  |  | 	$(helper) version | 
					
						
							| 
									
										
										
										
											2013-06-03 17:34:03 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | $(DIST): dist-check | 
					
						
							| 
									
										
										
										
											2013-06-03 22:29:49 +02:00
										 |  |  | $(RELEASE): $(DIST) $(CHECKS) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | man: $(MANREF) mantype manbuild | 
					
						
							| 
									
										
										
										
											2013-06-03 18:13:56 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-07 21:14:51 +02:00
										 |  |  | $(MAN7DSTDIR)/cdist-type__motd.7: $(MAN7DSTDIR)/cdist-type__motd.text  | 
					
						
							|  |  |  | 	$(A2XM) $^ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | $(MAN7DSTDIR)/cdist-type__motd.text: cdist/conf/type/__motd/man.text | 
					
						
							|  |  |  | 	echo ln -sf $@ $^ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-03 22:29:49 +02:00
										 |  |  | $(MANREF): $(MANREFSH) | 
					
						
							|  |  |  | 	$(MANREFSH) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ################################################################################
 | 
					
						
							| 
									
										
										
										
											2013-07-03 22:33:48 +02:00
										 |  |  | # manpage
 | 
					
						
							|  |  |  | # generate links from types
 | 
					
						
							|  |  |  | # build manpages
 | 
					
						
							| 
									
										
										
										
											2013-06-03 22:29:49 +02:00
										 |  |  | #
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-07-03 22:33:48 +02:00
										 |  |  | mantypedocuments=cdist/conf/type/*/man.text | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | mantypelist: $(mantypedocuments) | 
					
						
							|  |  |  | 	echo $^ >> $@ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | link-type-manpages: | 
					
						
							|  |  |  | 	$(helper) $@ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-03 22:29:49 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | ################################################################################
 | 
					
						
							|  |  |  | # dist code
 | 
					
						
							|  |  |  | #
 | 
					
						
							|  |  |  | dist-check: man | 
					
						
							| 
									
										
										
										
											2013-06-03 17:34:03 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | dist: $(DIST) | 
					
						
							|  |  |  | 	echo "Run \"make release\" to release to the public" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-03 22:29:49 +02:00
										 |  |  | dist-pypi: man version | 
					
						
							|  |  |  | 	python3 setup.py sdist upload | 
					
						
							| 
									
										
										
										
											2013-06-03 18:13:56 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-03 22:29:49 +02:00
										 |  |  | $(archlinuxtar): PKGBUILD dist-pypi | 
					
						
							|  |  |  | 	makepkg -c --source | 
					
						
							| 
									
										
										
										
											2013-06-03 18:13:56 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-03 22:29:49 +02:00
										 |  |  | ################################################################################
 | 
					
						
							|  |  |  | # release code
 | 
					
						
							|  |  |  | #
 | 
					
						
							|  |  |  | release: pub $(RELEASE) | 
					
						
							|  |  |  | 	echo "Don't forget...: linkedin" | 
					
						
							| 
									
										
										
										
											2013-06-03 18:16:50 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-03 18:13:56 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-03 22:29:49 +02:00
										 |  |  | release-archlinux: $(archlinuxtar) | 
					
						
							|  |  |  | 	burp -c system $^ | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | release-blog: blog | 
					
						
							|  |  |  | release-ml: release-blog | 
					
						
							| 
									
										
										
										
											2013-06-03 18:16:50 +02:00
										 |  |  | release-pub: man | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-03 22:29:49 +02:00
										 |  |  | release-web: web-doc | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-03 18:13:56 +02:00
										 |  |  | PKGBUILD: PKGBUILD.in | 
					
						
							|  |  |  | 	./PKGBUILD.in | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-03 22:29:49 +02:00
										 |  |  | ################################################################################
 | 
					
						
							|  |  |  | # generic call
 | 
					
						
							| 
									
										
										
										
											2013-06-03 18:13:56 +02:00
										 |  |  | %: | 
					
						
							| 
									
										
										
										
											2013-06-03 22:29:49 +02:00
										 |  |  | 	$(helper) $@ |