summaryrefslogtreecommitdiffstats
path: root/contrib/libio/config.shared
blob: 6cda566eb7bdfe5982d20063413a1706b1ed5bed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
# Copyright (C) 1993, 1995, 1997, 1998 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, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.  */

# File descriptor usage:
# 1: All macros which need to be re-definable by any target fragments
# 2: All generic rules; especially those which use re-defined macros, e.g. _G_CONFIG_H!

# 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}/${TOLIBIO}config.shared"

echo "# Start of package fragment generated by ${THIS_FILE}."
echo ""
echo >&2 "# Start of package rules fragment generated by ${THIS_FILE}."
echo >&2 ""

# 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 'libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)'

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 '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'
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 "LIBS = -L${TO_TOPDIR}libstdc++ -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

echo >&2 "all: ${ALL} multi-all"
if [ "${SUBDIRS}" != "" ] ; then
  echo >&2 '	@rootme=`pwd`/; export rootme; \'
  echo >&2 '	$(MAKE) "DODIRS=$(SUBDIRS)" DO=all $(FLAGS_TO_PASS) subdir_do'
fi
if [ "${LIBDIR}" = "yes" ]; then
  echo >&2 "${ALL} "'multi-all: $(PICDIR)'
fi
echo >&2 '.PHONY: all'
echo >&2 ''

echo >&2 '.PHONY: multi-all'
echo >&2 'multi-all:'
echo >&2 '	@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all'
echo >&2 ''

echo >&2
if [ "${SUBDIRS}" != "" ] ; then
  echo >&2 '.PHONY: subdir_do'
  echo >&2 'subdir_do: force'
  echo >&2 '	@rootme=`pwd`/; export rootme; \'
  echo >&2 '	for i in $(DODIRS); do \'
  echo >&2 '		if [ -f  ./$$i/Makefile ] ; then \'
  echo >&2 '			echo "cd $$i; make $(DO) ..." ; \'
  echo >&2 '			(cd $$i ; $(MAKE) $(FLAGS_TO_PASS) $(DO)) || exit 1 ; \'
  echo >&2 '		else true ; fi ; \'
  echo >&2 '	done'
  echo >&2 ''
  echo >&2 '# List of variables to pass to sub-makes.  This should not be needed'
  echo >&2 '# by GNU make or Sun make (both of which pass command-line variable'
  echo >&2 '# overrides thouh $(MAKE)) but may be needed by older versions.'
  echo >&2 ''
  echo >&2 'FLAGS_TO_PASS= \'
  echo >&2 '	"SHELL=$(SHELL)" \'
  echo >&2 '	"INSTALL=$(INSTALL)" \'
  echo >&2 '	"INSTALL_DATA=$(INSTALL_DATA)" \'
  echo >&2 '	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \'
  echo >&2 '	"prefix=$(prefix)" \'
  echo >&2 '	"exec_prefix=$(exec_prefix)" \'
  echo >&2 '	"tooldir=$(tooldir)" \'
  echo >&2 '	"gxx_include_dir=$(gxx_include_dir)" \'
  echo >&2 '	"libsubdir=$(libsubdir)" \'
  echo >&2 '	"gcc_version=$(gcc_version)" \'
  echo >&2 '	"gcc_version_trigger=$(gcc_version_trigger)" \'
  echo >&2 '	"AR=$(AR)" \'
  echo >&2 '	"AR_FLAGS=$(AR_FLAGS)" \'
  echo >&2 '	"CC=$(CC)" \'
  echo >&2 '	"CXX=$(CXX)" \'
  echo >&2 '	"CFLAGS=$(CFLAGS)" \'
  echo >&2 '	"CXXFLAGS=$(CXXFLAGS)" \'
  echo >&2 '	"NM=$(NM)" \'
  echo >&2 '	"RANLIB=$(RANLIB)" \'
  echo >&2 '	"LIBCFLAGS=$(LIBCFLAGS)" \'
  echo >&2 '	"LIBCXXFLAGS=$(LIBCXXFLAGS)" \'
  echo >&2 '	"LOADLIBES=$(LOADLIBES)" \'
  echo >&2 '	"LDFLAGS=$(LDFLAGS)" \'
  echo >&2 '	"MAKEINFO=$(MAKEINFO)" \'
  echo >&2 '	"SHLIB=$(SHLIB)" \'
  echo >&2 '	"SHCURSES=$(SHCURSES)" \'
  echo >&2 '	"RUNTESTFLAGS=$(RUNTESTFLAGS)"'
fi

echo >&2 'NOSTDINC = -nostdinc++'
if test -n "${XCXXINCLUDES}" ; then
  echo >&2 "CXXINCLUDES = ${XCXXINCLUDES} "'$(NOSTDINC)'
elif test "${DOING_LIBGXX}" = "true" ; then
  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)'
fi
if test -n "${XCINCLUDES}" ; then
  echo >&2 "CINCLUDES = ${XCINCLUDES}"
elif test "${DOING_LIBGXX}" = "true" ; then
  echo >&2 'CINCLUDES ='
