diff options
Diffstat (limited to 'libio/config.shared')
-rw-r--r-- | libio/config.shared | 487 |
1 files changed, 487 insertions, 0 deletions
diff --git a/libio/config.shared b/libio/config.shared new file mode 100644 index 00000000000..8c79350e6f5 --- /dev/null +++ b/libio/config.shared @@ -0,0 +1,487 @@ +# Copyright (C) 1993, 1995, 1997 Free Software Foundation +# +# This file is part of the GNU IO Library. This library is free +# software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU CC; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + +# Significant variables: + +# Note that TO_TOPDIR does *not* include multilib. +test -z "${TO_TOPDIR}" && TO_TOPDIR=${TOLIBGXX}../ +# Native configurations build target libraries in directories at the same +# level as the rest of the tree. Cross configurations build target libraries +# one level deeper. TO_REAL_TOPDIR accounts for this. +# Obviously, TO_REAL_TOPDIR can only be used in the build tree. +if [ "${with_target_subdir}" != "." ] ; then + TO_REAL_TOPDIR="${TO_TOPDIR}../" +else + TO_REAL_TOPDIR="${TO_TOPDIR}" +fi +DOING_LIBGXX=${DOING_LIBGXX-false} +THIS_FILE="${srcdir}/${TOLIBGXX}config.shared" + +echo "# Start of package fragment generated by ${THIS_FILE}." +echo "" + +# Multilib support. +echo 'MULTISRCTOP =' +echo 'MULTIBUILDTOP =' +echo 'MULTIDIRS =' +echo 'MULTISUBDIR =' +echo 'MULTIDO = true' +echo 'MULTICLEAN = true' +echo '' + +# TOLIBGXX +# MOSTLYCLEAN +# CLEAN +# DISTCLEAN +# REALCLEAN +# SUBDIRS [defaults to (configdirs)] +# INFO_FILES List of (basenames of) texinfo files +# INFO_SUBDIRS [default: empty] sub-directories containing documentation + +# ??? This doesn't appear to be used by us or any of our callers. +# Note that all uses in this file are single-quoted. +rootme=${rootme-`pwd`} + +# libg++ uses the convention that $rootme includes a trailing '/'. +# We use that in the definition of TOPDIR. $rootme is either empty +# or an absolute pathname to the current directory (with trailing '/'). +TOPDIR=${TOPDIR-'$${rootme}$(MULTIBUILDTOP)'${TO_REAL_TOPDIR}} +echo '#' TOPDIR="${TOPDIR} invsubdir=${invsubdir} subdir=${subdir}" +SUBDIRS=${SUBDIRS-${configdirs}} +CHECK_SUBDIRS=${CHECK_SUBDIRS-${SUBDIRS}} + +echo "srcdir = ${srcdir}" +echo "SUBDIRS = ${SUBDIRS}" +echo "CHECK_SUBDIRS = ${CHECK_SUBDIRS}" + +echo "prefix = ${prefix-/usr/local}" +echo "exec_prefix = ${exec_prefix-'${prefix}'}" + +echo 'bindir = $(exec_prefix)/bin' +echo 'libdir = $(exec_prefix)/lib' + +echo 'datadir = $(prefix)/lib' +echo 'mandir = $(prefix)/man' +echo 'man1dir = $(mandir)/man1' +echo 'man2dir = $(mandir)/man2' +echo 'man3dir = $(mandir)/man3' +echo 'man4dir = $(mandir)/man4' +echo 'man5dir = $(mandir)/man5' +echo 'man6dir = $(mandir)/man6' +echo 'man7dir = $(mandir)/man7' +echo 'man8dir = $(mandir)/man8' +echo 'man9dir = $(mandir)/man9' + +echo 'infodir = $(prefix)/info' +echo 'includedir = $(prefix)/include' +echo 'gxx_includedir = $(includedir)/g++' +echo 'docdir = $(datadir)/doc' +echo '' +echo 'SHELL = /bin/sh' +echo '' +case "$srcdir" in + /*) echo 'INSTALL = $(srcdir)'/"${TO_TOPDIR}install-sh -c" ;; + .) echo 'INSTALL = $${rootme}'"${with_multisrctop}${TO_REAL_TOPDIR}install-sh -c" ;; + *) echo 'INSTALL = $${rootme}$(srcdir)'/"${TO_TOPDIR}install-sh -c" ;; +esac +echo 'INSTALL_PROGRAM = $(INSTALL)' +echo 'INSTALL_DATA = $(INSTALL)' +echo '' +echo 'AR = `if [ -f' ${TOPDIR}'binutils/ar ] ; \' +echo " then echo ${TOPDIR}binutils/ar ; "'\' +echo ' else echo ar ; fi`' +echo 'AR_FLAGS = rc' +echo 'RANLIB = `if [ -f' ${TOPDIR}'binutils/ranlib ] ; \' +echo ' then echo '${TOPDIR}'binutils/ranlib ; \' +echo ' else echo ranlib ; fi`' +echo 'NM = `if [ -f' ${TOPDIR}'binutils/nm.new ] ; \' +echo ' then echo '${TOPDIR}'binutils/nm.new ; \' +echo ' else echo nm ; fi`' +echo 'NLMCONV = `if [ -f' ${TOPDIR}'binutils/nlmconv ] ; \' +echo ' then echo '${TOPDIR}'binutils/nlmconv ; \' +echo ' else echo nlmconv ; fi`' +echo 'LD = `if [ -f' ${TOPDIR}'ld/ld.new ] ; \' +echo ' then echo '${TOPDIR}'ld/ld.new ; \' +echo ' else echo ld ; fi`' +echo '' +echo 'MAKEINFO = `if [ -f '${TOPDIR}'texinfo/C/makeinfo ] ; \' +echo ' then echo '${TOPDIR}'texinfo/C/makeinfo ; \' +echo ' else echo makeinfo ; fi`' +case "$srcdir" in + .) echo 'TEXIDIR = '"${with_multisrctop}${TO_REAL_TOPDIR}texinfo" ;; + *) echo 'TEXIDIR = $(srcdir)'/"${TO_TOPDIR}texinfo" ;; +esac +echo 'TEXI2DVI = TEXINPUTS=${TEXIDIR}:$$TEXINPUTS texi2dvi' +echo '' +echo 'CC = cc' +echo 'CXX = gcc' +echo '' +# FIXME!!! +if true ; then + echo 'WRAP_C_INCLUDES =' +else + echo 'WRAP_C_INCLUDES = -I$(srcdir)'/${TOLIBGXX}g++-include +fi +echo 'CFLAGS = -g' +echo 'CXXFLAGS = -g -O' +echo 'LIBCFLAGS = $(CFLAGS)' +echo 'LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates' +echo 'PICFLAG =' +if [ "${LIBDIR}" = "yes" ]; then + echo 'PICDIR = stamp-picdir' +else + echo 'PICDIR = ' +fi + +if test "${DOING_LIBGXX}" = "true" ; then + echo "TOLIBGXX = ${TOLIBGXX}" + echo 'PROTODIR = $(srcdir)'/${TOLIBGXX}src/gen + echo "LIBS = -L./${TOLIBGXX} -L./${TOLIBGXX}../libstdc++ -lg++ -lstdc++" + + # You can override iostream (e.g. in a site- or host-Makefile fragment) to: + # iostream (Normal iostream library) + # old-stream (Old stream library; no longer supported) + # no-stream (If you don't want iostream to be part of libg++) + echo 'IO_DIR = ../libio' + echo '# IO_DIR = no-stream' +elif test "${DOING_GPERF}" = "true" ; then + echo "IO_DIR = libio" + echo "TOLIBGXX = ${TOLIBGXX}" + echo "LIBS = -L./${TOLIBGXX} -L./${TOLIBGXX}../libstdc++ -lg++ -lstdc++" +fi + +if [ -z "${ALL}" ] ; then + if [ -n "${TARGETLIB}" ] ; then + ALL='$(TARGETLIB)' + echo "TARGETLIB = ${TARGETLIB}" + elif [ -n "${TARGETPROG}" ] ; then + ALL='${TARGETPROG}' + echo "TARGETPROG = ${TARGETPROG}" + else + echo "config error: neither ALL, TARGETLIB or TARGETPROG is defined" 1>&2 + fi +fi + +ALL='$(PICDIR)'" ${ALL}" + +echo "all: ${ALL} multi-all" +if [ "${SUBDIRS}" != "" ] ; then + echo ' @rootme=`pwd`/; export rootme; \' + echo ' $(MAKE) "DODIRS=$(SUBDIRS)" DO=all $(FLAGS_TO_PASS) subdir_do' +fi +echo '.PHONY: all' +echo '' + +echo '.PHONY: multi-all' +echo 'multi-all:' +echo ' @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all' +echo '' + +echo +if [ "${SUBDIRS}" != "" ] ; then + echo '.PHONY: subdir_do' + echo 'subdir_do: force' + echo ' @rootme=`pwd`/; export rootme; \' + echo ' for i in $(DODIRS); do \' + echo ' if [ -f ./$$i/Makefile ] ; then \' + echo ' echo "cd $$i; make $(DO) ..." ; \' + echo ' (cd $$i ; $(MAKE) $(FLAGS_TO_PASS) $(DO)) || exit 1 ; \' + echo ' else true ; fi ; \' + echo ' done' + echo '' + echo '# List of variables to pass to sub-makes. This should not be needed' + echo '# by GNU make or Sun make (both of which pass command-line variable' + echo '# overrides thouh $(MAKE)) but may be needed by older versions.' + echo '' + echo 'FLAGS_TO_PASS= \' + echo ' "INSTALL=$(INSTALL)" \' + echo ' "INSTALL_DATA=$(INSTALL_DATA)" \' + echo ' "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \' + echo ' "prefix=$(prefix)" \' + echo ' "exec_prefix=$(exec_prefix)" \' + echo ' "tooldir=$(tooldir)" \' + echo ' "AR=$(AR)" \' + echo ' "AR_FLAGS=$(AR_FLAGS)" \' + echo ' "CC=$(CC)" \' + echo ' "CXX=$(CXX)" \' + echo ' "CFLAGS=$(CFLAGS)" \' + echo ' "CXXFLAGS=$(CXXFLAGS)" \' + echo ' "NM=$(NM)" \' + echo ' "RANLIB=$(RANLIB)" \' + echo ' "LIBCFLAGS=$(LIBCFLAGS)" \' + echo ' "LIBCXXFLAGS=$(LIBCXXFLAGS)" \' + echo ' "LOADLIBES=$(LOADLIBES)" \' + echo ' "LDFLAGS=$(LDFLAGS)" \' + echo ' "MAKEINFO=$(MAKEINFO)" \' + echo ' "SHLIB=$(SHLIB)" \' + echo ' "SHCURSES=$(SHCURSES)" \' + echo ' "PICFLAG=$(PICFLAG)" \' + echo ' "RUNTESTFLAGS=$(RUNTESTFLAGS)"' +fi + +echo 'NOSTDINC = -nostdinc++' +if test -n "${XCXXINCLUDES}" ; then + echo "CXXINCLUDES = ${XCXXINCLUDES} "'$(NOSTDINC)' +elif test "${DOING_LIBGXX}" = "true" ; then + echo 'CXXINCLUDES = $(NOSTDINC) -I. -I'"${TO_TOPDIR}libio"' -I$(srcdir) -I$(srcdir)/'"${TOLIBGXX}"'$(IO_DIR) -I$(srcdir)/'"${TOLIBGXX}"'../libstdc++ -I$(srcdir)/'"${TOLIBGXX}src"' $(WRAP_C_INCLUDES)' +fi +if test -n "${XCINCLUDES}" ; then + echo "CINCLUDES = ${XCINCLUDES}" +elif test "${DOING_LIBGXX}" = "true" ; then + echo 'CINCLUDES =' +fi + +if [ "${LIBDIR}" = "yes" ]; then + echo 'XCFLAGS = $(LIBCFLAGS)' + echo 'XCXXFLAGS = $(LIBCXXFLAGS)' +else + echo 'XCFLAGS = $(CFLAGS)' + echo 'XCXXFLAGS = $(CXXFLAGS)' +fi + +echo '.SUFFIXES: .o .C .cc .c' +echo 'COMPILE.c = $(CC) -c $(XCFLAGS) $(CINCLUDES)' +echo '.c.o:' +if [ "${LIBDIR}" = "yes" ]; then +echo ' test -z "$(PICFLAG)" ||\' +echo ' $(COMPILE.c) $(PICFLAG) $< -o pic/$@' +fi +echo ' $(COMPILE.c) $<' +[ "${TOUCH_ON_COMPILE}" = "yes" ] && echo ' @touch stamp' +echo 'COMPILE.cc = $(CXX) -c $(XCXXFLAGS) $(CXXINCLUDES)' +echo '.C.o:' +if [ "${LIBDIR}" = "yes" ]; then +echo ' test -z "$(PICFLAG)" ||\' +echo ' $(COMPILE.cc) $(PICFLAG) $< -o pic/$@' +fi +echo ' $(COMPILE.cc) $<' +[ "${TOUCH_ON_COMPILE}" = "yes" ] && echo ' @touch stamp' +echo '.cc.o:' +if [ "${LIBDIR}" = "yes" ]; then +echo ' test -z "$(PICFLAG)" || \' +echo ' $(COMPILE.cc) $(PICFLAG) $< -o pic/$@' +fi +echo ' $(COMPILE.cc) $<' +[ "${TOUCH_ON_COMPILE}" = "yes" ] && echo ' @touch stamp' +echo '' + +if [ -n "${TARGETLIB}" ] ; then + echo TARGETLIB = ${TARGETLIB} +fi +if [ -n "${TARGETPROG}" ] ; then + echo TARGETPROG = ${TARGETPROG} +fi + +if [ "${LIBDIR}" = "yes" ]; then + echo '' + echo 'stamp-picdir:' + echo ' if [ -n "$(PICFLAG)" ] && [ ! -d pic ]; then \' + echo ' mkdir pic; \' + echo ' else true; fi' + echo ' touch stamp-picdir' +fi + +echo '' +echo '.PHONY: install' +echo 'install:' +echo '.PHONY: check' +if [ "${CHECK}" != "check" ] ; then + echo "check: ${ALL} ${CHECK}" + if [ "${CHECK_SUBDIRS}" != "" ] ; then + echo ' rootme=`pwd`/; export rootme; \' + echo ' SAVE_LLPATH="$${SAVE_LLPATH-$$LD_LIBRARY_PATH}"; export SAVE_LLPATH; \' + echo ' LD_LIBRARY_PATH="$${rootme}${TOLIBGXX}../libstdc++:$${rootme}${TOLIBGXX}../libg++:$$SAVE_LLPATH"; \' + echo ' export LD_LIBRARY_PATH; \' + echo ' $(MAKE) "DODIRS=$(CHECK_SUBDIRS)" DO=check $(FLAGS_TO_PASS) subdir_do' + fi +fi + +# Generate rules for documentation (depending on INFO_FILES and INFO_SUBDIRS). + +echo '.PHONY: info dvi install-info clean-info' + +# emit the rule for 'info' +# (Note that the top-level ../Makefile.in greps for '^info:' when making +# a release (in "make taz"), so don't break that!) +if [ -z "${INFO_FILES}" ] ; then + echo 'info:' +else + echo info: `for file in ${INFO_FILES} ; do echo $file.info ; done` +fi +if [ "${INFO_SUBDIRS}" != "" ] ; then + echo ' @rootme=`pwd`/; export rootme; \ + $(MAKE) "DODIRS='${INFO_SUBDIRS}'" DO=info $(FLAGS_TO_PASS) subdir_do' +fi + +# emit the rule for 'dvi' +if [ -z "${INFO_FILES}" ] ; then + echo 'dvi:' +else + echo dvi: `for file in ${INFO_FILES} ; do echo $file.dvi ; done` +fi +if [ "${INFO_SUBDIRS}" != "" ] ; then + echo ' @rootme=`pwd`/; export rootme; \ + $(MAKE) "DODIRS='${INFO_SUBDIRS}'" DO=dvi $(FLAGS_TO_PASS) subdir_do' +fi + +# Emit rules for each *.info and *.dvi file +for file in ${INFO_FILES} ; do + echo ${file}.info: '$(srcdir)'/${file}.texi + echo ' $(MAKEINFO) -I$(srcdir) -I$(TEXIDIR) $(srcdir)/'${file}.texi -o ${file}.info + echo ${file}.dvi: '$(srcdir)'/${file}.texi + echo ' $(TEXI2DVI) $(srcdir)'/${file}.texi + echo "${file}.ps: ${file}.dvi" + echo " dvips ${file} -o" +done + +# emit the rule for install-info +echo 'install-info:' +if [ -n "${INFO_FILES}" ] ; then + echo ' -parent=`echo $(infodir)|sed -e' "'"'s@/[^/]*$$@@'"'"'`; \' + echo ' if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi' + echo ' -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi' + echo ' for i in *.info* ; do \' + echo ' $(INSTALL_DATA) $$i $(infodir)/$$i ; \' + echo ' done' +fi +if [ "${INFO_SUBDIRS}" != "" ] ; then + echo ' @rootme=`pwd`/; export rootme; \ + $(MAKE) "DODIRS='${INFO_SUBDIRS}'" DO=install-info $(FLAGS_TO_PASS) subdir_do' +fi + +# emit clean-info and clean-dvi rules +echo '.PHONY: do-clean-info clean-info do-clean-dvi clean-dvi' +echo do-clean-info: +if [ -n "${INFO_FILES}" ] ; then + echo ' rm -f *.info*' +fi +echo 'do-clean-dvi:' +if [ -n "${INFO_FILES}" ] ; then + echo ' rm -f *.dvi *.aux *.cp *.cps *.fn* *.ky *.log *.pg *.toc *.tp *.vr' +fi +for type in info dvi ; do + echo clean-${type}: do-clean-${type} + if [ "${INFO_SUBDIRS}" != "" ] ; then + echo ' @rootme=`pwd`/; export rootme; \ + $(MAKE) "DODIRS='${NFO_SUBDIRS}'" DO=clean-'${type} '$(FLAGS_TO_PASS) subdir_do' + fi +done + +echo '' + +echo '.PHONY: boltcc' +echo 'boltcc:' +echo ' rootme=`pwd`/ ; export rootme ; $(MAKE) $(FLAGS_TO_PASS)' +echo '' + +# Emit clean rules + +echo '' +echo '# clean rules' + +MOSTLYCLEAN="${MOSTLYCLEAN-*.o pic stamp-picdir core ${EXTRA_MOSTLYCLEAN}} `if test -n "${TOUCH_ON_COMPILE}"; then echo stamp; else true; fi`" +CLEAN="${CLEAN-${TARGETPROG} ${TARGETLIB}}" +DISTCLEAN="${DISTCLEAN-config.status Makefile *~ Make.pack multilib.out ${EXTRA_DISTCLEAN-}}" +REALCLEAN="${REALCLEAN-depend *.info*}" + + +echo '.PHONY: mostlyclean clean distclean maintainer-clean realclean' +if test -z "${SUBDIRS}" ; then + echo "mostlyclean: clean-dvi" + echo " rm -rf ${MOSTLYCLEAN}" + echo ' @$(MULTICLEAN) multi-clean DO=mostlyclean' + echo "clean: clean-dvi" + echo " rm -rf ${MOSTLYCLEAN} ${CLEAN}" + echo ' @$(MULTICLEAN) multi-clean DO=clean' + echo "distclean: clean" + echo ' @$(MULTICLEAN) multi-clean DO=distclean' + echo " rm -rf ${DISTCLEAN}" + echo "maintainer-clean realclean: clean clean-info" + echo ' @$(MULTICLEAN) multi-clean DO=maintainer-clean' + echo " rm -rf ${DISTCLEAN} ${REALCLEAN}" +else + echo '.PHONY: do-clean subdir_distclean subdir_maintainer_clean' + echo "mostlyclean: do-clean-dvi" + echo " rm -rf ${MOSTLYCLEAN}" + echo ' @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=mostlyclean subdir_do' + echo ' @$(MULTICLEAN) multi-clean DO=mostlyclean' + echo "do-clean: do-clean-dvi" + echo " rm -rf ${MOSTLYCLEAN} ${CLEAN}" + echo "clean: do-clean" + echo ' @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=clean subdir_do' + echo ' @$(MULTICLEAN) multi-clean DO=clean' + # distclean and maintainer-clean are tricky because they remove the Makefile. + echo "subdir_distclean:" + echo ' @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=distclean subdir_do' + echo "distclean: do-clean subdir_distclean" + echo ' @$(MULTICLEAN) multi-clean DO=distclean' + echo " rm -rf ${DISTCLEAN}" + echo "subdir_maintainer_clean:" + echo ' @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=maintainer-clean subdir_do' + echo "maintainer-clean realclean: do-clean subdir_maintainer_clean do-clean-info" + echo ' @$(MULTICLEAN) multi-clean DO=maintainer-clean' + echo " rm -rf ${DISTCLEAN} ${REALCLEAN}" +fi + +echo '' +echo '.PHONY: force' +echo 'force:' +echo '' +echo '# with the gnu make, this is done automatically.' +echo '' +echo 'Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)' +echo ' $(SHELL) ./config.status' +echo '' +echo '.NOEXPORT:' +echo 'MAKEOVERRIDES=' + +cat <<"EOF" +DEPEND_SOURCES = ${srcdir}/*.cc ${srcdir}/*.c +depend.new: +# The sed script below attempts to make the depend output portable. +# It cleans up the depenency information generated by cpp. +# It replaces instances of $(srcdir)/ by the string '$(srcdir)/'. +# It removes remaining absolute files names (such as /usr/include/stdio.h). +# It removes lines containing only "\\". +# It inserts '$(MULTISRCTOP)' in '$(srcdir)/..'. +# In order to support SunOS VPATH, $(srcdir)/[a-z]*.{c,cc} is replaced with +# [a-z]*.{c,cc} (the directory part is removed). +# The awk script removes a continuation marker that is followed by +# a blank line, since that may confuse make. + echo "# AUTOMATICALLY GENERATED BY 'make depend' - DO NOT EDIT" \ + >depend.new + $(CXX) -M $(CXXINCLUDES) $(DEPEND_SOURCES) \ + | sed -e 's|$(srcdir)/|$$(srcdir)/|g' \ + -e 's| /[^ ]*||g' \ + -e '/^[ ]*\\$$/d' -e 's/^[ ]*$$//' \ + | sed -e 's|$$(srcdir)/[.][.]|$$(srcdir)/$$(MULTISRCTOP)..|g' \ + -e 's|$$(srcdir)/\([^/]*[.]c\)|\1|' \ + | awk 'BEGIN { prev = "" } \ + /^( )*$$/ { if (prev ~ /\\$$/) \ + { prev = substr(prev,1,length(prev)-1); next } } \ + { print prev; prev = $$0 } \ + END { if (prev !~ /^( )*$$/) print prev }' \ + >> depend.new +$(srcdir)/depend: depend.new + mv depend.new $(srcdir)/depend +EOF + +if [ -f ${srcdir}/${subdir}/depend ] ; then + cat ${srcdir}/${subdir}/depend +fi + +echo "# End of package fragment generated by ${THIS_FILE}." |