X-Git-Url: http://git.shiar.net/unifont.git/blobdiff_plain/48e3a36faf203c4d25e024994f103fce1fcc8fca..8e42f3d15c39e5c98149c9647c0cc1a318e9321a:/Makefile diff --git a/Makefile b/Makefile index 3b14dee..9e6b121 100644 --- a/Makefile +++ b/Makefile @@ -8,10 +8,12 @@ # SHELL = /bin/sh INSTALL = install +GZFLAGS = -f -9 -n -DATE = 20131221 -MAJORVERSION = 6.3 -VERSION = $(MAJORVERSION).$(DATE) +PACKAGE = "unifont" +UNICODE_VERSION = 7.0 +PKG_REV = 06 +VERSION = $(UNICODE_VERSION).$(PKG_REV) # # The settings below will install software, man pages, and documentation @@ -23,12 +25,12 @@ USRDIR = usr PREFIX = $(DESTDIR)/$(USRDIR) PKGDEST = $(PREFIX)/share/unifont -VPATH = lib font/hexsrc font/ttfsrc +VPATH = lib font/plane00 font/ttfsrc HEXFILES = hangul-syllables.hex nonprinting.hex pua.hex spaces.hex \ unassigned.hex unifont-base.hex wqy.hex -COMBINING = font/ttfsrc/combining.txt +COMBINING = font/plane00/bmp-combining.txt TEXTFILES = ChangeLog INSTALL NEWS README @@ -47,8 +49,15 @@ COMPRESS = 1 all: bindir libdir docdir buildfont echo "Make is done." +# +# Build a distribution tarball. +# +dist: distclean + (cd .. && tar cf $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION) && \ + gzip $(GZFLAGS) $(PACKAGE)-$(VERSION).tar) + bindir: - set -e ; $(MAKE) -C src + set -e && $(MAKE) -C src # # Conditionally build the font, depending on the value of BUILDFONT. @@ -57,7 +66,7 @@ bindir: buildfont: if [ x$(BUILDFONT) != x ] ; \ then \ - set -e ; make -C font ; \ + set -e && $(MAKE) -C font ; \ fi # @@ -65,26 +74,26 @@ buildfont: # font/precompiled by default. # fontdir: - set -e ; $(MAKE) -C font + set -e && $(MAKE) -C font libdir: lib/wchardata.c docdir: - set -e ; $(MAKE) -C doc + set -e && $(MAKE) -C doc mandir: - set -e ; $(MAKE) -C man + set -e && $(MAKE) -C man precompiled: - set -e ; $(MAKE) precompiled -C font + set -e && $(MAKE) precompiled -C font # # Create lib/wchardata.c. If you want to also build the object file # wchardata.o, uncomment the last line # -lib/wchardata.c: $(HEXFILES) combining.txt +lib/wchardata.c: $(HEXFILES) $(COMBINING) $(INSTALL) -m0755 -d lib - (cd font/hexsrc && sort $(HEXFILES) > ../../unifonttemp.hex) + (cd font/plane00 && sort $(HEXFILES) > ../../unifonttemp.hex) bin/unigenwidth unifonttemp.hex $(COMBINING) > lib/wchardata.c \rm -f unifonttemp.hex # (cd lib && $(CC) $(CFLAGS) -c wchardata.c && chmod 644 wchardata.o ) @@ -96,16 +105,16 @@ install: bindir libdir docdir $(INSTALL) -m0755 -d $(PKGDEST) $(INSTALL) -m0644 -p $(TEXTFILES) doc/unifont.txt doc/unifont.info $(PKGDEST) for i in $(TEXTFILES) unifont.txt unifont.info ; do \ - gzip -f -9 $(PKGDEST)/$$i ; \ + gzip $(GZFLAGS) $(PKGDEST)/$$i ; \ done $(INSTALL) -m0644 -p lib/wchardata.c $(PKGDEST) - $(INSTALL) -m0644 -p font/ttfsrc/combining.txt $(PKGDEST) + $(INSTALL) -m0644 -p font/plane00/bmp-combining.txt $(PKGDEST) # If "make" wasn't run before, font/compiled won't exist. if [ ! -d font/compiled ] ; then \ - $(INSTALL) -m0644 -p font/precompiled/unifont-$(VERSION).hex $(PKGDEST)/unifont.hex ; \ + $(INSTALL) -m0644 -p font/precompiled/unifont-$(VERSION).hex $(PKGDEST)/unifont.hex && \ $(INSTALL) -m0644 -p font/precompiled/unifont-$(VERSION).bmp $(PKGDEST)/unifont.bmp ; \ else \ - $(INSTALL) -m0644 -p font/compiled/unifont-$(VERSION).hex $(PKGDEST)/unifont.hex ; \ + $(INSTALL) -m0644 -p font/compiled/unifont-$(VERSION).hex $(PKGDEST)/unifont.hex && \ $(INSTALL) -m0644 -p font/compiled/unifont-$(VERSION).bmp $(PKGDEST)/unifont.bmp ; \ fi @@ -129,4 +138,4 @@ distclean: \rm -rf *~ \rm -rf .DS* ._.DS* -.PHONY: all bindir docdir mandir fontdir precompiled install clean distclean +.PHONY: all dist bindir buildfont fontdir libdir docdir mandir precompiled install clean distclean