diff options
author | Werner Lemberg <wl@gnu.org> | 2006-05-10 13:44:47 +0000 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2006-05-10 13:44:47 +0000 |
commit | e0d1559591e7b49fe638775536fa66100f1b2163 (patch) | |
tree | 182ce757ecdb2e795e4edad27c59ac7fa0353ad2 /builds/toplevel.mk | |
parent | b80d85fe9ed3b0cf96d03dcfd7d1e1f149c2b718 (diff) | |
download | freetype2-e0d1559591e7b49fe638775536fa66100f1b2163.tar.gz |
* builds/freetype.mk (refdoc): Write-protect the `docmaker'
directory to suppress generation of .pyc files. According to the
Python docs there isn't a more elegant solution (currently).
* builds/toplevel.mk (dist): New target which builds .tar.gz,
.tar.bz2, and .zip files. Note that the version number is still
hard-coded.
(do-dist): Sub-target of `dist'.
(CONFIG_GUESS, CONFIG_SUB): New variables.
(.PHONY): Updated.
Diffstat (limited to 'builds/toplevel.mk')
-rw-r--r-- | builds/toplevel.mk | 74 |
1 files changed, 73 insertions, 1 deletions
diff --git a/builds/toplevel.mk b/builds/toplevel.mk index 48a454cbb..6c39e0cb5 100644 --- a/builds/toplevel.mk +++ b/builds/toplevel.mk @@ -34,7 +34,7 @@ # details on host platform detection and library builds. -.PHONY: all setup distclean modules +.PHONY: all dist distclean modules setup # The `space' variable is used to avoid trailing spaces in defining the @@ -158,4 +158,76 @@ modules: include $(TOP_DIR)/builds/modules.mk +# This target builds the tarballs. +# +# Not to be run by a normal user -- there are no attempts to make it +# generic. + +dist: + -rm -rf tmp + rm -f freetype-2.2.1.tar.gz + rm -f freetype-2.2.1.tar.bz2 + rm -f ft221.zip + + for d in `find . -wholename '*/CVS' -prune \ + -o -type f \ + -o -print` ; do \ + mkdir -p tmp/$$d ; \ + done ; + + currdir=`pwd` ; \ + for f in `find . -wholename '*/CVS' -prune \ + -o -name .cvsignore \ + -o -type d \ + -o -print` ; do \ + ln -s $$currdir/$$f tmp/$$f ; \ + done + + @# Prevent generation of .pyc files. Python follows (soft) links if + @# the link's directory is write protected, so we have temporarily + @# disable write access here too. + chmod -w src/tools/docmaker + + cd tmp ; \ + $(MAKE) devel ; \ + $(MAKE) do-dist + + chmod +w src/tools/docmaker + + mv tmp freetype-2.2.1 + + tar cfh - freetype-2.2.1 \ + | gzip -c > freetype-2.2.1.tar.gz + tar cfh - freetype-2.2.1 \ + | bzip2 -c > freetype-2.2.1.tar.bz2 + + @# Use CR/LF for zip files. + zip -lr ft221.zip freetype-2.2.1 + + rm -fr freetype-2.2.1 + + +# The locations of the latest `config.guess' and `config.sub' versions (from +# GNU `config' CVS), relative to the `tmp' directory used during `make dist'. +# +CONFIG_GUESS = ../../../config/config.guess +CONFIG_SUB = ../../../config/config.sub + + +# Don't say `make do-dist'. Always use `make dist' instead. +# +.PHONY: do-dist + +do-dist: distclean refdoc + @# Without removing the files, `autoconf' and friends follow links. + rm -f builds/unix/aclocal.m4 + rm -r builds/unix/configure.ac + rm -r builds/unix/configure + + sh autogen.sh + rm -rf builds/unix/autom4te.cache + + cp $(CONFIG_GUESS) builds/unix + cp $(CONFIG_SUB) builds/unix + # EOF |