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)
This commit is contained in:
grischka 2012-12-20 21:29:57 +01:00
parent b174399340
commit 5ebc6a964d

View File

@ -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),.)