fi

if [ "${LIBDIR}" = "yes" ]; then
  echo >&2 'XCFLAGS = $(LIBCFLAGS)'
  echo >&2 'XCXXFLAGS = $(LIBCXXFLAGS)'
else
  echo >&2 'XCFLAGS = $(CFLAGS)'
  echo >&2 'XCXXFLAGS = $(CXXFLAGS)'
fi

echo >&2 '.SUFFIXES: .o .C .cc .c'
echo >&2 'COMPILE.c = $(CC) -c $(XCFLAGS) $(CINCLUDES) $(MT_CFLAGS)'
echo >&2 '.c.o:'
if [ "${LIBDIR}" = "yes" ]; then
echo >&2 '	test x"$(enable_shared)" != xyes ||\'
echo >&2 '	  $(COMPILE.c) $(PICFLAG) $< -o pic/$@'
fi
echo >&2 '	$(COMPILE.c) $<'
[ "${TOUCH_ON_COMPILE}" = "yes" ] && echo >&2 '	@touch stamp'
echo >&2 'COMPILE.cc = $(CXX) -c $(XCXXFLAGS) $(CXXINCLUDES) $(MT_CFLAGS)'
echo >&2 '.C.o:'
if [ "${LIBDIR}" = "yes" ]; then
echo >&2 '	test x"$(enable_shared)" != xyes ||\'
echo >&2 '	  $(COMPILE.cc) $(PICFLAG) $< -o pic/$@'
fi
echo >&2 '	$(COMPILE.cc) $<'
[ "${TOUCH_ON_COMPILE}" = "yes" ] && echo >&2 '	@touch stamp'
echo >&2 '.cc.o:'
if [ "${LIBDIR}" = "yes" ]; then
echo >&2 '	test x"$(enable_shared)" != xyes || \'
echo >&2 '	  $(COMPILE.cc) $(PICFLAG) $< -o pic/$@'
fi
echo >&2 '	$(COMPILE.cc) $<'
[ "${TOUCH_ON_COMPILE}" = "yes" ] && echo >&2 '	@touch stamp'
echo >&2 ''

if [ -n "${TARGETLIB}" ] ; then
  echo TARGETLIB = ${TARGETLIB}
fi
if [ -n "${TARGETPROG}" ] ; then
  echo TARGETPROG = ${TARGETPROG}
fi

if [ "${LIBDIR}" = "yes" ]; then
  echo >&2 ''
  echo >&2 'stamp-picdir:'
  echo >&2 '	if [ x"$(enable_shared)" = xyes ] && [ ! -d pic ]; then \'
  echo >&2 '	  mkdir pic; \'
  echo >&2 '	else true; fi'
  echo >&2 '	touch stamp-picdir'
fi

echo >&2 ''
echo >&2 '.PHONY: install'
echo >&2 'install:'
echo >&2 '.PHONY: check'
if [ "${CHECK}" != "check" ] ; then
  echo >&2 "check: ${ALL} ${CHECK}"
  if [ "${CHECK_SUBDIRS}" != "" ] ; then
    echo >&2 '	rootme=`pwd`/; export rootme; \'
    echo >&2 '	SAVE_LLPATH="$${SAVE_LLPATH-$$LD_LIBRARY_PATH}"; export SAVE_LLPATH; \'
    echo >&2 '	LD_LIBRARY_PATH="$${rootme}${TOLIBGXX}../libstdc++:$${rootme}${TOLIBGXX}../libg++:$$SAVE_LLPATH"; \'
    echo >&2 '	export LD_LIBRARY_PATH; \'
    echo >&2 '	$(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 >&2 '.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 >&2 'info:'
else
  echo >&2 info: `for file in ${INFO_FILES} ; do echo $file.info ; done`
fi
if [ "${INFO_SUBDIRS}" != "" ] ; then
  echo >&2 '	@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 >&2 'dvi:'
else
  echo >&2 dvi: `for file in ${INFO_FILES} ; do echo $file.dvi ; done`
fi
if [ "${INFO_SUBDIRS}" != "" ] ; then
  echo >&2 '	@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 >&2 ${file}.info: '$(srcdir)'/${file}.texi
  echo >&2 '	$(MAKEINFO) -I$(srcdir) -I$(TEXIDIR) $(srcdir)/'${file}.texi -o ${file}.info
  echo >&2 ${file}.dvi: '$(srcdir)'/${file}.texi
  echo >&2 '	$(TEXI2DVI) $(srcdir)'/${file}.texi
  echo >&2 "${file}.ps: ${file}.dvi"
  echo >&2 "	dvips ${file} -o"
done

# emit the rule for install-info
echo >&2 'install-info:'
if [ -n "${INFO_FILES}" ] ; then
  echo >&2 '	-parent=`echo $(infodir)|sed -e' "'"'s@/[^/]*$$@@'"'"'`; \'
  echo >&2 '	if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi'
  echo >&2 '	-if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi'
  echo >&2 '	for i in *.info* ; do \'
  echo >&2 '	  $(INSTALL_DATA) $$i $(infodir)/$$i ; \'
  echo >&2 '	done'
