home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / fontutils-0.6-base.tgz / fontutils-0.6-base.tar / fsf / fontutils / GNUmakefile.in < prev    next >
Text File  |  1992-10-28  |  7KB  |  224 lines

  1. # Master GNU makefile for GNU font utilities.
  2. #
  3. # Copyright (C) 1992 Free Software Foundation, Inc.
  4. #
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 1, or (at your option)
  8. # any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. # Version number of this release.
  20. version = 0.6
  21.  
  22. # Installation prefixes.  Since GNU programs and the TeX system may be
  23. # installed in different places, we have different prefixes.
  24. prefix = /usr/local
  25. exec_prefix = $(prefix)
  26. texmf_prefix = /usr/local
  27.  
  28. # Installation directories.
  29. bindir = $(exec_prefix)/bin
  30. infodir = $(prefix)/info
  31. datadir = $(prefix)/lib
  32. fu_datadir = $(datadir)/fontutil
  33. emacs_datadir = $(datadir)/emacs
  34. emacslispdir = $(emacs_datadir)/elisp # Where to install .el files.
  35.  
  36. mfdatadir = $(texmf_prefix)/lib/mf
  37. mfinputdir = $(mfdatadir)/macros
  38. texdatadir = $(texmf_prefix)/lib/tex
  39. texinputdir = $(texdatadir)/macros
  40.  
  41. # Where the default resource files for X programs get installed.  If you
  42. # don't want to or can't write in the standard app-defaults directory,
  43. # you can set this to any directory you like as long as you set the
  44. # XAPPLRESDIR environment variable to the same directory.  See the
  45. # tutorial on resources in the X distribution
  46. # (.../mit/doc/tutorial/resources.txt) for more information.
  47. app_defaults = $(prefix)/lib/app-defaults
  48.  
  49. # Default paths for you to override.  You can either change these and
  50. # run `make', or copy include/paths.h.in to include/paths.h and change
  51. # them manually.  These paths are overridden by various environment
  52. # variables; see the documentation.  The font paths here should probably
  53. # match TeX's default paths.
  54. default_lib_path = .:$(shell pwd)/data:$(fu_datadir)
  55. default_tfm_path = /usr/local/lib/tex/fonts//:.
  56. default_pk_path = $(default_tfm_path)
  57. default_gf_path = $(default_tfm_path)
  58.  
  59. SHELL = /bin/sh
  60. srcdir = @srcdir@
  61. VPATH = @srcdir@
  62.  
  63. # Compiler option to make #include <X11/...> work, i.e., should start it
  64. # with `-I'.
  65. xincludedir = @xincludedir@
  66.  
  67. # Loader option to make -lX... work, i.e., should start with `-L'.
  68. xlibdir = @xlibdir@
  69.  
  70. CC = @CC@
  71. CFLAGS = -g
  72.  
  73. LDFLAGS = $(xlibdir) $(CFLAGS) $(XLDFLAGS)
  74. LIBS = @LIBS@ -lm $(extralibs)
  75. wlibs = @wlibs@
  76.  
  77. RANLIB = @RANLIB@
  78.  
  79. INSTALL = @INSTALL@
  80. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  81. INSTALL_DATA = @INSTALL_DATA@
  82.  
  83.  
  84. # You shouldn't need to change anything below here.
  85.  
  86. libraries = bzr gf lib pbm pk tfm widgets
  87. programs = bpltobzr bzrto charspace fontconvert gsrenderfont imageto \
  88.            imgrotate limn xbfe
  89. alldirs = $(libraries) $(programs) doc
  90.  
  91. default: all
  92.  
  93. .PHONY: all install libraries clean distclean extraclean realclean depend dist
  94.  
  95. makeargs = $(MFLAGS) \
  96.   SHELL="$(SHELL)" CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
  97.   LIBS="$(LIBS)" RANLIB="$(RANLIB)" wlibs="$(wlibs)" \
  98.   xlibdir="$(xlibdir)" xincludedir='$(xincludedir)' srcdir=$(srcdir)
  99.  
  100. all: libraries
  101.     for dir in $(programs);                        \
  102.     do                                \
  103.       (cd $${dir}; $(MAKE) $(makeargs) all);            \
  104.     done
  105.  
  106. libraries: include/paths.h
  107.     for dir in $(libraries);                    \
  108.     do                                \
  109.       (cd $${dir}; $(MAKE) $(makeargs));                \
  110.         done
  111.  
  112. include/paths.h: include/paths.h.in GNUmakefile GNUmakefile.in
  113.     rm -f $@
  114.     echo "/* Generated from paths.h.in (`date`).  */" > $@
  115.     sed -e "s,replace-with-lib-path,$(default_lib_path)," \
  116.             -e "s,replace-with-tfm-path,$(default_tfm_path)," \
  117.             -e "s,replace-with-pk-path,$(default_pk_path)," \
  118.             -e "s,replace-with-gf-path,$(default_gf_path)," \
  119.           $< >> $@
  120.  
  121.  
  122. installargs = bindir=$(bindir) \
  123.   fu_datadir=$(fu_datadir) \
  124.   emacslispdir=$(emacslispdir) \
  125.   mfinputdir=$(mfinputdir) \
  126.   texinputdir=$(texinputdir) \
  127.   app_defaults=$(app_defaults) \
  128.   INSTALL="$(INSTALL)" \
  129.   INSTALL_DATA="$(INSTALL_DATA)" \
  130.   INSTALL_PROGRAM="$(INSTALL_PROGRAM)"
  131.  
  132. install:
  133.     -mkdir $(prefix) $(exec_prefix) $(bindir) $(datadir) $(infodir) \
  134.       $(fu_datadir) $(emacs_datadir) $(emacslispdir) $(app_defaults) \
  135.           >/dev/null 2>&1
  136.     for dir in $(programs) doc;                    \
  137.         do                                \
  138.           (cd $${dir}; $(MAKE) $(installargs) install);            \
  139.         done
  140.     cd data; for f in *.enc *.map common.cmi;            \
  141.       do $(INSTALL_DATA) $$f $(fu_datadir)/$$f; done
  142.  
  143.  
  144. configure: configure.in
  145.     autoconf
  146.  
  147. config.status: configure
  148.     sh configure --no-create
  149.  
  150. GNUmakefile: GNUmakefile.in config.status
  151.     sh config.status
  152.  
  153. # Prevent GNU make 3 from overflowing arg limit on system V.
  154. .NOEXPORT:
  155.  
  156. # Files in the top level directory to be distributed.
  157. topfiles = AUTHORS ChangeLog NEWS README configure *.in
  158.  
  159. # Directories whose complete contents are to be distributed.
  160. # `doc' will go away.
  161. completedirs = bin data include
  162.  
  163. # Files which have version number or date templates.
  164. versionfiles = gsrenderfont/gsrf.in */version.c
  165.  
  166. top_distdir = fontutils-$(version)
  167.  
  168. distargs = top_distdir=$(top_distdir) app_defaults=$(app_defaults) \
  169. version=$(version) 
  170.  
  171. dist:: # TAGS # depend
  172.     rm -rf $(top_distdir)
  173.     -mkdir $(top_distdir)
  174. #
  175. # Set up the top-level files.
  176.     ln $(topfiles) $(top_distdir)
  177.     cp -p $(HOME)/gnu/gnuorg/COPYING* $(top_distdir)
  178.     cp -p $(gnu)/lib/aclocal.m4 $(top_distdir)
  179. #
  180. # Set up the directories whose complete contents get distributed.
  181.     cd $(top_distdir); for dir in $(completedirs); do \
  182.           (mkdir $$dir; ln ../$$dir/* $$dir); done
  183.     cp -p $(plain)/testfont.tex $(top_distdir)/data
  184.     cp -p $(ktex)/macros/printeps.tex $(top_distdir)/data
  185.     rm -f $(top_distdir)/include/c-auto.h $(top_distdir)/include/paths.h
  186. #
  187. # Set up the other subdirectories.
  188.     for dir in $(alldirs); do \
  189.       (cd $$dir; $(MAKE) $(distargs) dir=$$dir dist) done
  190. #
  191. # Add version numbers.  Have to do this after creating the
  192. # $(versionfiles), naturally.
  193.     cd $(top_distdir); add-version $(version) $(versionfiles)
  194. #
  195. # Put on the finishing touches.
  196.     tar czf $(top_distdir). $(top_distdir)
  197.     rm -rf $(top_distdir)
  198.  
  199. TAGS:
  200.     for dir in $(programs);                        \
  201.     do                                \
  202.       (cd $${dir}; $(MAKE) $@);                    \
  203.     done
  204.  
  205. depend: include/paths.h
  206.     for dir in $(alldirs);                        \
  207.     do                                \
  208.       (cd $${dir}; $(MAKE) $@);                    \
  209.     done
  210.  
  211. mostlyclean clean distclean extraclean realclean::
  212.     for dir in $(alldirs);                        \
  213.     do                                \
  214.       (cd $${dir}; $(MAKE) $@);                    \
  215.     done
  216.  
  217. distclean::
  218.     rm -f include/c-auto.h include/paths.h config.status GNUmakefile
  219.  
  220. realclean:: distclean
  221.  
  222. extraclean:: distclean
  223.     rm -f *~ *\#*
  224.