home *** CD-ROM | disk | FTP | other *** search
/ Openstep 4.2 (Developer) / Openstep Developer 4.2.iso / NextDeveloper / Source / GNU / make / make-3.74 / Makefile.in < prev    next >
Encoding:
Makefile  |  1996-01-17  |  10.8 KB  |  314 lines

  1. # NOTE: If you have no `make' program at all to process this makefile, run
  2. # `build.sh' instead.
  3. #
  4. # Copyright (C) 1988, 89, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
  5. # This file is part of GNU Make.
  6. # GNU Make 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 Make 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. # You should have received a copy of the GNU General Public License
  16. # along with GNU Make; see the file COPYING.  If not, write to
  17. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. #
  20. #    Makefile for GNU Make
  21. #
  22.  
  23. # Ultrix 2.2 make doesn't expand the value of VPATH.
  24. VPATH = @srcdir@
  25. # This must repeat the value, because configure will remove `VPATH = .'.
  26. srcdir = @srcdir@
  27.  
  28. CC = @CC@
  29.  
  30. CFLAGS = @CFLAGS@
  31. DEBUG_CFLAGS = -g
  32. CPPFLAGS = @CPPFLAGS@
  33. LDFLAGS = @LDFLAGS@
  34.  
  35. # How to invoke ranlib.  This is only used by the `glob' subdirectory.
  36. RANLIB = /bin/ranlib
  37.  
  38. # Define these for your system as follows:
  39. #    -DNO_ARCHIVES        To disable `ar' archive support.
  40. #    -DNO_FLOAT        To avoid using floating-point numbers.
  41. #    -DENUM_BITFIELDS    If the compiler isn't GCC but groks enum foo:2.
  42. #                Some compilers apparently accept this
  43. #                without complaint but produce losing code,
  44. #                so beware.
  45. # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
  46. # See also `config.h'.
  47. defines = @DEFS@ -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\"
  48.  
  49. # Which flavor of remote job execution support to use.
  50. # The code is found in `remote-$(REMOTE).c'.
  51. REMOTE = @REMOTE@
  52.  
  53. # If you are using the GNU C library, or have the GNU getopt functions in
  54. # your C library, you can comment these out.
  55. GETOPT = getopt.o getopt1.o
  56. GETOPT_SRC = $(srcdir)/getopt.c $(srcdir)/getopt1.c $(srcdir)/getopt.h
  57.  
  58. # If you are using the GNU C library, or have the GNU glob functions in
  59. # your C library, you can comment this out.  GNU make uses special hooks
  60. # into the glob functions to be more efficient (by using make's directory
  61. # cache for globbing), so you must use the GNU functions even if your
  62. # system's C library has the 1003.2 glob functions already.  Also, the glob
  63. # functions in the AIX and HPUX C libraries are said to be buggy.
  64. GLOB = glob/libglob.a
  65.  
  66. # If your system doesn't have alloca, or the one provided is bad, define this.
  67. ALLOCA = @ALLOCA@
  68. ALLOCA_SRC = $(srcdir)/alloca.c
  69.  
  70. # If your system needs extra libraries loaded in, define them here.
  71. # System V probably need -lPW for alloca.  HP-UX 7.0's alloca in
  72. # libPW.a is broken on HP9000s300 and HP9000s400 machines.  Use
  73. # alloca.c instead on those machines.
  74. LOADLIBES = @LIBS@
  75.  
  76. # Any extra object files your system needs.
  77. extras = @LIBOBJS@
  78.  
  79. # Common prefix for machine-independent installed files.
  80. prefix = @prefix@
  81. # Common prefix for machine-dependent installed files.
  82. exec_prefix = @exec_prefix@
  83.  
  84. # Directory to install `make' in.
  85. bindir = $(exec_prefix)/bin
  86. # Directory to find libraries in for `-lXXX'.
  87. libdir = $(exec_prefix)/lib
  88. # Directory to search by default for included makefiles.
  89. includedir = $(prefix)/include
  90. # Directory to install the Info files in.
  91. infodir = $(prefix)/info
  92. # Directory to install the man page in.
  93. mandir = $(prefix)/man/man$(manext)
  94. # Number to put on the man page filename.
  95. manext = 1
  96. # Prefix to put on installed `make' binary file name.
  97. binprefix =
  98. # Prefix to put on installed `make' man page file name.
  99. manprefix = $(binprefix)
  100.  
  101. # Whether or not make needs to be installed setgid.
  102. # The value should be either `true' or `false'.
  103. # On many systems, the getloadavg function (used to implement the `-l'
  104. # switch) will not work unless make is installed setgid kmem.
  105. install_setgid = @NEED_SETGID@
  106. # Install make setgid to this group so it can read /dev/kmem.
  107. group = @KMEM_GROUP@
  108.  
  109. # Program to install `make'.
  110. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  111. # Program to install the man page.
  112. INSTALL_DATA = @INSTALL_DATA@
  113. # Generic install program.
  114. INSTALL = @INSTALL@
  115.  
  116. # Program to format Texinfo source into Info files.
  117. MAKEINFO = makeinfo
  118. # Program to format Texinfo source into DVI files.
  119. TEXI2DVI = texi2dvi
  120.  
  121. # Programs to make tags files.
  122. ETAGS = etags -w
  123. CTAGS = ctags -w
  124.  
  125. objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o    \
  126.        rule.o implicit.o default.o variable.o expand.o function.o    \
  127.        vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o    \
  128.        nt.o readdir.o next.o                        \
  129.        $(GLOB) $(GETOPT) $(ALLOCA) $(extras)
  130. srcs = $(srcdir)/commands.c $(srcdir)/job.c $(srcdir)/dir.c        \
  131.        $(srcdir)/file.c $(srcdir)/getloadavg.c $(srcdir)/misc.c        \
  132.        $(srcdir)/main.c $(srcdir)/read.c $(srcdir)/remake.c        \
  133.        $(srcdir)/rule.c $(srcdir)/implicit.c $(srcdir)/default.c    \
  134.        $(srcdir)/variable.c $(srcdir)/expand.c $(srcdir)/function.c    \
  135.        $(srcdir)/vpath.c $(srcdir)/version.c                \
  136.        $(srcdir)/remote-$(REMOTE).c                    \
  137.        $(srcdir)/ar.c $(srcdir)/arscan.c                \
  138.        $(srcdir)/nt.c $(srcdir)/readdir.c $(srcdir)/next.c        \
  139.        $(srcdir)/signame.c $(srcdir)/signame.h $(GETOPT_SRC)        \
  140.        $(srcdir)/commands.h $(srcdir)/dep.h $(srcdir)/file.h        \
  141.        $(srcdir)/job.h $(srcdir)/make.h $(srcdir)/rule.h        \
  142.        $(srcdir)/variable.h $(ALLOCA_SRC) $(srcdir)/config.h.in next.ca
  143.  
  144.  
  145. .SUFFIXES:
  146. .SUFFIXES: .o .c .h .ps .dvi .info .texinfo
  147.  
  148. all: make
  149. info: make.info
  150. dvi: make.dvi
  151. # Some makes apparently use .PHONY as the default goal if it is before `all'.
  152. .PHONY: all check info dvi
  153.  
  154. make.info: make.texinfo
  155.     $(MAKEINFO) -I$(srcdir) $(srcdir)/make.texinfo -o make.info
  156.  
  157. make.dvi: make.texinfo
  158.     $(TEXI2DVI) $(srcdir)/make.texinfo
  159.  
  160. make.ps: make.dvi
  161.     dvi2ps make.dvi > make.ps
  162.  
  163. make: $(objs)
  164.     $(CC) $(LDFLAGS) $(DEBUG_CFLAGS) $(objs) $(LOADLIBES) -o make.new
  165.     mv -f make.new make
  166.  
  167. # -I. is needed to find config.h in the build directory.
  168. .c.o:
  169.     $(CC) $(defines) -c -I. -I$(srcdir) -I$(srcdir)/glob \
  170.           $(CPPFLAGS) $(CFLAGS) $(DEBUG_CFLAGS) $< $(OUTPUT_OPTION)
  171.  
  172. # For some losing Unix makes.
  173. # @SET_MAKE@
  174.  
  175. glob/libglob.a:
  176.     cd glob && $(MAKE) libglob.a "CFLAGS = $(CFLAGS) $(DEBUG_CFLAGS)"
  177.  
  178. FORCE:
  179.  
  180. tagsrcs = $(srcs) $(srcdir)/remote-*.c
  181. TAGS: $(tagsrcs)
  182.     $(ETAGS) $(tagsrcs)
  183. tags: $(tagsrcs)
  184.     $(CTAGS) $(tagsrcs)
  185.  
  186. .PHONY: install installdirs
  187. install: installdirs \
  188.      $(bindir)/$(binprefix)make $(infodir)/make.info \
  189.      $(mandir)/$(manprefix)make.$(manext)
  190.  
  191. installdirs:
  192.     $(SHELL) $(srcdir)/mkinstalldirs $(bindir) $(infodir) $(mandir)
  193.  
  194. $(bindir)/$(binprefix)make: make
  195.     $(INSTALL_PROGRAM) make $@.new
  196.     @if $(install_setgid); then \
  197.        if chgrp $(group) $@.new && chmod g+s $@.new; then \
  198.          echo "chgrp $(group) $@.new && chmod g+s $@.new"; \
  199.        else \
  200.          echo "$@ needs to be owned by group $(group) and setgid;"; \
  201.          echo "otherwise the \`-l' option will probably not work."; \
  202.          echo "You may need special privileges to install $@."; \
  203.        fi; \
  204.      else true; fi
  205. # Some systems can't deal with renaming onto a running binary.
  206.     -rm -f $@.old
  207.     -mv $@ $@.old
  208.     mv $@.new $@
  209.  
  210. $(infodir)/make.info: make.info
  211.     if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
  212.     for file in $${dir}/make.info*; do \
  213.       name="`basename $$file`"; \
  214.       $(INSTALL_DATA) $$file \
  215.         `echo $@ | sed "s,make.info\$$,$$name,"`; \
  216.     done
  217. # Run install-info only if it exists.
  218. # Use `if' instead of just prepending `-' to the
  219. # line so we notice real errors from install-info.
  220. # We use `$(SHELL) -c' because some shells do not
  221. # fail gracefully when there is an unknown command.
  222.     if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
  223.       if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
  224.       install-info --infodir=$(infodir) $$dir/make.info; \
  225.     else true; fi
  226.  
  227. $(mandir)/$(manprefix)make.$(manext): make.man
  228.     $(INSTALL_DATA) $(srcdir)/make.man $@
  229.  
  230.  
  231. loadavg: loadavg.c config.h
  232.     $(CC) $(defines) -DTEST -I. -I$(srcdir) $(CFLAGS) $(DEBUG_CFLAGS) $(LDFLAGS) \
  233.           loadavg.c $(LOADLIBES) -o $@
  234. # We copy getloadavg.c into a different file rather than compiling it
  235. # directly because some compilers clobber getloadavg.o in the process.
  236. loadavg.c: getloadavg.c
  237.     ln $(srcdir)/getloadavg.c loadavg.c || \
  238.     cp $(srcdir)/getloadavg.c loadavg.c
  239. check-loadavg: loadavg
  240.     @echo The system uptime program believes the load average to be:
  241.     -uptime
  242.     @echo The GNU load average checking code believes:
  243.     ./loadavg
  244. check: check-loadavg
  245.  
  246.  
  247. .PHONY: clean realclean distclean mostlyclean
  248. clean: glob-clean
  249.     -rm -f make loadavg *.o core make.dvi
  250. distclean: clean glob-realclean
  251.     -rm -f Makefile config.h config.status build.sh stamp-config
  252.     -rm -f config.log config.cache
  253.     -rm -f TAGS tags
  254.     -rm -f make.?? make.??s make.log make.toc make.*aux
  255.     -rm -f loadavg.c
  256. realclean: distclean
  257.     -rm -f make.info*
  258. mostlyclean: clean
  259.  
  260. .PHONY: glob-clean glob-realclean
  261. glob-clean glob-realclean:
  262.     cd glob && $(MAKE) $@
  263.  
  264. Makefile: config.status $(srcdir)/Makefile.in
  265.     $(SHELL) config.status
  266. glob/Makefile: config.status $(srcdir)/glob/Makefile.in
  267.     $(SHELL) config.status
  268. config.h: stamp-config
  269. stamp-config: config.status $(srcdir)/config.h.in
  270.     $(SHELL) config.status
  271.     touch stamp-config
  272.  
  273. #configure: configure.in aclocal.m4
  274. #    cd $(srcdir) && autoconf $(ACFLAGS)
  275. #config.h.in: configure.in aclocal.m4
  276. #    cd $(srcdir) && autoheader $(ACFLAGS)
  277.  
  278. # This tells versions [3.59,3.63) of GNU make not to export all variables.
  279. .NOEXPORT:
  280.  
  281. # The automatically generated dependencies below may omit config.h
  282. # because it is included with ``#include <config.h>'' rather than
  283. # ``#include "config.h"''.  So we add the explicit dependency to make sure.
  284. $(objs): config.h
  285.  
  286. # Automatically generated dependencies will be put at the end of the file.
  287.  
  288. # Automatically generated dependencies.
  289. commands.o : commands.c make.h dep.h commands.h file.h variable.h job.h 
  290. job.o: job.c make.h commands.h job.h file.h variable.h
  291. dir.o: dir.c make.h
  292. file.o: file.c make.h commands.h dep.h file.h variable.h
  293. misc.o: misc.c make.h dep.h
  294. main.o: main.c make.h commands.h dep.h file.h variable.h job.h getopt.h
  295. read.o: read.c make.h commands.h dep.h file.h variable.h glob/glob.h
  296. remake.o: remake.c make.h commands.h job.h dep.h file.h
  297. rule.o : rule.c make.h config.h commands.h dep.h file.h variable.h rule.h 
  298. implicit.o : implicit.c make.h rule.h dep.h file.h 
  299. default.o: default.c make.h rule.h dep.h file.h commands.h variable.h
  300. variable.o : variable.c make.h commands.h variable.h dep.h file.h 
  301. expand.o: expand.c make.h commands.h file.h variable.h
  302. function.o: function.c make.h variable.h dep.h commands.h job.h
  303. vpath.o : vpath.c make.h file.h variable.h 
  304. version.o: version.c
  305. ar.o : ar.c make.h file.h dep.h 
  306. arscan.o: arscan.c make.h
  307. signame.o: signame.c signame.h
  308. remote-stub.o : remote-stub.c make.h commands.h 
  309. getopt.o: getopt.c getopt.h
  310. getopt1.o : getopt1.c getopt.h 
  311. getloadavg.o: getloadavg.c
  312.