fi
if [ "${INFO_SUBDIRS}" != "" ] ; then
  echo >&2 '	@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 >&2 '.PHONY: do-clean-info clean-info do-clean-dvi clean-dvi'
echo >&2 do-clean-info:
if [ -n "${INFO_FILES}" ] ; then
  echo >&2 '	rm -f *.info*'
fi
echo >&2 'do-clean-dvi:'
if [ -n "${INFO_FILES}" ] ; then
  echo >&2 '	rm -f *.dvi *.aux *.cp *.cps *.fn* *.ky *.log *.pg *.toc *.tp *.vr'
fi
for type in info dvi ; do
  echo >&2 clean-${type}: do-clean-${type}
  if [ "${INFO_SUBDIRS}" != "" ] ; then
    echo >&2 '	@rootme=`pwd`/; export rootme; \
	$(MAKE) "DODIRS='${NFO_SUBDIRS}'" DO=clean-'${type} '$(FLAGS_TO_PASS) subdir_do'
  fi
done

echo >&2 ''

echo >&2 '.PHONY: boltcc'
echo >&2 'boltcc:'
echo >&2 '	rootme=`pwd`/ ; export rootme ; $(MAKE) $(FLAGS_TO_PASS)'
echo >&2 ''

# Emit clean rules

echo >&2 ''
echo >&2 '# 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 target-mkfrag multilib.out ${EXTRA_DISTCLEAN-}}"
REALCLEAN="${REALCLEAN-depend *.info*}"


echo >&2 '.PHONY: mostlyclean clean distclean maintainer-clean realclean'
if test -z "${SUBDIRS}" ; then
  echo >&2 "mostlyclean: clean-dvi"
  echo >&2 "	rm -rf ${MOSTLYCLEAN}"
  echo >&2 '	@$(MULTICLEAN) multi-clean DO=mostlyclean'
  echo >&2 "clean: clean-dvi"
  echo >&2 "	rm -rf ${MOSTLYCLEAN} ${CLEAN}"
  echo >&2 '	@$(MULTICLEAN) multi-clean DO=clean'
  echo >&2 "distclean: clean"
  echo >&2 '	@$(MULTICLEAN) multi-clean DO=distclean'
  echo >&2 "	rm -rf ${DISTCLEAN}"
  echo >&2 "maintainer-clean realclean: clean clean-info"
  echo >&2 '	@$(MULTICLEAN) multi-clean DO=maintainer-clean'
  echo >&2 "	rm -rf ${DISTCLEAN} ${REALCLEAN}"
else
  echo >&2 '.PHONY: do-clean subdir_distclean subdir_maintainer_clean'
  echo >&2 "mostlyclean: do-clean-dvi"
  echo >&2 "	rm -rf ${MOSTLYCLEAN}"
  echo >&2 '	@$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=mostlyclean subdir_do'
  echo >&2 '	@$(MULTICLEAN) multi-clean DO=mostlyclean'
  echo >&2 "do-clean: do-clean-dvi"
  echo >&2 "	rm -rf ${MOSTLYCLEAN} ${CLEAN}"
  echo >&2 "clean: do-clean"
  echo >&2 '	@$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=clean subdir_do'
  echo >&2 '	@$(MULTICLEAN) multi-clean DO=clean'
  # distclean and maintainer-clean are tricky because they remove the Makefile.
  echo >&2 "subdir_distclean:"
  echo >&2 '	@$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=distclean subdir_do'
  echo >&2 "distclean: do-clean subdir_distclean"
  echo >&2 '	@$(MULTICLEAN) multi-clean DO=distclean'
  echo >&2 "	rm -rf ${DISTCLEAN}"
  echo >&2 "subdir_maintainer_clean:"
  echo >&2 '	@$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=maintainer-clean subdir_do'
  echo >&2 "maintainer-clean realclean: do-clean subdir_maintainer_clean do-clean-info"
  echo >&2 '	@$(MULTICLEAN) multi-clean DO=maintainer-clean'
  echo >&2 "	rm -rf ${DISTCLEAN} ${REALCLEAN}"
fi

echo >&2 ''
echo >&2 '.PHONY: force'
echo >&2 'force:'
echo >&2 ''
echo >&2 '# with the gnu make, this is done automatically.'
echo >&2 ''
echo >&2 'Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)'
echo >&2 '	$(SHELL) ./config.status'
echo >&2 ''
echo >&2 '.NOEXPORT:'
echo >&2 'MAKEOVERRIDES='

cat >&2 <<"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_config.h| $$(_G_CONFIG_H)|g' \
	      -e 's| /[^ ]*||g' -e 's| libc-lock\.h||' \
	      -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 >&2
fi

echo "# End of package fragment generated by ${THIS_FILE}."
echo >&2 "# End of package rules fragment generated by ${THIS_FILE}."
OpenPOWER on IntegriCloud