Initial Commit
[packages] / xemacs-packages / x-symbol / fonts / Makefile
1 ### Makefile --- create fonts for package x-symbol
2
3 ## Author: Christoph Wedler <wedler@users.sourceforge.net>
4 ## Version: 4.5
5 ## Keywords: fonts, WYSIWYG, LaTeX, HTML, wp, math
6 ## X-URL: http://x-symbol.sourceforge.net/
7
8 # This file is not part of XEmacs.
9
10 # This software is free software; you can redistribute it and/or modify it
11 # under the terms of the GNU General Public License as published by the
12 # Free Software Foundation; either version 2, or (at your option) any
13 # later version.
14
15 # This software is distributed in the hope that it will be useful, but WITHOUT
16 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
18 # for more details.
19
20 # You should have received a copy of the GNU General Public License
21 # along with This software; see the file COPYING.  If not, write to
22 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 # Boston, MA 02111-1307, USA.
24
25 # latin-2: ftp://ftp.vslib.cz/pub/unix/X11/fonts/iso8859-2/ (1998)
26 # latin-3: XEMACS/aux/fonts/ (1998), changed
27 # latin-5: ETL (1998)
28 # latin-9: http://linux.ee/~ville/vh-fonts/vh-fonts-0.99.2.tar.gz (2002)
29 #          http://www.inp.nsk.su/~bolkhov/files/fonts/cyr-rfx/srctgz/
30 #          cyr-rfx-iso8859-15-1.0.bdfs.tgz: didn't succeed to download
31
32 PERL = perl
33 BDFTOPCF = bdftopcf
34
35 FONTS = ../fonts
36 GENFONTS = ../genfonts
37 ORIGFONTS = ../origfonts
38 PCFDIR = ../pcf
39
40 ORIGBDFS = helvR12.bdf helvR14.bdf
41 BDFS = 2helvR12.bdf 3helvR12.bdf 5etl14.bdf heriR12.bdf \
42         xsymb0_12.bdf xsymb1_12.bdf \
43         2helvR14.bdf 3helvR14.bdf 5etl16.bdf heriR14.bdf \
44         xsymb0_14.bdf xsymb1_14.bdf
45 EXTRABDFS = nilxs.bdf
46
47 .SUFFIXES:
48 .SUFFIXES: .pcf .bdf
49
50 vpath %.bdf $(FONTS):$(ORIGFONTS):$(GENFONTS)
51
52 GENS = $(patsubst %.bdf,$(GENFONTS)/%sub.bdf,$(ORIGBDFS)) \
53         $(patsubst %.bdf,$(GENFONTS)/%sub.bdf,$(BDFS)) \
54         $(patsubst %.bdf,$(GENFONTS)/%sup.bdf,$(ORIGBDFS)) \
55         $(patsubst %.bdf,$(GENFONTS)/%sup.bdf,$(BDFS))
56 PCFS = $(patsubst %.bdf,$(PCFDIR)/%.pcf,$(BDFS)) \
57         $(patsubst %.bdf,$(PCFDIR)/%.pcf,$(EXTRABDFS)) \
58         $(patsubst %.bdf,$(PCFDIR)/%sub.pcf,$(ORIGBDFS)) \
59         $(patsubst %.bdf,$(PCFDIR)/%sub.pcf,$(BDFS)) \
60         $(patsubst %.bdf,$(PCFDIR)/%sup.pcf,$(ORIGBDFS)) \
61         $(patsubst %.bdf,$(PCFDIR)/%sup.pcf,$(BDFS))
62
63 $(PCFDIR)/%.pcf: %.bdf
64         $(BDFTOPCF) -o $@ $<
65
66 $(GENFONTS)/%sub.bdf: %.bdf
67         $(PERL) ./makesub $< $@
68 $(GENFONTS)/%sup.bdf: %.bdf
69         $(PERL) ./makesub $< $@
70
71 ## vpath and VPATH don't accept a dir which doesn't exists yet...
72 all:
73         $(MAKE) mkdirs
74         $(MAKE) pcfs
75
76 echo:
77         echo $(BDFS)
78         echo $(GENS)
79
80 mkdirs:
81         -if [ ! -d $(GENFONTS) ]; then mkdir $(GENFONTS); fi
82         -if [ ! -d $(PCFDIR) ]; then mkdir $(PCFDIR); fi
83
84 gens: $(GENS)
85
86 pcfs: gens $(PCFS)
87         cd $(PCFDIR) ; mkfontdir
88         -xset fp rehash
89
90 clean:
91         -if [ -d $(GENFONTS) ]; then rm -f $(GENFONTS)/*.bdf ; fi
92         -if [ -d $(PCFDIR) ]; then \
93                 rm -f $(PCFDIR)/*.pcf $(PCFDIR)/fonts.dir ; fi