unixinst.mak 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. # Copyright (C) 1997-2005 artofcode LLC. All rights reserved.
  2. #
  3. # This software is provided AS-IS with no warranty, either express or
  4. # implied.
  5. #
  6. # This software is distributed under license and may not be copied,
  7. # modified or distributed except as expressly authorized under the terms
  8. # of the license contained in the file LICENSE in this distribution.
  9. #
  10. # For more information about licensing, please refer to
  11. # http://www.ghostscript.com/licensing/. For information on
  12. # commercial licensing, go to http://www.artifex.com/licensing/ or
  13. # contact Artifex Software, Inc., 101 Lucas Valley Road #110,
  14. # San Rafael, CA 94903, U.S.A., +1(415)492-9861.
  15. # $Id: unixinst.mak,v 1.41 2005/06/29 14:21:27 giles Exp $
  16. # Partial makefile common to all Unix and Desqview/X configurations,
  17. # containing the `install' targets.
  18. # This is the very last part of the makefile for these configurations.
  19. install: install-exec install-scripts install-data
  20. # The sh -c in the rules below is required because Ultrix's implementation
  21. # of sh -e terminates execution of a command if any error occurs, even if
  22. # the command traps the error with ||.
  23. # We include mkdirs for datadir, gsdir, and gsdatadir in all 3 install
  24. # rules, just in case bindir or scriptdir is a subdirectory of any of these.
  25. install-exec: STDDIRS $(GS_XE)
  26. -mkdir -p $(datadir)
  27. -mkdir -p $(gsdir)
  28. -mkdir -p $(gsdatadir)
  29. -mkdir -p $(bindir)
  30. $(INSTALL_PROGRAM) $(GS_XE) $(bindir)/$(GS)
  31. install-scripts: $(PSLIBDIR)/gsnd
  32. -mkdir -p $(datadir)
  33. -mkdir -p $(gsdir)
  34. -mkdir -p $(gsdatadir)
  35. -mkdir -p $(scriptdir)
  36. $(SH) -c 'for f in \
  37. gsbj gsdj gsdj500 gslj gslp gsnd \
  38. bdftops dumphint dvipdf eps2eps font2c \
  39. pdf2dsc pdf2ps pdfopt pf2afm pfbtopfa printafm \
  40. ps2ascii ps2epsi ps2pdf ps2pdf12 ps2pdf13 ps2pdf14 ps2pdfwr ps2ps wftopfa \
  41. fixmswrd.pl lprsetup.sh pj-gs.sh pv.sh sysvlp.sh unix-lpr.sh ;\
  42. do if ( test -f $(PSLIBDIR)/$$f ); then \
  43. (cat $(PSLIBDIR)/$$f | sed -e "s/GS_EXECUTABLE=[^ \t]*/GS_EXECUTABLE=$(GS)/" > $(PSOBJDIR)/$$f); \
  44. $(INSTALL_PROGRAM) $(PSOBJDIR)/$$f $(scriptdir)/$$f; \
  45. fi;\
  46. done'
  47. PSRESDIR=$(PSLIBDIR)/../Resource
  48. PSDOCDIR=$(PSLIBDIR)/../doc
  49. PSEXDIR=$(PSLIBDIR)/../examples
  50. PSMANDIR=$(PSLIBDIR)/../man
  51. install-data: install-libdata install-resdata install-doc install-man install-examples
  52. # There's no point in providing a complete dependency list: we include
  53. # one file from each subdirectory just as a sanity check.
  54. install-libdata:
  55. -mkdir -p $(datadir)
  56. -mkdir -p $(gsdir)
  57. -mkdir -p $(gsdatadir)
  58. -mkdir -p $(gsdatadir)/lib
  59. $(SH) -c 'for f in \
  60. Fontmap Fontmap.GS cidfmap \
  61. FAPIcidfmap FAPIconfig FAPIfontmap xlatmap \
  62. ht_ccsto.ps \
  63. acctest.ps addxchar.ps align.ps bdftops.ps \
  64. caption.ps cid2code.ps decrypt.ps docie.ps dumphint.ps \
  65. errpage.ps font2c.ps font2pcl.ps gslp.ps gsnup.ps image-qa.ps impath.ps \
  66. jispaper.ps landscap.ps level1.ps lines.ps markhint.ps markpath.ps \
  67. packfile.ps pcharstr.ps pf2afm.ps pfbtopfa.ps ppath.ps prfont.ps printafm.ps \
  68. ps2ai.ps ps2ascii.ps ps2epsi.ps quit.ps rollconv.ps \
  69. showchar.ps showpage.ps stcinfo.ps stcolor.ps stocht.ps \
  70. traceimg.ps traceop.ps type1enc.ps type1ops.ps uninfo.ps unprot.ps \
  71. viewcmyk.ps viewgif.ps viewjpeg.ps viewmiff.ps \
  72. viewpcx.ps viewpbm.ps viewps2a.ps \
  73. winmaps.ps wftopfa.ps wrfont.ps zeroline.ps \
  74. pdf2dsc.ps pdfopt.ps ;\
  75. do if ( test -f $(PSLIBDIR)/$$f ); then $(INSTALL_DATA) $(PSLIBDIR)/$$f $(gsdatadir)/lib; fi;\
  76. done'
  77. $(SH) -c 'for f in $(PSLIBDIR)/gs_*.ps $(PSLIBDIR)/pdf*.ps;\
  78. do $(INSTALL_DATA) $$f $(gsdatadir)/lib ;\
  79. done'
  80. $(SH) -c 'for f in $(PSLIBDIR)/*.ppd $(PSLIBDIR)/*.rpd $(PSLIBDIR)/*.upp $(PSLIBDIR)/*.xbm $(PSLIBDIR)/*.xpm;\
  81. do $(INSTALL_DATA) $$f $(gsdatadir)/lib ;\
  82. done'
  83. # install the default resource files
  84. # copy in every category (directory) but CVS
  85. RES_CATEGORIES=`ls $(PSRESDIR) | grep -v CVS`
  86. install-resdata: $(PSRESDIR)/Decoding/Unicode
  87. -mkdir -p $(datadir)
  88. -mkdir -p $(gsdir)
  89. -mkdir -p $(gsdatadir)/Resource
  90. $(SH) -c 'for dir in $(RES_CATEGORIES); do \
  91. rdir=$(gsdatadir)/Resource/$$dir ; \
  92. test -d $$rdir || mkdir -p $$rdir ; \
  93. for file in $(PSRESDIR)/$$dir/*; do \
  94. if test -f $$file; then $(INSTALL_DATA) $$file $$rdir ; fi \
  95. done \
  96. done'
  97. # install html documentation
  98. DOC_PAGES=PUBLIC README index.html gs.css \
  99. API.htm Bug-form.htm Bug-info.htm \
  100. C-style.htm Changes.htm Commprod.htm Copying.htm \
  101. Current.htm Deprecated.htm \
  102. DLL.htm Deprecated.htm Develop.htm Devices.htm Drivers.htm \
  103. Fonts.htm Helpers.htm Hershey.htm \
  104. History1.htm History2.htm History3.htm History4.htm \
  105. History5.htm History6.htm History7.htm History8.htm \
  106. Details.htm Details8.htm \
  107. Htmstyle.htm Humor.htm Issues.htm Install.htm Language.htm \
  108. Lib.htm Maintain.htm Make.htm New-user.htm \
  109. News.htm Projects.htm Ps-style.htm Ps2epsi.htm Ps2pdf.htm \
  110. Psfiles.htm Public.htm Readme.htm Release.htm \
  111. Source.htm Testing.htm Unix-lpr.htm \
  112. Use.htm Xfonts.htm
  113. install-doc: $(PSDOCDIR)/News.htm
  114. -mkdir -p $(docdir)
  115. $(SH) -c 'for f in $(DOC_PAGES) ;\
  116. do if ( test -f $(PSDOCDIR)/$$f ); then $(INSTALL_DATA) $(PSDOCDIR)/$$f $(docdir); fi;\
  117. done'
  118. # install the man pages for each locale
  119. MAN_LCDIRS=. de
  120. MAN1_LINKS_PS2PS=eps2eps
  121. MAN1_LINKS_PS2PDF=ps2pdf12 ps2pdf13
  122. MAN1_LINKS_GSLP=gsbj gsdj gsdj500 gslj
  123. install-man: $(PSMANDIR)/gs.1
  124. $(SH) -c 'test -d $(mandir) || mkdir -p $(mandir)'
  125. $(SH) -c 'for d in $(MAN_LCDIRS) ;\
  126. do man1dir=$(mandir)/$$d/man$(man1ext) ;\
  127. ( test -d $$man1dir || mkdir -p $$man1dir ) ;\
  128. for f in $(PSMANDIR)/$$d/*.1 ;\
  129. do $(INSTALL_DATA) $$f $$man1dir ;\
  130. if ( test -f $$man1dir/ps2ps.$(man1ext) ) ;\
  131. then for f in $(MAN1_LINKS_PS2PS) ;\
  132. do ( cd $$man1dir; rm -f $$f.$(man1ext) ;\
  133. ln -s ps2ps.$(man1ext) $$f.$(man1ext) ) ;\
  134. done ;\
  135. fi ;\
  136. if ( test -f $$man1dir/ps2pdf.$(man1ext) ) ;\
  137. then for f in $(MAN1_LINKS_PS2PDF) ;\
  138. do ( cd $$man1dir; rm -f $$f.$(man1ext) ;\
  139. ln -s ps2pdf.$(man1ext) $$f.$(man1ext) ) ;\
  140. done ;\
  141. fi ;\
  142. if ( test -f $$man1dir/ps2lp.$(man1ext) ) ;\
  143. then for f in $(MAN1_LINKS_GSLP) ;\
  144. do ( cd $$man1dir; rm -f $$f.$(man1ext) ;\
  145. ln -s gslp.$(man1ext) $$f.$(man1ext) ) ;\
  146. done ;\
  147. fi ;\
  148. done ;\
  149. done'
  150. # install the example files
  151. install-examples:
  152. -mkdir -p $(exdir)
  153. for f in \
  154. alphabet.ps annots.pdf chess.ps colorcir.ps doretree.ps escher.ps \
  155. golfer.eps grayalph.ps snowflak.ps tiger.eps vasarely.ps waterfal.ps \
  156. ridt91.eps ;\
  157. do $(INSTALL_DATA) $(PSEXDIR)/$$f $(exdir) ;\
  158. done