Browse files

Extremely smart dist target in Makefile for something so simple.

  • Loading branch information...
1 parent c4482e9 commit cbe9f1224099149090f6bcc75c3b62604cfc192b @dagwieers committed Jul 1, 2010
Showing with 5 additions and 2 deletions.
  1. +5 −2 Makefile
View
7 Makefile
@@ -34,8 +34,11 @@ clean:
dist: clean
$(MAKE) -C docs dist
- svn up
- svn list -R | pax -d -w -x ustar -s ,^,$(name)-$(version)/, | bzip2 >../$(name)-$(version).tar.bz2
+# svn up && svn list -R | pax -d -w -x ustar -s ,^,$(name)-$(version)/, | bzip2 >../$(name)-$(version).tar.bz2
+ svn st -v --xml | \
+ xmlstarlet sel -t -m "/status/target/entry" -s A:T:U '@path' -i "wc-status[@revision]" -v "@path" -n | \
+ pax -d -w -x ustar -s ,^,$(name)-$(version)/, | \
+ bzip2 >../$(name)-$(version).tar.bz2
rpm: dist
rpmbuild -tb --clean --rmspec --define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" --define "_rpmdir ../" ../$(name)-$(version).tar.bz2

0 comments on commit cbe9f12

Please sign in to comment.