1 # Copyright (C) 1993, 1995, 1997, 1998 Free Software Foundation
3 # This file is part of the GNU IO Library. This library is free
4 # software; you can redistribute it and/or modify it under the
5 # terms of the GNU General Public License as published by the
6 # Free Software Foundation; either version 2, or (at your option)
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with GNU CC; see the file COPYING. If not, write to
16 # the Free Software Foundation, 59 Temple Place - Suite 330,
17 # Boston, MA 02111-1307, USA. */
19 # File descriptor usage:
20 # 1: All macros which need to be re-definable by any target fragments
21 # 2: All generic rules; especially those which use re-defined macros, e.g. _G_CONFIG_H!
23 # Significant variables:
25 # Note that TO_TOPDIR does *not* include multilib.
26 test -z "${TO_TOPDIR}" && TO_TOPDIR=${TOLIBGXX}../
27 # Native configurations build target libraries in directories at the same
28 # level as the rest of the tree. Cross configurations build target libraries
29 # one level deeper. TO_REAL_TOPDIR accounts for this.
30 # Obviously, TO_REAL_TOPDIR can only be used in the build tree.
31 if [ "${with_target_subdir}" != "." ] ; then
32 TO_REAL_TOPDIR="${TO_TOPDIR}../"
34 TO_REAL_TOPDIR="${TO_TOPDIR}"
36 DOING_LIBGXX=${DOING_LIBGXX-false}
37 THIS_FILE="${srcdir}/${TOLIBIO}config.shared"
39 echo "# Start of package fragment generated by ${THIS_FILE}."
41 echo >&2 "# Start of package rules fragment generated by ${THIS_FILE}."
46 echo 'MULTIBUILDTOP ='
50 echo 'MULTICLEAN = true'
58 # SUBDIRS [defaults to (configdirs)]
59 # INFO_FILES List of (basenames of) texinfo files
60 # INFO_SUBDIRS [default: empty] sub-directories containing documentation
62 # ??? This doesn't appear to be used by us or any of our callers.
63 # Note that all uses in this file are single-quoted.
64 rootme=${rootme-`pwd`}
66 # libg++ uses the convention that $rootme includes a trailing '/'.
67 # We use that in the definition of TOPDIR. $rootme is either empty
68 # or an absolute pathname to the current directory (with trailing '/').
69 TOPDIR=${TOPDIR-'$${rootme}$(MULTIBUILDTOP)'${TO_REAL_TOPDIR}}
70 echo '#' TOPDIR="${TOPDIR} invsubdir=${invsubdir} subdir=${subdir}"
71 SUBDIRS=${SUBDIRS-${configdirs}}
72 CHECK_SUBDIRS=${CHECK_SUBDIRS-${SUBDIRS}}
74 echo "srcdir = ${srcdir}"
75 echo "SUBDIRS = ${SUBDIRS}"
76 echo "CHECK_SUBDIRS = ${CHECK_SUBDIRS}"
78 echo "prefix = ${prefix-/usr/local}"
79 echo "exec_prefix = ${exec_prefix-'${prefix}'}"
81 echo 'bindir = $(exec_prefix)/bin'
82 echo 'libdir = $(exec_prefix)/lib'
83 echo 'libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)'
85 echo 'datadir = $(prefix)/lib'
86 echo 'mandir = $(prefix)/man'
87 echo 'man1dir = $(mandir)/man1'
88 echo 'man2dir = $(mandir)/man2'
89 echo 'man3dir = $(mandir)/man3'
90 echo 'man4dir = $(mandir)/man4'
91 echo 'man5dir = $(mandir)/man5'
92 echo 'man6dir = $(mandir)/man6'
93 echo 'man7dir = $(mandir)/man7'
94 echo 'man8dir = $(mandir)/man8'
95 echo 'man9dir = $(mandir)/man9'
97 echo 'infodir = $(prefix)/info'
98 echo 'includedir = $(prefix)/include'
99 echo 'docdir = $(datadir)/doc'
101 echo 'SHELL = /bin/sh'
104 /*) echo 'INSTALL = $(srcdir)'/"${TO_TOPDIR}install-sh -c" ;;
105 .) echo 'INSTALL = $${rootme}'"${with_multisrctop}${TO_REAL_TOPDIR}install-sh -c" ;;
106 *) echo 'INSTALL = $${rootme}$(srcdir)'/"${TO_TOPDIR}install-sh -c" ;;
108 echo 'INSTALL_PROGRAM = $(INSTALL)'
109 echo 'INSTALL_DATA = $(INSTALL)'
111 echo 'AR = `if [ -f' ${TOPDIR}'binutils/ar ] ; \'
112 echo " then echo ${TOPDIR}binutils/ar ; "'\'
113 echo ' else echo ar ; fi`'
115 echo 'RANLIB = `if [ -f' ${TOPDIR}'binutils/ranlib ] ; \'
116 echo ' then echo '${TOPDIR}'binutils/ranlib ; \'
117 echo ' else echo ranlib ; fi`'
118 echo 'NM = `if [ -f' ${TOPDIR}'binutils/nm.new ] ; \'
119 echo ' then echo '${TOPDIR}'binutils/nm.new ; \'
120 echo ' else echo nm ; fi`'
121 echo 'NLMCONV = `if [ -f' ${TOPDIR}'binutils/nlmconv ] ; \'
122 echo ' then echo '${TOPDIR}'binutils/nlmconv ; \'
123 echo ' else echo nlmconv ; fi`'
124 echo 'LD = `if [ -f' ${TOPDIR}'ld/ld.new ] ; \'
125 echo ' then echo '${TOPDIR}'ld/ld.new ; \'
126 echo ' else echo ld ; fi`'
128 echo 'MAKEINFO = `if [ -f '${TOPDIR}'texinfo/C/makeinfo ] ; \'
129 echo ' then echo '${TOPDIR}'texinfo/C/makeinfo ; \'
130 echo ' else echo makeinfo ; fi`'
132 .) echo 'TEXIDIR = '"${with_multisrctop}${TO_REAL_TOPDIR}texinfo" ;;
133 *) echo 'TEXIDIR = $(srcdir)'/"${TO_TOPDIR}texinfo" ;;
135 echo 'TEXI2DVI = TEXINPUTS=${TEXIDIR}:$$TEXINPUTS texi2dvi'
142 echo 'WRAP_C_INCLUDES ='
144 echo 'WRAP_C_INCLUDES = -I$(srcdir)'/${TOLIBGXX}g++-include
147 echo 'CXXFLAGS = -g -O'
148 echo 'LIBCFLAGS = $(CFLAGS)'
149 echo 'LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates'
150 if [ "${LIBDIR}" = "yes" ]; then
151 echo 'PICDIR = stamp-picdir'
156 if test "${DOING_LIBGXX}" = "true" ; then
157 echo "TOLIBGXX = ${TOLIBGXX}"
158 echo 'PROTODIR = $(srcdir)'/${TOLIBGXX}src/gen
159 echo "LIBS = -L./${TOLIBGXX} -L./${TOLIBGXX}../libstdc++ -lg++ -lstdc++"
161 # You can override iostream (e.g. in a site- or host-Makefile fragment) to:
162 # iostream (Normal iostream library)
163 # old-stream (Old stream library; no longer supported)
164 # no-stream (If you don't want iostream to be part of libg++)
165 echo 'IO_DIR = ../libio'
166 echo '# IO_DIR = no-stream'
167 elif test "${DOING_GPERF}" = "true" ; then
168 echo "IO_DIR = libio"
169 echo "LIBS = -L${TO_TOPDIR}libstdc++ -lstdc++"
172 if [ -z "${ALL}" ] ; then
173 if [ -n "${TARGETLIB}" ] ; then
175 echo "TARGETLIB = ${TARGETLIB}"
176 elif [ -n "${TARGETPROG}" ] ; then
178 echo "TARGETPROG = ${TARGETPROG}"
180 echo "config error: neither ALL, TARGETLIB or TARGETPROG is defined" 1>&2
184 echo >&2 "all: ${ALL} multi-all"
185 if [ "${SUBDIRS}" != "" ] ; then
186 echo >&2 ' @rootme=`pwd`/; export rootme; \'
187 echo >&2 ' $(MAKE) "DODIRS=$(SUBDIRS)" DO=all $(FLAGS_TO_PASS) subdir_do'
189 if [ "${LIBDIR}" = "yes" ]; then
190 echo >&2 "${ALL} "'multi-all: $(PICDIR)'
192 echo >&2 '.PHONY: all'
195 echo >&2 '.PHONY: multi-all'
196 echo >&2 'multi-all:'
197 echo >&2 ' @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all'
201 if [ "${SUBDIRS}" != "" ] ; then
202 echo >&2 '.PHONY: subdir_do'
203 echo >&2 'subdir_do: force'
204 echo >&2 ' @rootme=`pwd`/; export rootme; \'
205 echo >&2 ' for i in $(DODIRS); do \'
206 echo >&2 ' if [ -f ./$$i/Makefile ] ; then \'
207 echo >&2 ' echo "cd $$i; make $(DO) ..." ; \'
208 echo >&2 ' (cd $$i ; $(MAKE) $(FLAGS_TO_PASS) $(DO)) || exit 1 ; \'
209 echo >&2 ' else true ; fi ; \'
212 echo >&2 '# List of variables to pass to sub-makes. This should not be needed'
213 echo >&2 '# by GNU make or Sun make (both of which pass command-line variable'
214 echo >&2 '# overrides thouh $(MAKE)) but may be needed by older versions.'
216 echo >&2 'FLAGS_TO_PASS= \'
217 echo >&2 ' "SHELL=$(SHELL)" \'
218 echo >&2 ' "INSTALL=$(INSTALL)" \'
219 echo >&2 ' "INSTALL_DATA=$(INSTALL_DATA)" \'
220 echo >&2 ' "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \'
221 echo >&2 ' "prefix=$(prefix)" \'
222 echo >&2 ' "exec_prefix=$(exec_prefix)" \'
223 echo >&2 ' "tooldir=$(tooldir)" \'
224 echo >&2 ' "gxx_include_dir=$(gxx_include_dir)" \'
225 echo >&2 ' "libsubdir=$(libsubdir)" \'
226 echo >&2 ' "gcc_version=$(gcc_version)" \'
227 echo >&2 ' "gcc_version_trigger=$(gcc_version_trigger)" \'
228 echo >&2 ' "AR=$(AR)" \'
229 echo >&2 ' "AR_FLAGS=$(AR_FLAGS)" \'
230 echo >&2 ' "CC=$(CC)" \'
231 echo >&2 ' "CXX=$(CXX)" \'
232 echo >&2 ' "CFLAGS=$(CFLAGS)" \'
233 echo >&2 ' "CXXFLAGS=$(CXXFLAGS)" \'
234 echo >&2 ' "NM=$(NM)" \'
235 echo >&2 ' "RANLIB=$(RANLIB)" \'
236 echo >&2 ' "LIBCFLAGS=$(LIBCFLAGS)" \'
237 echo >&2 ' "LIBCXXFLAGS=$(LIBCXXFLAGS)" \'
238 echo >&2 ' "LOADLIBES=$(LOADLIBES)" \'
239 echo >&2 ' "LDFLAGS=$(LDFLAGS)" \'
240 echo >&2 ' "MAKEINFO=$(MAKEINFO)" \'
241 echo >&2 ' "SHLIB=$(SHLIB)" \'
242 echo >&2 ' "SHCURSES=$(SHCURSES)" \'
243 echo >&2 ' "RUNTESTFLAGS=$(RUNTESTFLAGS)"'
246 echo >&2 'NOSTDINC = -nostdinc++'
247 if test -n "${XCXXINCLUDES}" ; then
248 echo >&2 "CXXINCLUDES = ${XCXXINCLUDES} "'$(NOSTDINC)'
249 elif test "${DOING_LIBGXX}" = "true" ; then
250 echo >&2 'CXXINCLUDES = $(NOSTDINC) -I. -I'"${TO_TOPDIR}libio"' -I$(srcdir) -I$(srcdir)/'"${TOLIBGXX}"'$(IO_DIR) -I$(srcdir)/'"${TOLIBGXX}"'../libstdc++ -I$(srcdir)/'"${TOLIBGXX}src"' '"${host_includes}"' $(WRAP_C_INCLUDES)'
252 if test -n "${XCINCLUDES}" ; then
253 echo >&2 "CINCLUDES = ${XCINCLUDES}"
254 elif test "${DOING_LIBGXX}" = "true" ; then
255 echo >&2 'CINCLUDES ='
258 if [ "${LIBDIR}" = "yes" ]; then
259 echo >&2 'XCFLAGS = $(LIBCFLAGS)'
260 echo >&2 'XCXXFLAGS = $(LIBCXXFLAGS)'
262 echo >&2 'XCFLAGS = $(CFLAGS)'
263 echo >&2 'XCXXFLAGS = $(CXXFLAGS)'
266 echo >&2 '.SUFFIXES: .o .C .cc .c'
267 echo >&2 'COMPILE.c = $(CC) -c $(XCFLAGS) $(CINCLUDES) $(MT_CFLAGS)'
269 if [ "${LIBDIR}" = "yes" ]; then
270 echo >&2 ' test x"$(enable_shared)" != xyes ||\'
271 echo >&2 ' $(COMPILE.c) $(PICFLAG) $< -o pic/$@'
273 echo >&2 ' $(COMPILE.c) $<'
274 [ "${TOUCH_ON_COMPILE}" = "yes" ] && echo >&2 ' @touch stamp'
275 echo >&2 'COMPILE.cc = $(CXX) -c $(XCXXFLAGS) $(CXXINCLUDES) $(MT_CFLAGS)'
277 if [ "${LIBDIR}" = "yes" ]; then
278 echo >&2 ' test x"$(enable_shared)" != xyes ||\'
279 echo >&2 ' $(COMPILE.cc) $(PICFLAG) $< -o pic/$@'
281 echo >&2 ' $(COMPILE.cc) $<'
282 [ "${TOUCH_ON_COMPILE}" = "yes" ] && echo >&2 ' @touch stamp'
284 if [ "${LIBDIR}" = "yes" ]; then
285 echo >&2 ' test x"$(enable_shared)" != xyes || \'
286 echo >&2 ' $(COMPILE.cc) $(PICFLAG) $< -o pic/$@'
288 echo >&2 ' $(COMPILE.cc) $<'
289 [ "${TOUCH_ON_COMPILE}" = "yes" ] && echo >&2 ' @touch stamp'
292 if [ -n "${TARGETLIB}" ] ; then
293 echo TARGETLIB = ${TARGETLIB}
295 if [ -n "${TARGETPROG}" ] ; then
296 echo TARGETPROG = ${TARGETPROG}
299 if [ "${LIBDIR}" = "yes" ]; then
301 echo >&2 'stamp-picdir:'
302 echo >&2 ' if [ x"$(enable_shared)" = xyes ] && [ ! -d pic ]; then \'
303 echo >&2 ' mkdir pic; \'
304 echo >&2 ' else true; fi'
305 echo >&2 ' touch stamp-picdir'
309 echo >&2 '.PHONY: install'
311 echo >&2 '.PHONY: check'
312 if [ "${CHECK}" != "check" ] ; then
313 echo >&2 "check: ${ALL} ${CHECK}"
314 if [ "${CHECK_SUBDIRS}" != "" ] ; then
315 echo >&2 ' rootme=`pwd`/; export rootme; \'
316 echo >&2 ' SAVE_LLPATH="$${SAVE_LLPATH-$$LD_LIBRARY_PATH}"; export SAVE_LLPATH; \'
317 echo >&2 ' LD_LIBRARY_PATH="$${rootme}${TOLIBGXX}../libstdc++:$${rootme}${TOLIBGXX}../libg++:$$SAVE_LLPATH"; \'
318 echo >&2 ' export LD_LIBRARY_PATH; \'
319 echo >&2 ' $(MAKE) "DODIRS=$(CHECK_SUBDIRS)" DO=check $(FLAGS_TO_PASS) subdir_do'
323 # Generate rules for documentation (depending on INFO_FILES and INFO_SUBDIRS).
325 echo >&2 '.PHONY: info dvi install-info clean-info'
327 # emit the rule for 'info'
328 # (Note that the top-level ../Makefile.in greps for '^info:' when making
329 # a release (in "make taz"), so don't break that!)
330 if [ -z "${INFO_FILES}" ] ; then
333 echo >&2 info: `for file in ${INFO_FILES} ; do echo $file.info ; done`
335 if [ "${INFO_SUBDIRS}" != "" ] ; then
336 echo >&2 ' @rootme=`pwd`/; export rootme; \
337 $(MAKE) "DODIRS='${INFO_SUBDIRS}'" DO=info $(FLAGS_TO_PASS) subdir_do'
340 # emit the rule for 'dvi'
341 if [ -z "${INFO_FILES}" ] ; then
344 echo >&2 dvi: `for file in ${INFO_FILES} ; do echo $file.dvi ; done`
346 if [ "${INFO_SUBDIRS}" != "" ] ; then
347 echo >&2 ' @rootme=`pwd`/; export rootme; \
348 $(MAKE) "DODIRS='${INFO_SUBDIRS}'" DO=dvi $(FLAGS_TO_PASS) subdir_do'
351 # Emit rules for each *.info and *.dvi file
352 for file in ${INFO_FILES} ; do
353 echo >&2 ${file}.info: '$(srcdir)'/${file}.texi
354 echo >&2 ' $(MAKEINFO) -I$(srcdir) -I$(TEXIDIR) $(srcdir)/'${file}.texi -o ${file}.info
355 echo >&2 ${file}.dvi: '$(srcdir)'/${file}.texi
356 echo >&2 ' $(TEXI2DVI) $(srcdir)'/${file}.texi
357 echo >&2 "${file}.ps: ${file}.dvi"
358 echo >&2 " dvips ${file} -o"
361 # emit the rule for install-info
362 echo >&2 'install-info:'
363 if [ -n "${INFO_FILES}" ] ; then
364 echo >&2 ' -parent=`echo $(infodir)|sed -e' "'"'s@/[^/]*$$@@'"'"'`; \'
365 echo >&2 ' if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi'
366 echo >&2 ' -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi'
367 echo >&2 ' for i in *.info* ; do \'
368 echo >&2 ' $(INSTALL_DATA) $$i $(infodir)/$$i ; \'
371 if [ "${INFO_SUBDIRS}" != "" ] ; then
372 echo >&2 ' @rootme=`pwd`/; export rootme; \
373 $(MAKE) "DODIRS='${INFO_SUBDIRS}'" DO=install-info $(FLAGS_TO_PASS) subdir_do'
376 # emit clean-info and clean-dvi rules
377 echo >&2 '.PHONY: do-clean-info clean-info do-clean-dvi clean-dvi'
378 echo >&2 do-clean-info:
379 if [ -n "${INFO_FILES}" ] ; then
380 echo >&2 ' rm -f *.info*'
382 echo >&2 'do-clean-dvi:'
383 if [ -n "${INFO_FILES}" ] ; then
384 echo >&2 ' rm -f *.dvi *.aux *.cp *.cps *.fn* *.ky *.log *.pg *.toc *.tp *.vr'
386 for type in info dvi ; do
387 echo >&2 clean-${type}: do-clean-${type}
388 if [ "${INFO_SUBDIRS}" != "" ] ; then
389 echo >&2 ' @rootme=`pwd`/; export rootme; \
390 $(MAKE) "DODIRS='${NFO_SUBDIRS}'" DO=clean-'${type} '$(FLAGS_TO_PASS) subdir_do'
396 echo >&2 '.PHONY: boltcc'
398 echo >&2 ' rootme=`pwd`/ ; export rootme ; $(MAKE) $(FLAGS_TO_PASS)'
404 echo >&2 '# clean rules'
406 MOSTLYCLEAN="${MOSTLYCLEAN-*.o pic stamp-picdir core ${EXTRA_MOSTLYCLEAN}} `if test -n "${TOUCH_ON_COMPILE}"; then echo stamp; else true; fi`"
407 CLEAN="${CLEAN-${TARGETPROG} ${TARGETLIB}}"
408 DISTCLEAN="${DISTCLEAN-config.status Makefile *~ Make.pack target-mkfrag multilib.out ${EXTRA_DISTCLEAN-}}"
409 REALCLEAN="${REALCLEAN-depend *.info*}"
412 echo >&2 '.PHONY: mostlyclean clean distclean maintainer-clean realclean'
413 if test -z "${SUBDIRS}" ; then
414 echo >&2 "mostlyclean: clean-dvi"
415 echo >&2 " rm -rf ${MOSTLYCLEAN}"
416 echo >&2 ' @$(MULTICLEAN) multi-clean DO=mostlyclean'
417 echo >&2 "clean: clean-dvi"
418 echo >&2 " rm -rf ${MOSTLYCLEAN} ${CLEAN}"
419 echo >&2 ' @$(MULTICLEAN) multi-clean DO=clean'
420 echo >&2 "distclean: clean"
421 echo >&2 ' @$(MULTICLEAN) multi-clean DO=distclean'
422 echo >&2 " rm -rf ${DISTCLEAN}"
423 echo >&2 "maintainer-clean realclean: clean clean-info"
424 echo >&2 ' @$(MULTICLEAN) multi-clean DO=maintainer-clean'
425 echo >&2 " rm -rf ${DISTCLEAN} ${REALCLEAN}"
427 echo >&2 '.PHONY: do-clean subdir_distclean subdir_maintainer_clean'
428 echo >&2 "mostlyclean: do-clean-dvi"
429 echo >&2 " rm -rf ${MOSTLYCLEAN}"
430 echo >&2 ' @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=mostlyclean subdir_do'
431 echo >&2 ' @$(MULTICLEAN) multi-clean DO=mostlyclean'
432 echo >&2 "do-clean: do-clean-dvi"
433 echo >&2 " rm -rf ${MOSTLYCLEAN} ${CLEAN}"
434 echo >&2 "clean: do-clean"
435 echo >&2 ' @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=clean subdir_do'
436 echo >&2 ' @$(MULTICLEAN) multi-clean DO=clean'
437 # distclean and maintainer-clean are tricky because they remove the Makefile.
438 echo >&2 "subdir_distclean:"
439 echo >&2 ' @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=distclean subdir_do'
440 echo >&2 "distclean: do-clean subdir_distclean"
441 echo >&2 ' @$(MULTICLEAN) multi-clean DO=distclean'
442 echo >&2 " rm -rf ${DISTCLEAN}"
443 echo >&2 "subdir_maintainer_clean:"
444 echo >&2 ' @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=maintainer-clean subdir_do'
445 echo >&2 "maintainer-clean realclean: do-clean subdir_maintainer_clean do-clean-info"
446 echo >&2 ' @$(MULTICLEAN) multi-clean DO=maintainer-clean'
447 echo >&2 " rm -rf ${DISTCLEAN} ${REALCLEAN}"
451 echo >&2 '.PHONY: force'
454 echo >&2 '# with the gnu make, this is done automatically.'
456 echo >&2 'Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)'
457 echo >&2 ' $(SHELL) ./config.status'
459 echo >&2 '.NOEXPORT:'
460 echo >&2 'MAKEOVERRIDES='
463 DEPEND_SOURCES = ${srcdir}/*.cc ${srcdir}/*.c
465 # The sed script below attempts to make the depend output portable.
466 # It cleans up the depenency information generated by cpp.
467 # It replaces instances of $(srcdir)/ by the string '$(srcdir)/'.
468 # It removes remaining absolute files names (such as /usr/include/stdio.h).
469 # It removes lines containing only "\\".
470 # It inserts '$(MULTISRCTOP)' in '$(srcdir)/..'.
471 # In order to support SunOS VPATH, $(srcdir)/[a-z]*.{c,cc} is replaced with
472 # [a-z]*.{c,cc} (the directory part is removed).
473 # The awk script removes a continuation marker that is followed by
474 # a blank line, since that may confuse make.
475 echo "# AUTOMATICALLY GENERATED BY 'make depend' - DO NOT EDIT" \
477 $(CXX) -M $(CXXINCLUDES) $(DEPEND_SOURCES) \
478 | sed -e 's|$(srcdir)/|$$(srcdir)/|g' \
479 -e 's| [^ ]*_G_config.h| $$(_G_CONFIG_H)|g' \
480 -e 's| /[^ ]*||g' -e 's| libc-lock\.h||' \
481 -e '/^[ ]*\\$$/d' -e 's/^[ ]*$$//' \
482 | sed -e 's|$$(srcdir)/[.][.]|$$(srcdir)/$$(MULTISRCTOP)..|g' \
483 -e 's|$$(srcdir)/\([^/]*[.]c\)|\1|' \
484 | awk 'BEGIN { prev = "" } \
485 /^( )*$$/ { if (prev ~ /\\$$/) \
486 { prev = substr(prev,1,length(prev)-1); next } } \
487 { print prev; prev = $$0 } \
488 END { if (prev !~ /^( )*$$/) print prev }' \
490 $(srcdir)/depend: depend.new
491 mv depend.new $(srcdir)/depend
494 if [ -f ${srcdir}/${subdir}/depend ] ; then
495 cat ${srcdir}/${subdir}/depend >&2
498 echo "# End of package fragment generated by ${THIS_FILE}."
499 echo >&2 "# End of package rules fragment generated by ${THIS_FILE}."