#
SHELL = /bin/sh
INSTALL = install
+GZFLAGS = -f -9 -n
-DATE = 20131221
-MAJORVERSION = 6.3
-VERSION = $(MAJORVERSION).$(DATE)
+PACKAGE = "unifont"
+UNICODE_VERSION = 8.0
+PKG_REV = 01
+VERSION = $(UNICODE_VERSION).$(PKG_REV)
#
# The settings below will install software, man pages, and documentation
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
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.
buildfont:
if [ x$(BUILDFONT) != x ] ; \
then \
- set -e ; make -C font ; \
+ set -e && $(MAKE) -C font ; \
fi
#
# 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 )
$(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
\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