home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / D / CLISP / CLISPSRC.TAR / clisp-1995-01-01 / makefile.developer < prev    next >
Encoding:
Makefile  |  1995-01-01  |  11.6 KB  |  285 lines

  1. # This is the developer's makefile, not the user's makefile.
  2. # Don't use it unless you know exactly what you do!
  3.  
  4.  
  5. # Some important programs:
  6. SHELL = /bin/sh
  7. MAKE = make
  8.  
  9.  
  10. # Choose one of the packers:
  11.  
  12. # Standard Unix packer. Compress afterwards.
  13. #PACK = tar
  14. #PACKOPT = -cvf
  15. #PACKEXT = .tar
  16.  
  17. # GNU tar together with compress.
  18. #PACK = tar
  19. #PACKOPT = cvfhz
  20. #PACKEXT = .tar.Z
  21.  
  22. # GNU tar together with GNU gzip. Excellent performance.
  23. PACK = tar
  24. PACKOPT = cvfhz
  25. PACKEXT = .tar.z
  26.  
  27. # Popular Amiga packer. Good performance.
  28. #PACK = lha
  29. #PACKOPT = a
  30. #PACKEXT = .lzh
  31.  
  32. # Popular DOS packer.
  33. #PACK = zip
  34. #PACKOPT = -r
  35. #PACKEXT = .zip
  36.  
  37. # Popular Atari packer.
  38. #PACK = zoo
  39. #PACKOPT = -add
  40. #PACKEXT = .zoo
  41.  
  42. # The distribution's top directory is called TOPDIR here.
  43. # Use clisp-YYYY-MM-DD where DD.MM.YYYY is the date.
  44. TOPDIR = clisp
  45. T = $(TOPDIR)
  46.  
  47. SOURCES1 = $T/ANNOUNCE $T/COPYRIGHT $T/GNU-GPL $T/INSTALL $T/SUMMARY $T/configure
  48. # exclude $T/src/l*0?d = $T/src/lisparit0.d
  49. #SOURCES2 = $T/src/*[^d] $T/src/*[^0]?d $T/src/[^l]*0?d
  50. # exclude $T/src/l*0?d $T/src/*ne $T/src/*w?n $T/src/*s = $T/src/lisparit0.d $T/src/readline $T/src/newreadline $T/src/stdwin $T/src/queens
  51. SOURCES2 = $T/src/*[^dens] $T/src/*[^0]?d $T/src/[^l]*0?d $T/src/*[^n]e $T/src/*[^w]?n
  52. SOURCES3 = $T/utils $T/unix $T/dos $T/dosdjgpp $T/doswatcom $T/windows $T/windowswatcom $T/os2 $T/amiga $T/atari $T/acorn
  53. SOURCES4 = $T/tests $T/doc/*.txt $T/makefile.developer
  54.  
  55. SOURCES = $(SOURCES1) $(SOURCES2) $(SOURCES3) $(SOURCES4)
  56.  
  57. DOSDIR = /c:/clisp/src
  58. TEMPDIR = /tmp/clispdos
  59.  
  60.  
  61. all : makefiles oldconfigures configures src/FILES src/version.h src/winabout.c src/wincopyr.c
  62.  
  63. makefiles : dos/makefile dosdjgpp/makefile doswatcom/makefile windows/makefile windowswatcom/makefile os2/makefile atari/makefile.cross acorn/makefile.cc acorn/makefile.gcc src/readline/Makefile.dos src/readline/Makefile.go32 src/newreadline/Makefile.dos src/newreadline/Makefile.go32
  64.  
  65. dos/makefile : makemake
  66.     makemake dos gcc > dos/makefile.tmp
  67.     utils/move-if-change dos/makefile.tmp dos/makefile
  68.  
  69. dosdjgpp/makefile : makemake
  70.     makemake dosdjgpp gcc > dosdjgpp/makefile.tmp
  71.     utils/move-if-change dosdjgpp/makefile.tmp dosdjgpp/makefile
  72.  
  73. doswatcom/makefile : makemake
  74.     makemake doswatcom wcl386 > doswatcom/makefile.tmp
  75.     utils/move-if-change doswatcom/makefile.tmp doswatcom/makefile
  76.  
  77. windows/makefile : makemake
  78.     makemake windows gcc > windows/makefile.tmp
  79.     utils/move-if-change windows/makefile.tmp windows/makefile
  80.  
  81. windowswatcom/makefile : makemake
  82.     makemake windowswatcom wcl386 > windowswatcom/makefile.tmp
  83.     utils/move-if-change windowswatcom/makefile.tmp windowswatcom/makefile
  84.  
  85. os2/makefile : makemake
  86.     makemake os2 gcc > os2/makefile.tmp
  87.     utils/move-if-change os2/makefile.tmp os2/makefile
  88.  
  89. atari/makefile.cross : makemake src/VERSION
  90.     makemake cross atari gcc > atari/makefile.tmp
  91.     utils/move-if-change atari/makefile.tmp atari/makefile.cross
  92.  
  93. acorn/makefile.cc : makemake src/VERSION
  94.     makemake acorn ansi > acorn/makefile.tmp
  95.     utils/move-if-change acorn/makefile.tmp acorn/makefile.cc
  96.  
  97. acorn/makefile.gcc : makemake src/VERSION
  98.     makemake acorn gcc > acorn/makefile.tmp
  99.     utils/move-if-change acorn/makefile.tmp acorn/makefile.gcc
  100.  
  101. makemake : src/makemake.in
  102.     (echo "#!/bin/sh" ; cat src/makemake.in) > makemake
  103.     chmod a+x makemake
  104.  
  105. src/readline/Makefile.dos : src/readline/Makefile.in
  106.     sed -e 's/@srcdir@/./' -e 's/@CC@/gcc/' -e 's/@ALLOCA@//' -e 's/@RANLIB@/ar s/' -e 's/@LIBS@//' -e 's/^RM =.*$$/RM = del/' -e 's/^CP =.*$$/CP = copy/' -e 's/config.h//' -e 's/\(^    .*\)\$$(OBJECTS)/\1@objects/' < src/readline/Makefile.in > src/readline/Makefile.dos
  107.  
  108. src/readline/Makefile.go32 : src/readline/Makefile.in
  109.     sed -e 's/@srcdir@/./' -e 's/@CC@/gcc/' -e 's/@ALLOCA@//' -e 's/@RANLIB@/ranlib/' -e 's/@LIBS@//' -e 's/^RM =.*$$/RM = del/' -e 's/^CP =.*$$/CP = copy/' -e 's/config.h//' -e 's/\(^    .*\)\$$(OBJECTS)/\1@objects/' < src/readline/Makefile.in > src/readline/Makefile.go32
  110.  
  111. src/newreadline/Makefile.dos : src/newreadline/Makefile.in
  112.     sed -e 's/@srcdir@/./' -e 's/@CC@/gcc/' -e 's/@CFLAGS@/-g -O/' -e 's/@LDFLAGS@//' -e 's/@DEFS@/-DHAVE_CONFIG_H/' -e 's/@ALLOCA@//' -e 's/@RANLIB@/ar s/' -e 's/@LIBS@//' -e 's/^RM =.*$$/RM = del/' -e 's/^CP =.*$$/CP = copy/' -e 's/^MV =.*$$/MV = ren/' -e 's/ config.h//' -e 's/\(^    .*\)\$$(OBJECTS)/\1@objects/' < src/newreadline/Makefile.in > src/newreadline/Makefile.dos
  113.  
  114. src/newreadline/Makefile.go32 : src/newreadline/Makefile.in
  115.     sed -e 's/@srcdir@/./' -e 's/@CC@/gcc/' -e 's/@CFLAGS@/-g -O/' -e 's/@LDFLAGS@//' -e 's/@DEFS@/-DHAVE_CONFIG_H/' -e 's/@ALLOCA@//' -e 's/@RANLIB@/ranlib/' -e 's/@LIBS@//' -e 's/^RM =.*$$/RM = del/' -e 's/^CP =.*$$/CP = copy/' -e 's/^MV =.*$$/MV = ren/' -e 's/ config.h//' -e 's/\(^    .*\)\$$(OBJECTS)/\1@objects/' < src/newreadline/Makefile.in > src/newreadline/Makefile.go32
  116.  
  117.  
  118. OLDCONFIGURES = src/configure.old src/readline/configure.old src/newreadline/configure.old src/stdwin/configure.old
  119.  
  120. oldconfigures : $(OLDCONFIGURES)
  121.  
  122. AUTOCONF1_FILES = src/autoconf-1.7/aclocal.m4 src/autoconf-1.7/acgeneral.m4 src/autoconf-1.7/acspecific.m4
  123.  
  124. src/configure.old : src/configure.old.in $(AUTOCONF1_FILES)
  125.     cd src ; autoconf-1.7/autoconf -m autoconf-1.7 configure.old.in > configure.old ; chmod a+x configure.old
  126.  
  127. src/readline/configure.old : src/readline/configure.old.in $(AUTOCONF1_FILES)
  128.     cd src/readline ; ../autoconf-1.7/autoconf -m ../autoconf-1.7 configure.old.in > configure.old ; chmod a+x configure.old
  129.  
  130. src/newreadline/configure.old : src/newreadline/configure.old.in $(AUTOCONF1_FILES)
  131.     cd src/newreadline ; ../autoconf-1.7/autoconf -m ../autoconf-1.7 configure.old.in > configure.old ; chmod a+x configure.old
  132.  
  133. src/stdwin/configure.old : src/stdwin/configure.old.in $(AUTOCONF1_FILES)
  134.     cd src/stdwin ; ../autoconf-1.7/autoconf -m ../autoconf-1.7 configure.old.in > configure.old ; chmod a+x configure.old
  135.  
  136.  
  137. CONFIGURES = src/configure src/readline/configure src/newreadline/configure src/stdwin/configure
  138.  
  139. configures : $(CONFIGURES)
  140.  
  141. AUTOCONF2_FILES = src/autoconf-2.1/aclocal.m4 src/autoconf-2.1/acgeneral.m4 src/autoconf-2.1/acspecific.m4
  142.  
  143. src/configure : src/configure.in $(AUTOCONF2_FILES)
  144.     cd src ; autoconf-2.1/autoconf -m autoconf-2.1
  145.  
  146. src/readline/configure : src/readline/configure.in $(AUTOCONF2_FILES)
  147.     cd src/readline ; ../autoconf-2.1/autoconf -m ../autoconf-2.1
  148.  
  149. src/newreadline/configure : src/newreadline/configure.in $(AUTOCONF2_FILES)
  150.     cd src/newreadline ; ../autoconf-2.1/autoconf -m ../autoconf-2.1
  151.  
  152. src/stdwin/configure : src/stdwin/configure.in $(AUTOCONF2_FILES)
  153.     cd src/stdwin ; ../autoconf-2.1/autoconf -m ../autoconf-2.1
  154.  
  155.  
  156. # Syntaxcheck
  157. check-configures : $(OLDCONFIGURES) $(CONFIGURES)
  158.     set -e; for f in $(OLDCONFIGURES) $(CONFIGURES); do bash -x -n $$f; done
  159.  
  160.  
  161. view-man :
  162.     grep -v '^#[ie]' src/_clisp.1 | groff -Tascii -mandoc | less
  163.  
  164. view-html :
  165.     grep -v '^#[ie]' src/_clisp.html > /tmp/clisp.html
  166.     Mosaic /tmp/clisp.html &
  167.  
  168.  
  169. src/FILES : src/FILES.1
  170.     groff -Tascii -mandoc src/FILES.1 > src/FILES
  171.  
  172. src/version.h : src/VERSION
  173.     (echo '/* Generated automatically from src/VERSION. */' ; sed -e 's/^/#define VERSION "/' -e 's/$$/"/' src/VERSION ) > src/version.h
  174.  
  175. src/winabout.c : src/winabout.txt
  176.     sed -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/" CRLFstring/' < src/winabout.txt > src/winabout.c
  177.  
  178. src/wincopyr.c : COPYRIGHT
  179.     sed -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/" CRLFstring/' < COPYRIGHT > src/wincopyr.c
  180.  
  181.  
  182. check-old : force
  183.     src/autoconf-1.7/autoheadercheck src/configure.old src/unixconf.h.in
  184.     src/autoconf-1.7/autoheadercheck src/readline/configure.old src/readline/config.h.in
  185.     src/autoconf-1.7/autoheadercheck src/newreadline/configure.old src/newreadline/config.h.in
  186.     src/autoconf-1.7/autoheadercheck src/stdwin/configure.old src/stdwin/H/config.h.in
  187.  
  188.  
  189. distrib : linux-distrib dos-distrib src-distrib
  190.  
  191. # Before doing a "make src-distrib", don't forget
  192. # * update src/NEWS and src/VERSION,
  193. # * "make",
  194. # * "make check-old",
  195. # * "make check-configures",
  196. # * check that src/genclisph.d is up to date.
  197.  
  198. src-distrib : src/FILES force
  199.     $(MAKE) src--distrib TOPDIR=clisp-`cat src/VERSION`
  200.  
  201. src--distrib : force
  202.     ln -s . $(TOPDIR)
  203.     $(PACK) $(PACKOPT) /tmp/clispsrc$(PACKEXT) $(SOURCES)
  204.     $(PACK) $(PACKOPT) /tmp/clispsrc-readline$(PACKEXT) $T/src/readline
  205.     $(PACK) $(PACKOPT) /tmp/clispsrc-newreadline$(PACKEXT) $T/src/newreadline
  206.     $(PACK) $(PACKOPT) /tmp/clispsrc-stdwin$(PACKEXT) $T/src/stdwin
  207.     $(PACK) $(PACKOPT) /tmp/clispsrc-queens$(PACKEXT) $T/src/queens
  208.     rm -f $(TOPDIR)
  209.  
  210. linux-distrib : force
  211.     $(MAKE) linux--distrib
  212.  
  213. linux--distrib : force
  214.     cd make.gcc && $(MAKE) PACK="$(PACK)" PACKOPT="$(PACKOPT)" PACKEXT="$(PACKEXT)" distrib
  215.  
  216. dos-distrib : force
  217.     $(MAKE) dos--distrib PACK="zip" PACKOPT="-r" PACKEXT=".zip"
  218.  
  219. dos--distrib : force
  220.     mkdir $(TEMPDIR)
  221.     cp -p $(DOSDIR)/ANNOUNCE $(DOSDIR)/COPYRIGHT $(DOSDIR)/GNU-GPL $(DOSDIR)/SUMMARY $(DOSDIR)/NEWS $(TEMPDIR)
  222.     cp -p $(DOSDIR)/lisp.exe $(TEMPDIR)
  223.     cp -p $(DOSDIR)/lisp_1mb.exe $(TEMPDIR)
  224.     cp -p $(DOSDIR)/compiled.mem $(TEMPDIR)/lispinit.mem
  225.     cp -p $(DOSDIR)/*.lsp $(TEMPDIR)
  226.     # cp -p $(DOSDIR)/*.fas $(TEMPDIR)
  227.     cp -p $(DOSDIR)/README $(DOSDIR)/clisp.1 $(DOSDIR)/clisp.html $(DOSDIR)/impnotes.txt $(DOSDIR)/clreadline.3 $(TEMPDIR)
  228.     from-ibmpc $(TEMPDIR)/clisp.1 dos/clisp.1
  229.     from-ibmpc $(TEMPDIR)/clisp.html dos/clisp.html
  230.     from-ibmpc $(TEMPDIR)/impnotes.txt dos/impnotes.txt
  231.     from-ibmpc $(TEMPDIR)/clreadline.3 dos/clreadline.3
  232.     cd dos ; groff -Tascii -mandoc clisp.1 > clisp.man
  233.     cd dos ; groff -Tdvi -mandoc clisp.1 > clisp.dvi
  234.     cd dos ; groff -Tascii -mandoc clreadline.3 > clreadline.man
  235.     cd dos ; groff -Tdvi -mandoc clreadline.3 > clreadline.dvi
  236.     to-ibmpc dos/clisp.man $(TEMPDIR)/clisp.man
  237.     cp -p dos/clisp.dvi $(TEMPDIR)/clisp.dvi
  238.     to-ibmpc dos/clreadline.man $(TEMPDIR)/clreadline.man
  239.     cp -p dos/clreadline.dvi $(TEMPDIR)/clreadline.dvi
  240.     cd doc ; for f in *.txt; do to-ibmpc $$f $(TEMPDIR)/$$f; done
  241.     cd src/readline/doc ; $(MAKE) rluserman.dvi
  242.     cp -p src/readline/doc/rluserman.dvi $(TEMPDIR)/readline.dvi
  243.     to-ibmpc dos/emx-faq.doc $(TEMPDIR)/emx-faq.doc
  244.     cp -p /c:/emx/doc/user.doc $(TEMPDIR)/emx-user.doc || cp -p /c:/emx/doc/emxrt.doc $(TEMPDIR)/emx-user.doc
  245.     cp -p dos/delay.exe $(TEMPDIR)/delay.exe
  246.     cd $(TEMPDIR) ; $(PACK) $(PACKOPT) /tmp/clisp$(PACKEXT) *
  247.     rm -rf $(TEMPDIR)
  248.  
  249. os2-distrib : force
  250.     $(MAKE) os2--distrib PACK="zip" PACKOPT="-r" PACKEXT=".zip"
  251.  
  252. os2--distrib : force
  253.     mkdir $(TEMPDIR)
  254.     cp -p $(DOSDIR)/ANNOUNCE $(DOSDIR)/COPYRIGHT $(DOSDIR)/GNU-GPL $(DOSDIR)/SUMMARY $(DOSDIR)/NEWS $(TEMPDIR)
  255.     cp -p $(DOSDIR)/lisp.exe $(TEMPDIR)
  256.     cp -p $(DOSDIR)/compiled.mem $(TEMPDIR)/lispinit.mem
  257.     cp -p $(DOSDIR)/*.lsp $(TEMPDIR)
  258.     # cp -p $(DOSDIR)/*.fas $(TEMPDIR)
  259.     cp -p $(DOSDIR)/README $(DOSDIR)/clisp.1 $(DOSDIR)/html $(DOSDIR)/impnotes.txt $(DOSDIR)/clreadline.3 $(TEMPDIR)
  260.     from-ibmpc $(TEMPDIR)/clisp.1 os2/clisp.1
  261.     from-ibmpc $(TEMPDIR)/clisp.html os2/clisp.html
  262.     from-ibmpc $(TEMPDIR)/impnotes.txt os2/impnotes.txt
  263.     from-ibmpc $(TEMPDIR)/clreadline.3 os2/clreadline.3
  264.     cd os2 ; groff -Tascii -mandoc clisp.1 > clisp.man
  265.     cd os2 ; groff -Tdvi -mandoc clisp.1 > clisp.dvi
  266.     cd os2 ; groff -Tascii -mandoc clreadline.3 > clreadline.man
  267.     cd os2 ; groff -Tdvi -mandoc clreadline.3 > clreadline.dvi
  268.     to-ibmpc os2/clisp.man $(TEMPDIR)/clisp.man
  269.     cp -p os2/clisp.dvi $(TEMPDIR)/clisp.dvi
  270.     to-ibmpc os2/clreadline.man $(TEMPDIR)/clreadline.man
  271.     cp -p os2/clreadline.dvi $(TEMPDIR)/clreadline.dvi
  272.     cd doc ; for f in *.txt; do to-ibmpc $$f $(TEMPDIR)/$$f; done
  273.     cd src/readline/doc ; $(MAKE) rluserman.dvi
  274.     cp -p src/readline/doc/rluserman.dvi $(TEMPDIR)/readline.dvi
  275.     to-ibmpc dos/emx-faq.doc $(TEMPDIR)/emx-faq.doc
  276.     cp -p /c:/emx/doc/user.doc $(TEMPDIR)/emx-user.doc || cp -p /c:/emx/doc/emxrt.doc $(TEMPDIR)/emx-user.doc
  277.     cp -p /c:/emx/dll/emx.dll $(TEMPDIR)
  278.     cp -p /c:/emx/dll/emxlibc.dll $(TEMPDIR)
  279.     # cp -p /c:/emx/etc/termcap.dat $(TEMPDIR)
  280.     cd $(TEMPDIR) ; $(PACK) $(PACKOPT) /tmp/clisp$(PACKEXT) *
  281.     rm -rf $(TEMPDIR)
  282.  
  283. force :
  284.  
  285.