diff options
author | Sven Eden <yamakuzure@gmx.net> | 2017-02-22 15:13:33 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-03-14 10:23:22 +0100 |
commit | 3c55423a96cf68ea1c947b512123de2f0bc95ec0 (patch) | |
tree | 0571c6d7d9bebf6bc5ab1da3389cb25f9c3dbb0a /Makefile.am | |
parent | 19cf13aa8ca2bcb9a4c895a55774e95ecc2b2aee (diff) |
Makefile.am: Add a git-tar target, that removes all elogind masks from the sources before packing the tar.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index fe4b811c7..f91734b5a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -941,6 +941,26 @@ dist: git-tag: git tag -s "v$(VERSION)" -m "elogind $(VERSION)" +.PHONY: git-tar +git-tar: + git archive --format=tar --prefix=elogind-$(VERSION)-raw/ HEAD | \ + (cd /var/tmp/ && tar xf -) ; \ + (cd /var/tmp && rm -rf elogind-$(VERSION) && $(MKDIR_P) elogind-$(VERSION) && \ + for f in `find elogind-$(VERSION)-raw/ -type f | cut -d '/' -f 2-` ; do \ + $(MKDIR_P) elogind-$(VERSION)/`dirname $$f` ; \ + $(AWK) '/^#if 0\s*$$/,/^#endif\s+\/\/\s+0\s*$$/{next}{print}' \ + elogind-$(VERSION)-raw/$$f \ + | $(SED) -e '/^\/\/\/ .*elogind.*$$/d' \ + -e '/^\/\/ #include.*$$/d' > elogind-$(VERSION)/$$f ; \ + done ; \ + for l in `find elogind-$(VERSION)-raw/ -type l | cut -d '/' -f 2-` ; do \ + $(MKDIR_P) elogind-$(VERSION)/`dirname $$l` ; \ + cp -P elogind-$(VERSION)-raw/$$l elogind-$(VERSION)/$$l ; \ + done ; \ + tar czf elogind-$(VERSION).tar.gz elogind-$(VERSION) ; \ + rm -rf elogind-$(VERSION) elogind-$(VERSION)-raw) ; \ + mv /var/tmp/elogind-$(VERSION).tar.gz ./ + .PHONY: install-tree install-tree: all rm -rf $(abs_srcdir)/install-tree |