aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorgrischka <grischka>2012-12-20 21:29:57 +0100
committergrischka <grischka>2012-12-20 21:29:57 +0100
commit5ebc6a964d49ebab862f3d006a28162c84644247 (patch)
tree20a1038097a067854653e3edc2c5d6c40f3a73c2 /Makefile
parentb17439934091744afd0bc42ceefcc712f2fc2434 (diff)
downloadtinycc-5ebc6a964d49ebab862f3d006a28162c84644247.tar.gz
tinycc-5ebc6a964d49ebab862f3d006a28162c84644247.tar.bz2
Makefile: revamp "tar" target
- Creates release tarball from *current* git branch - Includes tcc-doc.html - converts important windows files files to CRLF (requirement for the cmd.exe batch processor, convenience for reading the txt in notepad)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 17 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 48a8394..3f8375e 100644
--- a/Makefile
+++ b/Makefile
@@ -363,16 +363,6 @@ tcc.1: tcc-doc.texi
tcc-doc.info: tcc-doc.texi
-makeinfo $<
-.PHONY: all clean tar distclean install uninstall FORCE
-
-# tar release (use 'make -k tar' on a checkouted tree)
-TCC-VERSION=tcc-$(shell cat VERSION)
-tar:
- rm -rf /tmp/$(TCC-VERSION)
- cp -r . /tmp/$(TCC-VERSION)
- ( cd /tmp ; tar zcvf ~/$(TCC-VERSION).tar.gz $(TCC-VERSION) --exclude CVS )
- rm -rf /tmp/$(TCC-VERSION)
-
# in tests subdir
export LIBTCC1
@@ -395,4 +385,21 @@ config.mak:
@echo "Please run ./configure."
@exit 1
+# create release tarball from *current* git branch (including tcc-doc.html
+# and converting two files to CRLF)
+TCC-VERSION := tcc-$(shell cat VERSION)
+tar: tcc-doc.html
+ mkdir $(TCC-VERSION)
+ ( cd $(TCC-VERSION) && git --git-dir ../.git checkout -f )
+ cp tcc-doc.html $(TCC-VERSION)
+ for f in tcc-win32.txt build-tcc.bat ; do \
+ cat win32/$$f | sed 's,\(.*\),\1\r,g' > $(TCC-VERSION)/win32/$$f ; \
+ done
+ tar cjf $(TCC-VERSION).tar.bz2 $(TCC-VERSION)
+ rm -rf $(TCC-VERSION)
+ git reset
+
+
+.PHONY: all clean tar distclean install uninstall FORCE
+
endif # ifeq ($(TOP),.)