home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Source / GNU / gcc / obcp / Make-lang.in < prev    next >
Text File  |  1996-07-22  |  5KB  |  150 lines

  1. # Top level makefile fragment for GNU Objective-C++.
  2. #   Copyright (C) 1994, 1995 Free Software Foundation, Inc.
  3.  
  4. #This file is part of GNU CC.
  5.  
  6. #GNU CC is free software; you can redistribute it and/or modify
  7. #it under the terms of the GNU General Public License as published by
  8. #the Free Software Foundation; either version 2, or (at your option)
  9. #any later version.
  10.  
  11. #GNU CC is distributed in the hope that it will be useful,
  12. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. #GNU General Public License for more details.
  15.  
  16. #You should have received a copy of the GNU General Public License
  17. #along with GNU CC; see the file COPYING.  If not, write to
  18. #the Free Software Foundation, 59 Temple Place - Suite 330,
  19. #Boston, MA 02111-1307, USA.
  20.  
  21. # This file provides the language dependent support in the main Makefile.
  22. # Each language makefile fragment must provide the following targets:
  23. #
  24. # foo.all.build, foo.all.cross, foo.start.encap, foo.rest.encap,
  25. # foo.info, foo.dvi,
  26. # foo.install-normal, foo.install-common, foo.install-info, foo.install-man,
  27. # foo.uninstall, foo.distdir,
  28. # foo.mostlyclean, foo.clean, foo.distclean, foo.extraclean,
  29. # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
  30. #
  31. # where `foo' is the name of the language.
  32. #
  33. # It should also provide rules for:
  34. #
  35. # - making any compiler driver (eg: g++)
  36. # - the compiler proper (eg: cc1objplus)
  37. # - define the names for selecting the language in LANGUAGES.
  38.  
  39. # Extra flags to pass to recursive makes.
  40. OBJCXX_FLAGS_TO_PASS = \
  41.     "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
  42.     "OBJCXXFLAGS=$(OBJCXXFLAGS)" \
  43.     "CXX_FOR_TARGET=$(CXX_FOR_TARGET)"
  44.  
  45. # Define the names for selecting c++ in LANGUAGES.
  46. # Note that it would be nice to move the dependency on g++
  47. # into the C++ rule, but that needs a little bit of work
  48. # to do the right thing within all.cross.
  49. OBJC++ objc++ OBJECTIVE-C++ objective-c++: cc1objplus$(exeext)
  50.  
  51. # Tell GNU make to ignore these if they exist.
  52. .PHONY: OBJC++ objc++ OBJECTIVE-C++ objective-c++
  53.  
  54. OBJCCXX_SRCS = $(srcdir)/obcp/call.c $(srcdir)/obcp/decl2.c \
  55.  $(srcdir)/obcp/except.c $(srcdir)/obcp/input.c $(srcdir)/obcp/pt.c \
  56.  $(srcdir)/obcp/spew.c $(srcdir)/obcp/xref.c $(srcdir)/obcp/class.c \
  57.  $(srcdir)/obcp/edsel.c $(srcdir)/obcp/expr.c $(srcdir)/obcp/lex.c \
  58.  $(srcdir)/obcp/ptree.c $(srcdir)/obcp/tree.c $(srcdir)/obcp/cvt.c \
  59.  $(srcdir)/obcp/errfn.c $(srcdir)/obcp/gc.c $(srcdir)/obcp/method.c \
  60.  $(srcdir)/obcp/search.c $(srcdir)/obcp/typeck.c $(srcdir)/obcp/decl.c \
  61.  $(srcdir)/obcp/error.c $(srcdir)/obcp/init.c $(srcdir)/obcp/parse.in \
  62.  $(srcdir)/obcp/sig.c $(srcdir)/obcp/typeck2.c $(srcdir)/obcp/repo.c
  63.  
  64. cc1objplus$(exeext): $(P) $(OBJCCXX_SRCS) $(LIBDEPS) stamp-objlist c-common.o c-pragma.o
  65.     cd obcp; $(MAKE) $(FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) ../cc1objplus
  66.  
  67. # Build hooks:
  68.  
  69. objective-c++.all.build:
  70. objective-c++.all.cross:
  71. objective-c++.start.encap:
  72. objective-c++.rest.encap:
  73.  
  74. objective-c++.info:
  75. objective-c++.dvi:
  76.  
  77. # Install hooks:
  78. # cc1objplus is installed elsewhere as part of $(COMPILERS).
  79.  
  80. # Nothing to do here.
  81. objective-c++.install-normal:
  82.  
  83. # Install the driver program as $(target)-g++
  84. # and also as either g++ (if native) or $(tooldir)/bin/g++.
  85. objective-c++.install-common:
  86.     -if [ -f cc1objplus$(exeext) ] ; then \
  87.       if [ -f g++-cross$(exeext) ] ; then \
  88.         rm -f $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
  89.         $(INSTALL_PROGRAM) g++-cross$(exeext) $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
  90.         chmod a+x $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
  91.         rm -f $(bindir)/$(CXX_CROSS_NAME)$(exeext); \
  92.         ln $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext) \
  93.           > $(NULL) 2>&1 \
  94.           || cp $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext) ; \
  95.       else \
  96.         rm -f $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
  97.         $(INSTALL_PROGRAM) g++$(exeext) $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
  98.         chmod a+x $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
  99.         rm -f $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
  100.         ln $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext) \
  101.           > $(NULL) 2>&1 \
  102.           || cp $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext) ; \
  103.       fi ; \
  104.     fi
  105.  
  106. objective-c++.install-info:
  107.  
  108. objective-c++.install-man:
  109.  
  110. objective-c++.uninstall:
  111.  
  112. # Clean hooks:
  113. # A lot of the ancillary files are deleted by the main makefile.
  114. # We just have to delete files specific to us.
  115.  
  116. objective-c++.mostlyclean:
  117.     -rm -f obcp/*$(objext)
  118. objective-c++.clean:
  119. objective-c++.distclean:
  120.     -rm -f obcp/config.status obcp/Makefile
  121.     -rm -f obcp/parse.output
  122. objective-c++.extraclean:
  123. objective-c++.maintainer-clean:
  124.     -rm -f obcp/parse.c obcp/parse.h
  125.  
  126. # Stage hooks:
  127. # The main makefile has already created stage?/obcp.
  128.  
  129. objective-c++.stage1:
  130.     -mv obcp/*$(objext) stage1/obcp
  131. objective-c++.stage2:
  132.     -mv obcp/*$(objext) stage2/obcp
  133. objective-c++.stage3:
  134.     -mv obcp/*$(objext) stage3/obcp
  135. objective-c++.stage4:
  136.     -mv obcp/*$(objext) stage4/obcp
  137.  
  138. # Maintenance hooks:
  139.  
  140. # This target creates the files that can be rebuilt, but go in the
  141. # distribution anyway.  It then copies the files to the distdir directory.
  142. objective-c++.distdir:
  143.     mkdir tmp/obcp
  144.     cd obcp ; \
  145.     $(MAKE) $(FLAGS_TO_PASS) $(OBJCXX_FLAGS_TO_PASS) parse.c hash.h
  146.     cd obcp; \
  147.     for file in *[0-9a-zA-Z+]; do \
  148.       ln $$file ../tmp/obcp >$(NULL) 2>&1 || cp $$file ../tmp/obcp; \
  149.     done
  150.