home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / src / amiga / libg++-2.6.2-src.lha / libg++-2.6.2 / libio / config.shared < prev    next >
Encoding:
Text File  |  1994-12-18  |  12.7 KB  |  403 lines

  1. # Copyright (C) 1993 Free Software Foundation
  2. # This file is part of the GNU IO Library.  This library is free
  3. # software; you can redistribute it and/or modify it under the
  4. # terms of the GNU General Public License as published by the
  5. # Free Software Foundation; either version 2, or (at your option)
  6. # any later version.
  7. # This library is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with GNU CC; see the file COPYING.  If not, write to
  13. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  14.  
  15. # Significant variables:
  16.  
  17. test -z "${TO_TOPDIR}" && TO_TOPDIR=${TOLIBGXX}../
  18. DOING_LIBGXX=${DOING_LIBGXX-false}
  19. THIS_FILE="${srcdir}/${TOLIBGXX}config.shared"
  20.  
  21. echo "# Start of package fragment generated by ${THIS_FILE}."
  22.  
  23. # TOLIBGXX
  24. # MOSTLYCLEAN
  25. # CLEAN
  26. # DISTCLEAN
  27. # REALCLEAN
  28. # SUBDIRS [defaults to (configdirs)]
  29. # INFO_FILES   List of (basenames of) texinfo files
  30. # INFO_SUBDIRS [default: empty]  sub-directories containing documentation
  31.  
  32. rootme=${rootme-`pwd`}
  33. TOPDIR=${TOPDIR='$${rootme}'${TO_TOPDIR}}
  34. echo '#' TOPDIR="${TOPDIR} invsubdir=${invsubdir} subdir=${subdir}"
  35. SUBDIRS=${SUBDIRS-${configdirs}}
  36.  
  37. echo "srcdir = ${srcdir}"
  38. echo "SUBDIRS = ${SUBDIRS}"
  39.  
  40. echo "prefix = ${prefix-/gnu}"
  41. echo "exec_prefix = ${exec_prefix-'${prefix}'}"
  42.  
  43. echo 'bindir = $(exec_prefix)/bin'
  44. echo 'libdir = $(exec_prefix)/lib'
  45.  
  46. echo 'datadir = $(prefix)/lib'
  47. echo 'mandir = $(prefix)/man'
  48. echo 'man1dir = $(mandir)/man1'
  49. echo 'man2dir = $(mandir)/man2'
  50. echo 'man3dir = $(mandir)/man3'
  51. echo 'man4dir = $(mandir)/man4'
  52. echo 'man5dir = $(mandir)/man5'
  53. echo 'man6dir = $(mandir)/man6'
  54. echo 'man7dir = $(mandir)/man7'
  55. echo 'man8dir = $(mandir)/man8'
  56. echo 'man9dir = $(mandir)/man9'
  57.  
  58. echo 'infodir = $(prefix)/info'
  59. echo 'includedir = $(prefix)/include'
  60. echo 'gxx_includedir = $(libdir)/g++-include'
  61. echo 'docdir = $(datadir)/doc'
  62. echo ''
  63. echo 'SHELL = /bin/sh'
  64. echo ''
  65. case "$srcdir" in
  66.  /*) echo 'INSTALL = $(srcdir)'/"${TO_TOPDIR}install.sh -c" ;;
  67.  *)  echo 'INSTALL = $${rootme}$(srcdir)'/"${TO_TOPDIR}install.sh -c" ;;
  68. esac
  69. echo 'INSTALL_PROGRAM = $(INSTALL)'
  70. echo 'INSTALL_DATA = $(INSTALL)'
  71. echo ''
  72. echo 'AR = `if [ -f' ${TOPDIR}'binutils/ar ] ; \'
  73. echo "    then echo ${TOPDIR}binutils/ar ; "'\'
  74. echo '    else echo ar ; fi`'
  75. echo 'AR_FLAGS = rc'
  76. echo 'RANLIB = `if [ -f' ${TOPDIR}'binutils/ranlib ] ; \'
  77. echo '    then echo '${TOPDIR}'binutils/ranlib ; \'
  78. echo '    else echo ranlib ; fi`'
  79. echo 'NM = `if [ -f' ${TOPDIR}'binutils/nm.new ] ; \'
  80. echo '    then echo '${TOPDIR}'binutils/nm.new ; \'
  81. echo '    else echo nm ; fi`'
  82. echo 'NLMCONV = `if [ -f' ${TOPDIR}'binutils/nlmconv ] ; \'
  83. echo '    then echo '${TOPDIR}'binutils/nlmconv ; \'
  84. echo '    else echo nlmconv ; fi`'
  85. echo 'LD = `if [ -f' ${TOPDIR}'ld/ld.new ] ; \'
  86. echo '    then echo '${TOPDIR}'ld/ld.new ; \'
  87. echo '    else echo ld ; fi`'
  88. echo ''
  89. echo 'MAKEINFO = `if [ -f '${TOPDIR}'texinfo/C/makeinfo ] ; \'
  90. echo '    then echo '${TOPDIR}'texinfo/C/makeinfo ; \'
  91. echo '    else echo makeinfo ; fi`'
  92. echo 'TEXIDIR=${srcdir}/'"${TO_TOPDIR}/texinfo"
  93. echo 'TEXI2DVI = TEXINPUTS=${TEXIDIR}:$$TEXINPUTS texi2dvi'
  94. echo ''
  95. echo 'CC = `if [ -f '${TOPDIR}'gcc/xgcc ] ; \'
  96. echo '    then echo '${TOPDIR}'gcc/xgcc -B'${TOPDIR}'gcc/ ; \'
  97. echo '    else echo gcc ; fi`'
  98. echo 'CXX = `if [ -f '${TOPDIR}'gcc/xgcc ] ; \'
  99. echo '    then echo '${TOPDIR}'gcc/xgcc -B'${TOPDIR}'gcc/ ; \'
  100. echo '    else echo gcc ; fi`'
  101. echo ''
  102. # FIXME!!!
  103. if true ; then
  104.   echo 'WRAP_C_INCLUDES ='
  105. else
  106.   echo 'WRAP_C_INCLUDES = -I$(srcdir)'/${TOLIBGXX}g++-include
  107. fi
  108. echo 'CFLAGS = -O2'
  109. echo 'CXXFLAGS = -O2'
  110. echo 'LIBCFLAGS = $(CFLAGS)'
  111. echo 'LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates'
  112.  
  113. if test "${DOING_LIBGXX}" = "true" ; then
  114.   echo "TOLIBGXX = ${TOLIBGXX}"
  115.   echo 'PROTODIR = $(srcdir)'/${TOLIBGXX}src/gen
  116.   echo "LIBS = -L./${TOLIBGXX} -lg++"
  117.   echo "LD_LIBRARY_PATH = ${TOLIBGXX}"
  118.   echo ".EXPORT_ALL_VARIABLES:"
  119.  
  120.   # You can override iostream (e.g. in a site- or host-Makefile fragment) to:
  121.   # iostream (Normal iostream library)
  122.   # old-stream (Old stream library; no longer supported)
  123.   # no-stream (If you don't want iostream to be part of libg++)
  124.   echo 'IO_DIR = ../libio'
  125.   echo '# IO_DIR = no-stream'
  126. fi
  127.  
  128. if [ -z "${ALL}" ] ; then
  129.   if [ -n "${TARGETLIB}" ] ; then
  130.     ALL='$(TARGETLIB)'
  131.     echo "TARGETLIB = ${TARGETLIB}"
  132.   elif [ -n "${TARGETPROG}" ] ; then
  133.     ALL='${TARGETPROG}'
  134.     echo "TARGETPROG = ${TARGETPROG}"
  135.   else
  136.     echo "config error: neither ALL, TARGETLIB or TARGETPROG is defined" 1>&2
  137.   fi
  138. fi
  139.  
  140. echo "all: ${ALL}"
  141. if [ "${SUBDIRS}" != "" ] ; then
  142.   echo '    @rootme=`pwd`/; export rootme; \'
  143.   echo '    $(MAKE) "DODIRS=$(SUBDIRS)" DO=all $(FLAGS_TO_PASS) subdir_do'
  144. fi
  145. echo '.PHONY: all'
  146.  
  147. echo ''
  148.  
  149.  
  150. echo
  151. if [ "${SUBDIRS}" != "" ] ; then
  152.   echo '.PHONY: subdir_do'
  153.   echo 'subdir_do: force'
  154.   echo '    @rootme=`pwd`/; export rootme; \'
  155.   echo '    for i in $(DODIRS); do \'
  156.   echo '        if [ -f  ./$$i/Makefile ] ; then \'
  157.   echo '            echo "cd $$i; make $(DO) ..." ; \'
  158.   echo '            (cd $$i ; $(MAKE) $(FLAGS_TO_PASS) $(DO)) || exit 1 ; \'
  159.   echo '        else true ; fi ; \'
  160.   echo '    done'
  161.   echo ''
  162.   echo '# List of variables to pass to sub-makes.  This should not be needed'
  163.   echo '# by GNU make or Sun make (both of which pass command-line variable'
  164.   echo '# overrides thouh $(MAKE)) but may be needed by older versions.'
  165.   echo ''
  166.   echo 'FLAGS_TO_PASS= \'
  167.   echo '    "INSTALL=$(INSTALL)" \'
  168.   echo '    "INSTALL_DATA=$(INSTALL_DATA)" \'
  169.   echo '    "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \'
  170.   echo '    "prefix=$(prefix)" \'
  171.   echo '    "exec_prefix=$(exec_prefix)" \'
  172.   echo '    "tooldir=$(tooldir)" \'
  173.   echo '    "AR=$(AR)" \'
  174.   echo '    "AR_FLAGS=$(AR_FLAGS)" \'
  175.   echo '    "CC=$(CC)" \'
  176.   echo '    "CXX=$(CXX)" \'
  177.   echo '    "CFLAGS=$(CFLAGS)" \'
  178.   echo '    "CXXFLAGS=$(CXXFLAGS)" \'
  179.   echo '    "RANLIB=$(RANLIB)" \'
  180.   echo '    "LIBCFLAGS=$(LIBCFLAGS)" \'
  181.   echo '    "LIBCXXFLAGS=$(LIBCXXFLAGS)" \'
  182.   echo '    "LOADLIBES=$(LOADLIBES)" \'
  183.   echo '    "LDFLAGS=$(LDFLAGS)" \'
  184.   echo '    "MAKEINFO=$(MAKEINFO)"'
  185. fi
  186.  
  187. echo 'NOSTDINC = -nostdinc++'
  188. if test -n "${CXXINCLUDES}" ; then
  189.   echo "CXXINCLUDES = ${CXXINCLUDES} "'$(NOSTDINC)'
  190. elif test "${DOING_LIBGXX}" = "true" ; then
  191.   echo 'CXXINCLUDES = $(NOSTDINC)'" -I. -I${TO_TOPDIR}libio"' -I$(srcdir) -I$(srcdir)/'"${TOLIBGXX}"'$(IO_DIR) -I$(srcdir)/'"${TOLIBGXX}src"' $(WRAP_C_INCLUDES)'
  192. fi
  193. if test -n "${CINCLUDES}" ; then
  194.   echo "CINCLUDES = ${CINCLUDES}"
  195. elif test "${DOING_LIBGXX}" = "true" ; then
  196.   echo 'CINCLUDES ='
  197. fi
  198.  
  199. if [ "${LIBDIR}" = "yes" ]; then
  200.   echo 'XCFLAGS = $(LIBCFLAGS)'
  201.   echo 'XCXXFLAGS = $(LIBCXXFLAGS)'
  202. else
  203.   echo 'XCFLAGS = $(CFLAGS)'
  204.   echo 'XCXXFLAGS = $(CXXFLAGS)'
  205. fi
  206.  
  207. echo '.SUFFIXES: .o .C .cc'
  208. echo 'COMPILE.c = $(CC) -c $(XCFLAGS) $(CINCLUDES)'
  209. echo '.c.o:'
  210. echo '    $(COMPILE.c) $<'
  211. [ "${TOUCH_ON_COMPILE}" = "yes" ] && echo '    @touch stamp'
  212. echo 'COMPILE.cc = $(CXX) -c $(XCXXFLAGS) $(CXXINCLUDES)'
  213. echo '.C.o:'
  214. echo '    $(COMPILE.cc) $<'
  215. [ "${TOUCH_ON_COMPILE}" = "yes" ] && echo '    @touch stamp'
  216. echo '.cc.o:'
  217. echo '    $(COMPILE.cc) $<'
  218. [ "${TOUCH_ON_COMPILE}" = "yes" ] && echo '    @touch stamp'
  219. echo ''
  220.  
  221. if [ -n "${TARGETLIB}" ] ; then
  222.   echo TARGETLIB = ${TARGETLIB}
  223. fi
  224. if [ -n "${TARGETPROG}" ] ; then
  225.   echo TARGETPROG = ${TARGETPROG}
  226. fi
  227.  
  228. echo ''
  229. echo '.PHONY: install'
  230. echo 'install:'
  231. echo '.PHONY: check'
  232. if [ "${CHECK}" != "check" ] ; then
  233.   echo "check: ${ALL} ${CHECK}"
  234.   if [ "${SUBDIRS}" != "" ] ; then
  235.     echo '    @rootme=`pwd`/; export rootme; \'
  236.     echo '    $(MAKE) "DODIRS=$(SUBDIRS)" DO=check $(FLAGS_TO_PASS) subdir_do'
  237.   fi
  238. fi
  239.  
  240. # Generate rules for documentation (depending on INFO_FILES and INFO_SUBDIRS).
  241.  
  242. echo '.PHONY: info dvi install-info clean-info'
  243.  
  244. # emit the rule for 'info'
  245. if [ -z "${INFO_FILES}" ] ; then
  246.   echo 'info:'
  247. else
  248.   echo info: `for file in ${INFO_FILES} ; do echo $file.info ; done`
  249. fi
  250. if [ "${INFO_SUBDIRS}" != "" ] ; then
  251.   echo '    @rootme=`pwd`/; export rootme; \
  252.     $(MAKE) "DODIRS='${INFO_SUBDIRS}'" DO=info $(FLAGS_TO_PASS) subdir_do'
  253. fi
  254.  
  255. # emit the rule for 'dvi'
  256. if [ -z "${INFO_FILES}" ] ; then
  257.   echo 'dvi:'
  258. else
  259.   echo dvi: `for file in ${INFO_FILES} ; do echo $file.dvi ; done`
  260. fi
  261. if [ "${INFO_SUBDIRS}" != "" ] ; then
  262.   echo '    @rootme=`pwd`/; export rootme; \
  263.     $(MAKE) "DODIRS='${INFO_SUBDIRS}'" DO=dvi $(FLAGS_TO_PASS) subdir_do'
  264. fi
  265.  
  266. # Emit rules for each *.info and *.dvi file
  267. for file in ${INFO_FILES} ; do
  268.   echo ${file}.info: '$(srcdir)'/${file}.texi
  269.   echo '    $(MAKEINFO) -I$(srcdir) -I$(TEXIDIR) $(srcdir)/'${file}.texi -o ${file}.info
  270.   echo ${file}.dvi: '$(srcdir)'/${file}.texi
  271.   echo '    $(TEXI2DVI) $(srcdir)'/${file}.texi
  272.   echo "${file}.ps: ${file}.dvi"
  273.   echo "    dvips ${file} -o"
  274. done
  275.  
  276. # emit the rule for install-info
  277. echo 'install-info:'
  278. if [ -n "${INFO_FILES}" ] ; then
  279.   echo '    -parent=`echo $(infodir)|sed -e' "'"'s@/[^/]*$$@@'"'"'`; \'
  280.   echo '    if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi'
  281.   echo '    -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi'
  282.   echo '    for i in *.info* ; do \'
  283.   echo '      $(INSTALL_DATA) $$i $(infodir)/$$i ; \'
  284.   echo '    done'
  285. fi
  286. if [ "${INFO_SUBDIRS}" != "" ] ; then
  287.   echo '    @rootme=`pwd`/; export rootme; \
  288.     $(MAKE) "DODIRS='${INFO_SUBDIRS}'" DO=install-info $(FLAGS_TO_PASS) subdir_do'
  289. fi
  290.  
  291. # emit clean-info and clean-dvi rules
  292. echo '.PHONY: do-clean-info clean-info do-clean-dvi clean-dvi'
  293. echo do-clean-info:
  294. if [ -n "${INFO_FILES}" ] ; then
  295.   echo '    rm -f *.info*'
  296. fi
  297. echo 'do-clean-dvi:'
  298. if [ -n "${INFO_FILES}" ] ; then
  299.   echo '    rm -f *.dvi *.aux *.cp *.fn* *.ky *.log *.pg *.toc *.tp *.vr'
  300. fi
  301. for type in info dvi ; do
  302.   echo clean-${type}: do-clean-${type}
  303.   if [ "${INFO_SUBDIRS}" != "" ] ; then
  304.     echo '    @rootme=`pwd`/; export rootme; \
  305.     $(MAKE) "DODIRS='${NFO_SUBDIRS}'" DO=clean-'${type} '$(FLAGS_TO_PASS) subdir_do'
  306.   fi
  307. done
  308.  
  309. echo ''
  310.  
  311. echo '.PHONY: boltcc'
  312. echo 'boltcc:'
  313. echo '    rootme=`pwd`/ ; export rootme ; $(MAKE) $(FLAGS_TO_PASS)'
  314. echo ''
  315.  
  316. # Emit clean rules
  317.  
  318. echo ''
  319. echo '# clean rules'
  320.  
  321. MOSTLYCLEAN="${MOSTLYCLEAN-*.o core} `if test -n "${TOUCH_ON_COMPILE}"; then echo stamp; else true; fi`"
  322. CLEAN="${CLEAN-${TARGETPROG} ${TARGETLIB}}"
  323. DISTCLEAN="${DISTCLEAN-config.status Makefile *~ Make.pack}"
  324. REALCLEAN="${REALCLEAN-depend *.info*}"
  325.  
  326.  
  327. echo '.PHONY: mostlyclean clean distclean realclean'
  328. if test -z "${SUBDIRS}" ; then
  329.   echo "mostlyclean: clean-dvi"
  330.   echo "    rm -rf ${MOSTLYCLEAN}"
  331.   echo "clean: clean-dvi"
  332.   echo "    rm -rf ${MOSTLYCLEAN} ${CLEAN}"
  333.   echo "distclean: clean"
  334.   echo "    rm -rf ${DISTCLEAN}"
  335.   echo "realclean: clean clean-info"
  336.   echo "    rm -rf ${DISTCLEAN} ${REALCLEAN}"
  337. else
  338.   echo '.PHONY: do-clean subdir_distclean subdir_realclean'
  339.   echo "mostlyclean: do-clean-dvi"
  340.   echo "    rm -rf ${MOSTLYCLEAN}"
  341.   echo '    @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=mostlyclean subdir_do'
  342.   echo "do-clean: do-clean-dvi"
  343.   echo "    rm -rf ${MOSTLYCLEAN} ${CLEAN}"
  344.   echo "clean: do-clean"
  345.   echo '    @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=clean subdir_do'
  346.   # distclean and realclean are tricky because they remove the Makefile.
  347.   echo "subdir_distclean:"
  348.   echo '    @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=distclean subdir_do'
  349.   echo "distclean: do-clean subdir_distclean"
  350.   echo "    rm -rf ${DISTCLEAN}"
  351.   echo "subdir_realclean:"
  352.   echo '    @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=realclean subdir_do'
  353.   echo "realclean: do-clean subdir_realclean do-clean-info"
  354.   echo "    rm -rf ${DISTCLEAN} ${REALCLEAN}"
  355. fi
  356.  
  357. echo ''
  358. echo '.PHONY: force'
  359. echo 'force:'
  360. echo ''
  361. echo '# with the gnu make, this is done automatically.'
  362. echo ''
  363. echo 'Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)'
  364. echo '    $(SHELL) ./config.status'
  365. echo ''
  366. echo '.NOEXPORT:'
  367. echo 'MAKEOVERRIDES='
  368.  
  369. cat <<"EOF"
  370. DEPEND_SOURCES = ${srcdir}/*.cc ${srcdir}/*.c
  371. depend.new:
  372. # The sed script below attempts to make the depend output portable.
  373. # It cleans up the depenency information generated by cpp.
  374. # It replaces instances of $(srcdir)/ by the string '$(srcdir)/'.
  375. # It removes remain absolute files names (such as /usr/include/stdio.h).
  376. # It the removes lines containing only "\\".
  377. # The awk script removes a continuation marker that is followed by
  378. # a blank line, since that may confuse make.
  379.     echo "# AUTOMATICALLY GENERATED BY 'make depend' - DO NOT EDIT' \
  380.       >depend.new
  381.     gcc -M $(CXXINCLUDES) $(DEPEND_SOURCES) \
  382.     | sed -e 's|$(srcdir)/|$$(srcdir)/|g' \
  383.           -e 's| /[^ ]*[.]h||g' \
  384.           -e '/^[     ]*\\$$/d' -e 's/^[     ]*$$//' \
  385.     | awk 'BEGIN   { prev = "" } \
  386.           /^( )*$$/ { if (prev ~ /\\$$/) \
  387.                         { prev = substr(prev,1,length(prev)-1); next } } \
  388.                     { print prev; prev = $$0 } \
  389.           END { if (prev !~ /^( )*$$/) print prev }' \
  390.     >> depend.new
  391. $(srcdir)/depend:  depend.new
  392.     mv depend.new $(srcdir)/depend
  393. EOF
  394.  
  395. if [ -f ${srcdir}/${subdir}/depend ] ; then
  396.   cat ${srcdir}/${subdir}/depend
  397. fi
  398.  
  399. echo "# End of package fragment generated by ${THIS_FILE}."
  400.