1. xemacs
  2. x-symbol

Source

x-symbol / fonts / Makefile

### Makefile --- create fonts for package x-symbol

## Author: Christoph Wedler <wedler@users.sourceforge.net>
## Version: 3.4
## Keywords: fonts, WYSIWYG, LaTeX, HTML, wp, math
## X-URL: http://x-symbol.sourceforge.net/

# This file is not part of XEmacs.

# This software is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version.

# This software is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.

# You should have received a copy of the GNU General Public License
# along with This software; see the file COPYING.  If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.


PERL = perl
BDFTOPCF = bdftopcf

FONTS = ../fonts
GENFONTS = ../genfonts
ORIGFONTS = ../origfonts
PCFDIR = ../pcf

ORIGBDFS = helvR12.bdf helvR14.bdf
BDFS = 2helvR12.bdf 3helvR12.bdf 5etl14.bdf \
	xsymb0_12.bdf xsymb1_12.bdf \
	2helvR14.bdf 3helvR14.bdf 5etl16.bdf \
	xsymb0_14.bdf xsymb1_14.bdf
EXTRABDFS = nilxs.bdf

.SUFFIXES:
.SUFFIXES: .pcf .bdf

vpath %.bdf $(FONTS):$(ORIGFONTS):$(GENFONTS)

GENS = $(patsubst %.bdf,$(GENFONTS)/%sub.bdf,$(ORIGBDFS)) \
	$(patsubst %.bdf,$(GENFONTS)/%sub.bdf,$(BDFS)) \
	$(patsubst %.bdf,$(GENFONTS)/%sup.bdf,$(ORIGBDFS)) \
	$(patsubst %.bdf,$(GENFONTS)/%sup.bdf,$(BDFS))
PCFS = $(patsubst %.bdf,$(PCFDIR)/%.pcf,$(BDFS)) \
	$(patsubst %.bdf,$(PCFDIR)/%.pcf,$(EXTRABDFS)) \
	$(patsubst %.bdf,$(PCFDIR)/%sub.pcf,$(ORIGBDFS)) \
	$(patsubst %.bdf,$(PCFDIR)/%sub.pcf,$(BDFS)) \
	$(patsubst %.bdf,$(PCFDIR)/%sup.pcf,$(ORIGBDFS)) \
	$(patsubst %.bdf,$(PCFDIR)/%sup.pcf,$(BDFS))

$(PCFDIR)/%.pcf: %.bdf
	$(BDFTOPCF) -o $@ $<

$(GENFONTS)/%sub.bdf: %.bdf
	$(PERL) ./makesub $< $@
$(GENFONTS)/%sup.bdf: %.bdf
	$(PERL) ./makesub $< $@

## vpath and VPATH don't accept a dir which doesn't exists yet...
all:
	$(MAKE) mkdirs
	$(MAKE) pcfs

mkdirs:
	-if [ ! -d $(GENFONTS) ]; then mkdir $(GENFONTS); fi
	-if [ ! -d $(PCFDIR) ]; then mkdir $(PCFDIR); \
			       else rm -f $(PCFDIR)/*.pcf ; fi;

gens: $(GENS)

## There may not be an X server currently running (e.g. under Cygwin).
pcfs: gens $(PCFS)
	cd $(PCFDIR) ; mkfontdir
	-xset fp rehash

clean:
	-if [ -d $(GENFONTS) ]; then rm -f $(GENFONTS)/*.bdf ; fi
	-if [ -d $(PCFDIR) ]; then \
		rm -f $(PCFDIR)/*.pcf $(PCFDIR)/fonts.dir ; fi