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++ / libstdc++ / Make.pack < prev    next >
Text File  |  1995-11-12  |  7KB  |  226 lines

  1. # Start of package fragment generated by /kalessin/giga/bothner/dist/devo/libstdc++/config.shared.
  2.  
  3. MULTITOP = .
  4. MULTIDIRS =
  5. MULTISUBDIR =
  6. MULTIDO = true
  7. MULTICLEAN = true
  8.  
  9. # TOPDIR=$${rootme}$(MULTITOP)/../ invsubdir= subdir=
  10. srcdir = /kalessin/giga/bothner/dist/devo/libstdc++
  11. SUBDIRS = stl tests
  12. prefix = /usr/local
  13. exec_prefix = $(prefix)
  14. bindir = $(exec_prefix)/bin
  15. libdir = $(exec_prefix)/lib
  16. datadir = $(prefix)/lib
  17. mandir = $(prefix)/man
  18. man1dir = $(mandir)/man1
  19. man2dir = $(mandir)/man2
  20. man3dir = $(mandir)/man3
  21. man4dir = $(mandir)/man4
  22. man5dir = $(mandir)/man5
  23. man6dir = $(mandir)/man6
  24. man7dir = $(mandir)/man7
  25. man8dir = $(mandir)/man8
  26. man9dir = $(mandir)/man9
  27. infodir = $(prefix)/info
  28. includedir = $(prefix)/include
  29. gxx_includedir = $(libdir)/g++-include
  30. docdir = $(datadir)/doc
  31.  
  32. SHELL = /bin/sh
  33.  
  34. INSTALL = $(srcdir)/../install.sh -c
  35. INSTALL_PROGRAM = $(INSTALL)
  36. INSTALL_DATA = $(INSTALL)
  37.  
  38. AR = `if [ -f $${rootme}$(MULTITOP)/../binutils/ar ] ; \
  39.     then echo $${rootme}$(MULTITOP)/../binutils/ar ; \
  40.     else echo ar ; fi`
  41. AR_FLAGS = rc
  42. RANLIB = `if [ -f $${rootme}$(MULTITOP)/../binutils/ranlib ] ; \
  43.     then echo $${rootme}$(MULTITOP)/../binutils/ranlib ; \
  44.     else echo ranlib ; fi`
  45. NM = `if [ -f $${rootme}$(MULTITOP)/../binutils/nm.new ] ; \
  46.     then echo $${rootme}$(MULTITOP)/../binutils/nm.new ; \
  47.     else echo nm ; fi`
  48. NLMCONV = `if [ -f $${rootme}$(MULTITOP)/../binutils/nlmconv ] ; \
  49.     then echo $${rootme}$(MULTITOP)/../binutils/nlmconv ; \
  50.     else echo nlmconv ; fi`
  51. LD = `if [ -f $${rootme}$(MULTITOP)/../ld/ld.new ] ; \
  52.     then echo $${rootme}$(MULTITOP)/../ld/ld.new ; \
  53.     else echo ld ; fi`
  54.  
  55. MAKEINFO = `if [ -f $${rootme}$(MULTITOP)/../texinfo/C/makeinfo ] ; \
  56.     then echo $${rootme}$(MULTITOP)/../texinfo/C/makeinfo ; \
  57.     else echo makeinfo ; fi`
  58. TEXIDIR=${srcdir}/..//texinfo
  59. TEXI2DVI = TEXINPUTS=${TEXIDIR}:$$TEXINPUTS texi2dvi
  60.  
  61. CC = cc
  62. CXX = g++ -O
  63.  
  64. WRAP_C_INCLUDES =
  65. CFLAGS = -g
  66. CXXFLAGS = -g -O3
  67. LIBCFLAGS = $(CFLAGS)
  68. LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
  69. PICFLAG =
  70. PICDIR = stamp-picdir
  71. all: $(PICDIR) libs multi-all
  72.     @rootme=`pwd`/; export rootme; \
  73.     $(MAKE) "DODIRS=$(SUBDIRS)" DO=all $(FLAGS_TO_PASS) subdir_do
  74. .PHONY: all
  75.  
  76. .PHONY: multi-all
  77. multi-all:
  78.     @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
  79.  
  80.  
  81. .PHONY: subdir_do
  82. subdir_do: force
  83.     @rootme=`pwd`/; export rootme; \
  84.     for i in $(DODIRS); do \
  85.         if [ -f  ./$$i/Makefile ] ; then \
  86.             echo "cd $$i; make $(DO) ..." ; \
  87.             (cd $$i ; $(MAKE) $(FLAGS_TO_PASS) $(DO)) || exit 1 ; \
  88.         else true ; fi ; \
  89.     done
  90.  
  91. # List of variables to pass to sub-makes.  This should not be needed
  92. # by GNU make or Sun make (both of which pass command-line variable
  93. # overrides thouh $(MAKE)) but may be needed by older versions.
  94.  
  95. FLAGS_TO_PASS= \
  96.     "INSTALL=$(INSTALL)" \
  97.     "INSTALL_DATA=$(INSTALL_DATA)" \
  98.     "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
  99.     "prefix=$(prefix)" \
  100.     "exec_prefix=$(exec_prefix)" \
  101.     "tooldir=$(tooldir)" \
  102.     "AR=$(AR)" \
  103.     "AR_FLAGS=$(AR_FLAGS)" \
  104.     "CC=$(CC)" \
  105.     "CXX=$(CXX)" \
  106.     "CFLAGS=$(CFLAGS)" \
  107.     "CXXFLAGS=$(CXXFLAGS)" \
  108.     "RANLIB=$(RANLIB)" \
  109.     "LIBCFLAGS=$(LIBCFLAGS)" \
  110.     "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
  111.     "LOADLIBES=$(LOADLIBES)" \
  112.     "LDFLAGS=$(LDFLAGS)" \
  113.     "MAKEINFO=$(MAKEINFO)" \
  114.     "PICFLAG=$(PICFLAG)"
  115. NOSTDINC = -nostdinc++
  116. CXXINCLUDES = -I/kalessin/giga/bothner/dist/devo/libstdc++ -I$(MULTITOP)/../libio -I/kalessin/giga/bothner/dist/devo/libstdc++/../libio $(NOSTDINC)
  117. XCFLAGS = $(LIBCFLAGS)
  118. XCXXFLAGS = $(LIBCXXFLAGS)
  119. .SUFFIXES: .o .C .cc .c
  120. COMPILE.c = $(CC) -c $(XCFLAGS) $(CINCLUDES)
  121. .c.o:
  122.     [ -z "$(PICFLAG)" ] ||\
  123.       $(COMPILE.c) $(PICFLAG) $< -o pic/$@
  124.     $(COMPILE.c) $<
  125. COMPILE.cc = $(CXX) -c $(XCXXFLAGS) $(CXXINCLUDES)
  126. .C.o:
  127.     [ -z "$(PICFLAG)" ] ||\
  128.       $(COMPILE.cc) $(PICFLAG) $< -o pic/$@
  129.     $(COMPILE.cc) $<
  130. .cc.o:
  131.     [ -z "$(PICFLAG)" ] || \
  132.       $(COMPILE.cc) $(PICFLAG) $< -o pic/$@
  133.     $(COMPILE.cc) $<
  134.  
  135.  
  136. stamp-picdir:
  137.     if [ -n "$(PICFLAG)" ] && [ ! -d pic ]; then \
  138.       mkdir pic; \
  139.     else true; fi
  140.     touch stamp-picdir
  141.  
  142. .PHONY: install
  143. install:
  144. .PHONY: check
  145. check: $(PICDIR) libs 
  146.     rootme=`pwd`/; export rootme; \
  147.     SAVE_LLPATH="$${SAVE_LLPATH-$$LD_LIBRARY_PATH}"; export SAVE_LLPATH; \
  148.     LD_LIBRARY_PATH="$${rootme}${TOLIBGXX}../libstdc++:$${rootme}${TOLIBGXX}../libg++:$$SAVE_LLPATH"; \
  149.     export LD_LIBRARY_PATH; \
  150.     $(MAKE) "DODIRS=$(SUBDIRS)" DO=check $(FLAGS_TO_PASS) subdir_do
  151. .PHONY: info dvi install-info clean-info
  152. info:
  153. dvi:
  154. install-info:
  155. .PHONY: do-clean-info clean-info do-clean-dvi clean-dvi
  156. do-clean-info:
  157. do-clean-dvi:
  158. clean-info: do-clean-info
  159. clean-dvi: do-clean-dvi
  160.  
  161. .PHONY: boltcc
  162. boltcc:
  163.     rootme=`pwd`/ ; export rootme ; $(MAKE) $(FLAGS_TO_PASS)
  164.  
  165.  
  166. # clean rules
  167. .PHONY: mostlyclean clean distclean maintainer-clean realclean
  168. .PHONY: do-clean subdir_distclean subdir_maintainer_clean
  169. mostlyclean: do-clean-dvi
  170.     rm -rf *.o pic stamp-picdir core so_locations $(MOSTLYCLEAN_JUNK) 
  171.     @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=mostlyclean subdir_do
  172.     @$(MULTICLEAN) multi-clean DO=mostlyclean
  173. do-clean: do-clean-dvi
  174.     rm -rf *.o pic stamp-picdir core so_locations $(MOSTLYCLEAN_JUNK)  $(CLEAN_JUNK)
  175. clean: do-clean
  176.     @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=clean subdir_do
  177.     @$(MULTICLEAN) multi-clean DO=clean
  178. subdir_distclean:
  179.     @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=distclean subdir_do
  180. distclean: do-clean subdir_distclean
  181.     @$(MULTICLEAN) multi-clean DO=distclean
  182.     rm -rf config.status Makefile target-mkfrag
  183. subdir_maintainer_clean:
  184.     @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=maintainer-clean subdir_do
  185. maintainer-clean realclean: do-clean subdir_maintainer_clean do-clean-info
  186.     @$(MULTICLEAN) multi-clean DO=maintainer-clean
  187.     rm -rf config.status Makefile target-mkfrag depend *.info*
  188.  
  189. .PHONY: force
  190. force:
  191.  
  192. # with the gnu make, this is done automatically.
  193.  
  194. Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
  195.     $(SHELL) ./config.status
  196.  
  197. .NOEXPORT:
  198. MAKEOVERRIDES=
  199. DEPEND_SOURCES = ${srcdir}/*.cc ${srcdir}/*.c
  200. depend.new:
  201. # The sed script below attempts to make the depend output portable.
  202. # It cleans up the depenency information generated by cpp.
  203. # It replaces instances of $(srcdir)/ by the string '$(srcdir)/'.
  204. # It removes remaining absolute files names (such as /usr/include/stdio.h).
  205. # It the removes lines containing only "\\".
  206. # It prepends '$(MULTITOP)/' to relative pathnames to other libg++ dirs.
  207. # The awk script removes a continuation marker that is followed by
  208. # a blank line, since that may confuse make.
  209.     echo "# AUTOMATICALLY GENERATED BY 'make depend' - DO NOT EDIT" \
  210.       >depend.new
  211.     gcc -M $(CXXINCLUDES) $(DEPEND_SOURCES) \
  212.     | sed -e 's|$(srcdir)/|$$(srcdir)/|g' \
  213.           -e 's| /[^ ]*[.]h||g' \
  214.           -e 's| [.]\([^ ]*/libio/[^ ]*[.]h\)| $$(MULTITOP)/.\1|g' \
  215.           -e 's| [.]\([^ ]*/libstdc++/[^ ]*[.]h\)| $$(MULTITOP)/.\1|g' \
  216.           -e '/^[     ]*\\$$/d' -e 's/^[     ]*$$//' \
  217.     | awk 'BEGIN   { prev = "" } \
  218.           /^( )*$$/ { if (prev ~ /\\$$/) \
  219.                         { prev = substr(prev,1,length(prev)-1); next } } \
  220.                     { print prev; prev = $$0 } \
  221.           END { if (prev !~ /^( )*$$/) print prev }' \
  222.     >> depend.new
  223. $(srcdir)/depend:  depend.new
  224.     mv depend.new $(srcdir)/depend
  225. # End of package fragment generated by /kalessin/giga/bothner/dist/devo/libstdc++/config.shared.
  226.