home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / libg++-2.7.1-base.tgz / libg++-2.7.1-src.tar / fsf / libg++ / libio / config.shared < prev    next >
Text File  |  1995-11-12  |  15KB  |  461 lines

  1. # Copyright (C) 1993, 1995 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. # Note that TO_TOPDIR does *not* include multilib.
  18. test -z "${TO_TOPDIR}" && TO_TOPDIR=${TOLIBGXX}../
  19. DOING_LIBGXX=${DOING_LIBGXX-false}
  20. THIS_FILE="${srcdir}/${TOLIBGXX}config.shared"
  21.  
  22. echo "# Start of package fragment generated by ${THIS_FILE}."
  23. echo ""
  24.  
  25. # Multilib support.
  26. echo 'MULTITOP = .'
  27. echo 'MULTIDIRS ='
  28. echo 'MULTISUBDIR ='
  29. echo 'MULTIDO = true'
  30. echo 'MULTICLEAN = true'
  31. echo ''
  32.  
  33. # TOLIBGXX
  34. # MOSTLYCLEAN
  35. # CLEAN
  36. # DISTCLEAN
  37. # REALCLEAN
  38. # SUBDIRS [defaults to (configdirs)]
  39. # INFO_FILES   List of (basenames of) texinfo files
  40. # INFO_SUBDIRS [default: empty]  sub-directories containing documentation
  41.  
  42. # ??? This doesn't appear to be used by us or any of our callers.
  43. rootme=${rootme-`pwd`}
  44.  
  45. # libg++ uses the convention that $rootme includes a trailing '/'.
  46. # We use that in the definition of TOPDIR.  $rootme is either empty
  47. # or an absolute pathname to the current directory (with trailing '/').
  48. TOPDIR=${TOPDIR='$${rootme}$(MULTITOP)/'${TO_TOPDIR}}
  49. echo '#' TOPDIR="${TOPDIR} invsubdir=${invsubdir} subdir=${subdir}"
  50. SUBDIRS=${SUBDIRS-${configdirs}}
  51.  
  52. echo "srcdir = ${srcdir}"
  53. echo "SUBDIRS = ${SUBDIRS}"
  54.  
  55. echo "prefix = ${prefix-/usr/local}"
  56. echo "exec_prefix = ${exec_prefix-'${prefix}'}"
  57.  
  58. echo 'bindir = $(exec_prefix)/bin'
  59. echo 'libdir = $(exec_prefix)/lib'
  60.  
  61. echo 'datadir = $(prefix)/lib'
  62. echo 'mandir = $(prefix)/man'
  63. echo 'man1dir = $(mandir)/man1'
  64. echo 'man2dir = $(mandir)/man2'
  65. echo 'man3dir = $(mandir)/man3'
  66. echo 'man4dir = $(mandir)/man4'
  67. echo 'man5dir = $(mandir)/man5'
  68. echo 'man6dir = $(mandir)/man6'
  69. echo 'man7dir = $(mandir)/man7'
  70. echo 'man8dir = $(mandir)/man8'
  71. echo 'man9dir = $(mandir)/man9'
  72.  
  73. echo 'infodir = $(prefix)/info'
  74. echo 'includedir = $(prefix)/include'
  75. echo 'gxx_includedir = $(libdir)/g++-include'
  76. echo 'docdir = $(datadir)/doc'
  77. echo ''
  78. echo 'SHELL = /bin/sh'
  79. echo ''
  80. case "$srcdir" in
  81.  /*) echo 'INSTALL = $(srcdir)'/"${TO_TOPDIR}install.sh -c" ;;
  82.  *)  echo 'INSTALL = $${rootme}$(srcdir)'/"${TO_TOPDIR}install.sh -c" ;;
  83. esac
  84. echo 'INSTALL_PROGRAM = $(INSTALL)'
  85. echo 'INSTALL_DATA = $(INSTALL)'
  86. echo ''
  87. echo 'AR = `if [ -f' ${TOPDIR}'binutils/ar ] ; \'
  88. echo "    then echo ${TOPDIR}binutils/ar ; "'\'
  89. echo '    else echo ar ; fi`'
  90. echo 'AR_FLAGS = rc'
  91. echo 'RANLIB = `if [ -f' ${TOPDIR}'binutils/ranlib ] ; \'
  92. echo '    then echo '${TOPDIR}'binutils/ranlib ; \'
  93. echo '    else echo ranlib ; fi`'
  94. echo 'NM = `if [ -f' ${TOPDIR}'binutils/nm.new ] ; \'
  95. echo '    then echo '${TOPDIR}'binutils/nm.new ; \'
  96. echo '    else echo nm ; fi`'
  97. echo 'NLMCONV = `if [ -f' ${TOPDIR}'binutils/nlmconv ] ; \'
  98. echo '    then echo '${TOPDIR}'binutils/nlmconv ; \'
  99. echo '    else echo nlmconv ; fi`'
  100. echo 'LD = `if [ -f' ${TOPDIR}'ld/ld.new ] ; \'
  101. echo '    then echo '${TOPDIR}'ld/ld.new ; \'
  102. echo '    else echo ld ; fi`'
  103. echo ''
  104. echo 'MAKEINFO = `if [ -f '${TOPDIR}'texinfo/C/makeinfo ] ; \'
  105. echo '    then echo '${TOPDIR}'texinfo/C/makeinfo ; \'
  106. echo '    else echo makeinfo ; fi`'
  107. echo 'TEXIDIR=${srcdir}/'"${TO_TOPDIR}/texinfo"
  108. echo 'TEXI2DVI = TEXINPUTS=${TEXIDIR}:$$TEXINPUTS texi2dvi'
  109. echo ''
  110. echo 'CC = cc'
  111. echo 'CXX = g++ -O'
  112. echo ''
  113. # FIXME!!!
  114. if true ; then
  115.   echo 'WRAP_C_INCLUDES ='
  116. else
  117.   echo 'WRAP_C_INCLUDES = -I$(srcdir)'/${TOLIBGXX}g++-include
  118. fi
  119. echo 'CFLAGS = -g'
  120. echo 'CXXFLAGS = -g -O3'
  121. echo 'LIBCFLAGS = $(CFLAGS)'
  122. echo 'LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates'
  123. echo 'PICFLAG ='
  124. if [ "${LIBDIR}" = "yes" ]; then
  125.   echo 'PICDIR = stamp-picdir'
  126. else
  127.   echo 'PICDIR = '
  128. fi
  129.  
  130. if test "${DOING_LIBGXX}" = "true" ; then
  131.   echo "TOLIBGXX = ${TOLIBGXX}"
  132.   echo 'PROTODIR = $(srcdir)'/${TOLIBGXX}src/gen
  133.   echo "LIBS = -L./${TOLIBGXX} -L./"'$(MULTITOP)'"/${TOLIBGXX}../libstdc++ -lg++ -lstdc++"
  134.  
  135.   # You can override iostream (e.g. in a site- or host-Makefile fragment) to:
  136.   # iostream (Normal iostream library)
  137.   # old-stream (Old stream library; no longer supported)
  138.   # no-stream (If you don't want iostream to be part of libg++)
  139.   echo 'IO_DIR = ../libio'
  140.   echo '# IO_DIR = no-stream'
  141. fi
  142.  
  143. if [ -z "${ALL}" ] ; then
  144.   if [ -n "${TARGETLIB}" ] ; then
  145.     ALL='$(TARGETLIB)'
  146.     echo "TARGETLIB = ${TARGETLIB}"
  147.   elif [ -n "${TARGETPROG}" ] ; then
  148.     ALL='${TARGETPROG}'
  149.     echo "TARGETPROG = ${TARGETPROG}"
  150.   else
  151.     echo "config error: neither ALL, TARGETLIB or TARGETPROG is defined" 1>&2
  152.   fi
  153. fi
  154.  
  155. ALL='$(PICDIR)'" ${ALL}"
  156.  
  157. echo "all: ${ALL} multi-all"
  158. if [ "${SUBDIRS}" != "" ] ; then
  159.   echo '    @rootme=`pwd`/; export rootme; \'
  160.   echo '    $(MAKE) "DODIRS=$(SUBDIRS)" DO=all $(FLAGS_TO_PASS) subdir_do'
  161. fi
  162. echo '.PHONY: all'
  163. echo ''
  164.  
  165. echo '.PHONY: multi-all'
  166. echo 'multi-all:'
  167. echo '    @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all'
  168. echo ''
  169.  
  170. echo
  171. if [ "${SUBDIRS}" != "" ] ; then
  172.   echo '.PHONY: subdir_do'
  173.   echo 'subdir_do: force'
  174.   echo '    @rootme=`pwd`/; export rootme; \'
  175.   echo '    for i in $(DODIRS); do \'
  176.   echo '        if [ -f  ./$$i/Makefile ] ; then \'
  177.   echo '            echo "cd $$i; make $(DO) ..." ; \'
  178.   echo '            (cd $$i ; $(MAKE) $(FLAGS_TO_PASS) $(DO)) || exit 1 ; \'
  179.   echo '        else true ; fi ; \'
  180.   echo '    done'
  181.   echo ''
  182.   echo '# List of variables to pass to sub-makes.  This should not be needed'
  183.   echo '# by GNU make or Sun make (both of which pass command-line variable'
  184.   echo '# overrides thouh $(MAKE)) but may be needed by older versions.'
  185.   echo ''
  186.   echo 'FLAGS_TO_PASS= \'
  187.   echo '    "INSTALL=$(INSTALL)" \'
  188.   echo '    "INSTALL_DATA=$(INSTALL_DATA)" \'
  189.   echo '    "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \'
  190.   echo '    "prefix=$(prefix)" \'
  191.   echo '    "exec_prefix=$(exec_prefix)" \'
  192.   echo '    "tooldir=$(tooldir)" \'
  193.   echo '    "AR=$(AR)" \'
  194.   echo '    "AR_FLAGS=$(AR_FLAGS)" \'
  195.   echo '    "CC=$(CC)" \'
  196.   echo '    "CXX=$(CXX)" \'
  197.   echo '    "CFLAGS=$(CFLAGS)" \'
  198.   echo '    "CXXFLAGS=$(CXXFLAGS)" \'
  199.   echo '    "RANLIB=$(RANLIB)" \'
  200.   echo '    "LIBCFLAGS=$(LIBCFLAGS)" \'
  201.   echo '    "LIBCXXFLAGS=$(LIBCXXFLAGS)" \'
  202.   echo '    "LOADLIBES=$(LOADLIBES)" \'
  203.   echo '    "LDFLAGS=$(LDFLAGS)" \'
  204.   echo '    "MAKEINFO=$(MAKEINFO)" \'
  205.   echo '    "PICFLAG=$(PICFLAG)"'
  206. fi
  207.  
  208. echo 'NOSTDINC = -nostdinc++'
  209. if test -n "${XCXXINCLUDES}" ; then
  210.   echo "CXXINCLUDES = ${XCXXINCLUDES} "'$(NOSTDINC)'
  211. elif test "${DOING_LIBGXX}" = "true" ; then
  212.   echo 'CXXINCLUDES = $(NOSTDINC) -I. -I$(MULTITOP)/'"${TO_TOPDIR}libio"' -I$(srcdir) -I$(srcdir)/'"${TOLIBGXX}"'$(IO_DIR) -I$(srcdir)/'"${TOLIBGXX}"'../libstdc++ -I$(srcdir)/'"${TOLIBGXX}src"' $(WRAP_C_INCLUDES)'
  213. fi
  214. if test -n "${XCINCLUDES}" ; then
  215.   echo "CINCLUDES = ${XCINCLUDES}"
  216. elif test "${DOING_LIBGXX}" = "true" ; then
  217.   echo 'CINCLUDES ='
  218. fi
  219.  
  220. if [ "${LIBDIR}" = "yes" ]; then
  221.   echo 'XCFLAGS = $(LIBCFLAGS)'
  222.   echo 'XCXXFLAGS = $(LIBCXXFLAGS)'
  223. else
  224.   echo 'XCFLAGS = $(CFLAGS)'
  225.   echo 'XCXXFLAGS = $(CXXFLAGS)'
  226. fi
  227.  
  228. echo '.SUFFIXES: .o .C .cc .c'
  229. echo 'COMPILE.c = $(CC) -c $(XCFLAGS) $(CINCLUDES)'
  230. echo '.c.o:'
  231. if [ "${LIBDIR}" = "yes" ]; then
  232. echo '    [ -z "$(PICFLAG)" ] ||\'
  233. echo '      $(COMPILE.c) $(PICFLAG) $< -o pic/$@'
  234. fi
  235. echo '    $(COMPILE.c) $<'
  236. [ "${TOUCH_ON_COMPILE}" = "yes" ] && echo '    @touch stamp'
  237. echo 'COMPILE.cc = $(CXX) -c $(XCXXFLAGS) $(CXXINCLUDES)'
  238. echo '.C.o:'
  239. if [ "${LIBDIR}" = "yes" ]; then
  240. echo '    [ -z "$(PICFLAG)" ] ||\'
  241. echo '      $(COMPILE.cc) $(PICFLAG) $< -o pic/$@'
  242. fi
  243. echo '    $(COMPILE.cc) $<'
  244. [ "${TOUCH_ON_COMPILE}" = "yes" ] && echo '    @touch stamp'
  245. echo '.cc.o:'
  246. if [ "${LIBDIR}" = "yes" ]; then
  247. echo '    [ -z "$(PICFLAG)" ] || \'
  248. echo '      $(COMPILE.cc) $(PICFLAG) $< -o pic/$@'
  249. fi
  250. echo '    $(COMPILE.cc) $<'
  251. [ "${TOUCH_ON_COMPILE}" = "yes" ] && echo '    @touch stamp'
  252. echo ''
  253.  
  254. if [ -n "${TARGETLIB}" ] ; then
  255.   echo TARGETLIB = ${TARGETLIB}
  256. fi
  257. if [ -n "${TARGETPROG}" ] ; then
  258.   echo TARGETPROG = ${TARGETPROG}
  259. fi
  260.  
  261. if [ "${LIBDIR}" = "yes" ]; then
  262.   echo ''
  263.   echo 'stamp-picdir:'
  264.   echo '    if [ -n "$(PICFLAG)" ] && [ ! -d pic ]; then \'
  265.   echo '      mkdir pic; \'
  266.   echo '    else true; fi'
  267.   echo '    touch stamp-picdir'
  268. fi
  269.  
  270. echo ''
  271. echo '.PHONY: install'
  272. echo 'install:'
  273. echo '.PHONY: check'
  274. if [ "${CHECK}" != "check" ] ; then
  275.   echo "check: ${ALL} ${CHECK}"
  276.   if [ "${SUBDIRS}" != "" ] ; then
  277.     echo '    rootme=`pwd`/; export rootme; \'
  278.     echo '    SAVE_LLPATH="$${SAVE_LLPATH-$$LD_LIBRARY_PATH}"; export SAVE_LLPATH; \'
  279.     echo '    LD_LIBRARY_PATH="$${rootme}${TOLIBGXX}../libstdc++:$${rootme}${TOLIBGXX}../libg++:$$SAVE_LLPATH"; \'
  280.     echo '    export LD_LIBRARY_PATH; \'
  281.     echo '    $(MAKE) "DODIRS=$(SUBDIRS)" DO=check $(FLAGS_TO_PASS) subdir_do'
  282.   fi
  283. fi
  284.  
  285. # Generate rules for documentation (depending on INFO_FILES and INFO_SUBDIRS).
  286.  
  287. echo '.PHONY: info dvi install-info clean-info'
  288.  
  289. # emit the rule for 'info'
  290. # (Note that the top-level ../Makefile.in greps for '^info:' when making
  291. # a release (in "make taz"), so don't break that!)
  292. if [ -z "${INFO_FILES}" ] ; then
  293.   echo 'info:'
  294. else
  295.   echo info: `for file in ${INFO_FILES} ; do echo $file.info ; done`
  296. fi
  297. if [ "${INFO_SUBDIRS}" != "" ] ; then
  298.   echo '    @rootme=`pwd`/; export rootme; \
  299.     $(MAKE) "DODIRS='${INFO_SUBDIRS}'" DO=info $(FLAGS_TO_PASS) subdir_do'
  300. fi
  301.  
  302. # emit the rule for 'dvi'
  303. if [ -z "${INFO_FILES}" ] ; then
  304.   echo 'dvi:'
  305. else
  306.   echo dvi: `for file in ${INFO_FILES} ; do echo $file.dvi ; done`
  307. fi
  308. if [ "${INFO_SUBDIRS}" != "" ] ; then
  309.   echo '    @rootme=`pwd`/; export rootme; \
  310.     $(MAKE) "DODIRS='${INFO_SUBDIRS}'" DO=dvi $(FLAGS_TO_PASS) subdir_do'
  311. fi
  312.  
  313. # Emit rules for each *.info and *.dvi file
  314. for file in ${INFO_FILES} ; do
  315.   echo ${file}.info: '$(srcdir)'/${file}.texi
  316.   echo '    $(MAKEINFO) -I$(srcdir) -I$(TEXIDIR) $(srcdir)/'${file}.texi -o ${file}.info
  317.   echo ${file}.dvi: '$(srcdir)'/${file}.texi
  318.   echo '    $(TEXI2DVI) $(srcdir)'/${file}.texi
  319.   echo "${file}.ps: ${file}.dvi"
  320.   echo "    dvips ${file} -o"
  321. done
  322.  
  323. # emit the rule for install-info
  324. echo 'install-info:'
  325. if [ -n "${INFO_FILES}" ] ; then
  326.   echo '    -parent=`echo $(infodir)|sed -e' "'"'s@/[^/]*$$@@'"'"'`; \'
  327.   echo '    if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi'
  328.   echo '    -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi'
  329.   echo '    for i in *.info* ; do \'
  330.   echo '      $(INSTALL_DATA) $$i $(infodir)/$$i ; \'
  331.   echo '    done'
  332. fi
  333. if [ "${INFO_SUBDIRS}" != "" ] ; then
  334.   echo '    @rootme=`pwd`/; export rootme; \
  335.     $(MAKE) "DODIRS='${INFO_SUBDIRS}'" DO=install-info $(FLAGS_TO_PASS) subdir_do'
  336. fi
  337.  
  338. # emit clean-info and clean-dvi rules
  339. echo '.PHONY: do-clean-info clean-info do-clean-dvi clean-dvi'
  340. echo do-clean-info:
  341. if [ -n "${INFO_FILES}" ] ; then
  342.   echo '    rm -f *.info*'
  343. fi
  344. echo 'do-clean-dvi:'
  345. if [ -n "${INFO_FILES}" ] ; then
  346.   echo '    rm -f *.dvi *.aux *.cp *.cps *.fn* *.ky *.log *.pg *.toc *.tp *.vr'
  347. fi
  348. for type in info dvi ; do
  349.   echo clean-${type}: do-clean-${type}
  350.   if [ "${INFO_SUBDIRS}" != "" ] ; then
  351.     echo '    @rootme=`pwd`/; export rootme; \
  352.     $(MAKE) "DODIRS='${NFO_SUBDIRS}'" DO=clean-'${type} '$(FLAGS_TO_PASS) subdir_do'
  353.   fi
  354. done
  355.  
  356. echo ''
  357.  
  358. echo '.PHONY: boltcc'
  359. echo 'boltcc:'
  360. echo '    rootme=`pwd`/ ; export rootme ; $(MAKE) $(FLAGS_TO_PASS)'
  361. echo ''
  362.  
  363. # Emit clean rules
  364.  
  365. echo ''
  366. echo '# clean rules'
  367.  
  368. MOSTLYCLEAN="${MOSTLYCLEAN-*.o pic stamp-picdir core} `if test -n "${TOUCH_ON_COMPILE}"; then echo stamp; else true; fi`"
  369. CLEAN="${CLEAN-${TARGETPROG} ${TARGETLIB}}"
  370. DISTCLEAN="${DISTCLEAN-config.status Makefile *~ Make.pack ${EXTRA_DISTCLEAN-}}"
  371. REALCLEAN="${REALCLEAN-depend *.info*}"
  372.  
  373.  
  374. echo '.PHONY: mostlyclean clean distclean maintainer-clean realclean'
  375. if test -z "${SUBDIRS}" ; then
  376.   echo "mostlyclean: clean-dvi"
  377.   echo "    rm -rf ${MOSTLYCLEAN}"
  378.   echo '    @$(MULTICLEAN) multi-clean DO=mostlyclean'
  379.   echo "clean: clean-dvi"
  380.   echo "    rm -rf ${MOSTLYCLEAN} ${CLEAN}"
  381.   echo '    @$(MULTICLEAN) multi-clean DO=clean'
  382.   echo "distclean: clean"
  383.   echo '    @$(MULTICLEAN) multi-clean DO=distclean'
  384.   echo "    rm -rf ${DISTCLEAN}"
  385.   echo "maintainer-clean realclean: clean clean-info"
  386.   echo '    @$(MULTICLEAN) multi-clean DO=maintainer-clean'
  387.   echo "    rm -rf ${DISTCLEAN} ${REALCLEAN}"
  388. else
  389.   echo '.PHONY: do-clean subdir_distclean subdir_maintainer_clean'
  390.   echo "mostlyclean: do-clean-dvi"
  391.   echo "    rm -rf ${MOSTLYCLEAN}"
  392.   echo '    @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=mostlyclean subdir_do'
  393.   echo '    @$(MULTICLEAN) multi-clean DO=mostlyclean'
  394.   echo "do-clean: do-clean-dvi"
  395.   echo "    rm -rf ${MOSTLYCLEAN} ${CLEAN}"
  396.   echo "clean: do-clean"
  397.   echo '    @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=clean subdir_do'
  398.   echo '    @$(MULTICLEAN) multi-clean DO=clean'
  399.   # distclean and maintainer-clean are tricky because they remove the Makefile.
  400.   echo "subdir_distclean:"
  401.   echo '    @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=distclean subdir_do'
  402.   echo "distclean: do-clean subdir_distclean"
  403.   echo '    @$(MULTICLEAN) multi-clean DO=distclean'
  404.   echo "    rm -rf ${DISTCLEAN}"
  405.   echo "subdir_maintainer_clean:"
  406.   echo '    @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=maintainer-clean subdir_do'
  407.   echo "maintainer-clean realclean: do-clean subdir_maintainer_clean do-clean-info"
  408.   echo '    @$(MULTICLEAN) multi-clean DO=maintainer-clean'
  409.   echo "    rm -rf ${DISTCLEAN} ${REALCLEAN}"
  410. fi
  411.  
  412. echo ''
  413. echo '.PHONY: force'
  414. echo 'force:'
  415. echo ''
  416. echo '# with the gnu make, this is done automatically.'
  417. echo ''
  418. echo 'Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)'
  419. echo '    $(SHELL) ./config.status'
  420. echo ''
  421. echo '.NOEXPORT:'
  422. echo 'MAKEOVERRIDES='
  423.  
  424. cat <<"EOF"
  425. DEPEND_SOURCES = ${srcdir}/*.cc ${srcdir}/*.c
  426. depend.new:
  427. # The sed script below attempts to make the depend output portable.
  428. # It cleans up the depenency information generated by cpp.
  429. # It replaces instances of $(srcdir)/ by the string '$(srcdir)/'.
  430. # It removes remaining absolute files names (such as /usr/include/stdio.h).
  431. # It the removes lines containing only "\\".
  432. # It prepends '$(MULTITOP)/' to relative pathnames to other libg++ dirs.
  433. # The awk script removes a continuation marker that is followed by
  434. # a blank line, since that may confuse make.
  435.     echo "# AUTOMATICALLY GENERATED BY 'make depend' - DO NOT EDIT" \
  436.       >depend.new
  437.     gcc -M $(CXXINCLUDES) $(DEPEND_SOURCES) \
  438.     | sed -e 's|$(srcdir)/|$$(srcdir)/|g' \
  439.           -e 's| /[^ ]*[.]h||g' \
  440.           -e 's| [.]\([^ ]*/libio/[^ ]*[.]h\)| $$(MULTITOP)/.\1|g' \
  441.           -e 's| [.]\([^ ]*/libstdc++/[^ ]*[.]h\)| $$(MULTITOP)/.\1|g' \
  442.           -e '/^[     ]*\\$$/d' -e 's/^[     ]*$$//' \
  443.     | awk 'BEGIN   { prev = "" } \
  444.           /^( )*$$/ { if (prev ~ /\\$$/) \
  445.                         { prev = substr(prev,1,length(prev)-1); next } } \
  446.                     { print prev; prev = $$0 } \
  447.           END { if (prev !~ /^( )*$$/) print prev }' \
  448.     >> depend.new
  449. $(srcdir)/depend:  depend.new
  450.     mv depend.new $(srcdir)/depend
  451. EOF
  452.  
  453. if [ -f ${srcdir}/${subdir}/depend ] ; then
  454.   cat ${srcdir}/${subdir}/depend
  455. fi
  456.  
  457. echo "# End of package fragment generated by ${THIS_FILE}."
  458.