home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / cvs-1.8.7-src.tgz / tar.out / fsf / cvs / src / Makefile.in < prev    next >
Makefile  |  1996-09-28  |  5KB  |  202 lines

  1. # Makefile for GNU CVS program.
  2. # Do not use this makefile directly, but only from `../Makefile'.
  3. # Copyright (C) 1986, 1988-1990 Free Software Foundation, Inc.
  4.  
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2, or (at your option)
  8. # any later version.
  9.  
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14.  
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. # $CVSid: @(#)Makefile.in 1.19 94/09/29 $
  20.  
  21. SHELL = /bin/sh
  22.  
  23. srcdir     = @srcdir@
  24. top_srcdir = @top_srcdir@
  25. VPATH      = @srcdir@
  26.  
  27. prefix = @prefix@
  28. exec_prefix = @exec_prefix@
  29.  
  30. # Where to install the executables.
  31. bindir = $(exec_prefix)/bin
  32.  
  33. # Where to put the system-wide .cvsrc file
  34. libdir = $(prefix)/lib
  35.  
  36. # Where to put the manual pages.
  37. mandir = $(prefix)/man
  38.  
  39. # Use cp if you don't have install.
  40. INSTALL = @INSTALL@
  41. INSTALL_DATA = @INSTALL_DATA@
  42. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  43.  
  44. LIBS = @LIBS@
  45.  
  46. SOURCES = add.c admin.c buffer.c checkin.c checkout.c classify.c client.c \
  47. commit.c create_adm.c cvsrc.c diff.c edit.c entries.c error.c expand_path.c \
  48. fileattr.c find_names.c hash.c history.c ignore.c import.c \
  49. lock.c log.c login.c logmsg.c main.c mkmodules.c modules.c myndbm.c no_diff.c \
  50. parseinfo.c patch.c rcs.c rcscmds.c recurse.c release.c remove.c repos.c \
  51. root.c rtag.c scramble.c server.c status.c subr.c filesubr.c run.c \
  52. tag.c update.c watch.c wrapper.c vers_ts.c version.c zlib.c
  53.  
  54. OBJECTS = add.o admin.o buffer.o checkin.o checkout.o classify.o client.o \
  55. commit.o create_adm.o cvsrc.o diff.o edit.o entries.o expand_path.o \
  56. fileattr.o find_names.o hash.o history.o ignore.o import.o \
  57. lock.o log.o login.o logmsg.o main.o mkmodules.o modules.o myndbm.o no_diff.o \
  58. parseinfo.o patch.o rcs.o rcscmds.o recurse.o release.o remove.o repos.o \
  59. root.o rtag.o scramble.o server.o status.o tag.o update.o \
  60. watch.o wrapper.o vers_ts.o \
  61. subr.o filesubr.o run.o version.o error.o zlib.o
  62.  
  63. HEADERS = buffer.h cvs.h rcs.h hash.h myndbm.h \
  64.     update.h server.h client.h error.h fileattr.h edit.h watch.h
  65.  
  66. TAGFILES = $(HEADERS) options.h.in $(SOURCES)
  67.  
  68. DISTFILES = .cvsignore Makefile.in ChangeLog ChangeLog-9395 ChangeLog-9194 \
  69.         NOTES README-rm-add \
  70.             sanity.sh cvsbug.sh $(TAGFILES)
  71.  
  72. PROGS = cvs cvsbug
  73.  
  74. DEFS = @DEFS@ @includeopt@
  75.  
  76. CC     = @CC@
  77. CFLAGS = @CFLAGS@
  78. CPPFLAGS =
  79. LDFLAGS = @LDFLAGS@
  80.  
  81. INCLUDES = -I. -I.. -I$(srcdir) -I$(top_srcdir)/lib
  82. .c.o:
  83.     $(CC) $(CPPFLAGS) $(INCLUDES) $(DEFS) $(CFLAGS) -c $<
  84.  
  85. all: Makefile $(PROGS)
  86. .PHONY: all
  87.  
  88. saber_cvs:
  89.     @cd ..; $(MAKE) saber SUBDIRS=src
  90.  
  91. lint:
  92.     @cd ..; $(MAKE) lint SUBDIRS=src
  93.  
  94. # CYGNUS LOCAL: Do not depend upon installdirs
  95. install:
  96.     @for prog in $(PROGS); do \
  97.       echo Installing $$prog in $(bindir); \
  98.       $(INSTALL) $$prog $(bindir)/$$prog ; \
  99.     done
  100.  
  101. installdirs:
  102.     $(SHELL) $(top_srcdir)/mkinstalldirs $(bindir)
  103.  
  104. .PHONY: install installdirs
  105.  
  106. installcheck:
  107.     RCSBIN=$(bindir) ; export RCSBIN ; $(SHELL) $(srcdir)/sanity.sh $(bindir)/cvs
  108. .PHONY: installcheck
  109.  
  110. check: all
  111.     if [ -x ../../rcs/src/rcs ] ; then \
  112.         RCSBIN=`pwd`/../../rcs/src ; \
  113.         export RCSBIN ; \
  114.     fi ; \
  115.     $(SHELL) $(srcdir)/sanity.sh `pwd`/cvs
  116. .PHONY: check
  117.  
  118. # I'm not sure there is any remaining reason for this to be separate from
  119. # `make check'.
  120. remotecheck: all
  121.     $(SHELL) $(srcdir)/sanity.sh -r `pwd`/cvs
  122. .PHONY: remotecheck
  123.  
  124. tags: $(TAGFILES)
  125.     ctags $(TAGFILES)
  126.  
  127. TAGS: $(TAGFILES)
  128.     etags `for i in $(TAGFILES); do echo $(srcdir)/$$i; done`
  129.  
  130. ls:
  131.     @echo $(DISTFILES)
  132. .PHONY: ls
  133.  
  134. clean:
  135.     /bin/rm -f $(PROGS) *.o core check.log check.plog
  136. .PHONY: clean
  137.  
  138. distclean: clean
  139.     rm -f tags TAGS Makefile options.h
  140. .PHONY: distclean
  141.  
  142. realclean: distclean
  143. .PHONY: realclean
  144.  
  145. dist-dir:
  146.     mkdir ${DISTDIR}
  147.     for i in ${DISTFILES}; do \
  148.       ln $(srcdir)/$${i} ${DISTDIR}; \
  149.     done
  150. .PHONY: dist-dir
  151.  
  152. # Linking rules.
  153.  
  154. $(PROGS): ../lib/libcvs.a ../zlib/libz.a
  155.  
  156. cvs: $(OBJECTS)
  157.     $(CC) $(OBJECTS) ../lib/libcvs.a ../zlib/libz.a $(LIBS) $(LDFLAGS) -o $@ 
  158.  
  159. xlint: $(SOURCES)
  160.     files= ; \
  161.     for i in $(SOURCES) ; do \
  162.       files="$$files $(srcdir)/$$i" ; \
  163.     done ; \
  164.     sh -c "lint $(DEFS) $(INCLUDES) $$files | grep -v \"possible pointer alignment problem\" \
  165.     | grep -v \"argument closure unused\""
  166.  
  167. saber: $(SOURCES)
  168.     # load $(CFLAGS) $(SOURCES)
  169.     # load ../lib/libcvs.a $(LIBS)
  170.  
  171. cvsbug: cvsbug.sh
  172.     echo > .fname \
  173.       cvs-`sed < $(srcdir)/version.c \
  174.             -e '/version_string/!d' \
  175.             -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
  176.             -e q`
  177.     sed -e 's,xLIBDIRx,$(libdir)/cvs,g' \
  178.         -e "s,xVERSIONx,`cat .fname`,g" $(srcdir)/$@.sh > $@-t
  179.     rm -f .fname
  180.     mv $@-t $@
  181.     chmod a+x $@
  182.  
  183. # Compilation rules.
  184.  
  185. $(OBJECTS): $(HEADERS) options.h
  186.  
  187. zlib.o: zlib.c
  188.     $(CC) $(CPPFLAGS) $(INCLUDES) -I$(top_srcdir)/zlib $(DEFS) $(CFLAGS) -c $(srcdir)/zlib.c
  189.  
  190. subdir = src
  191. Makefile: ../config.status Makefile.in
  192.     cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
  193.  
  194. options.h: ../config.status options.h.in
  195.     cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
  196.  
  197. #../config.status: ../configure
  198. #    cd .. ; $(SHELL) config.status --recheck
  199.  
  200. #../configure: ../configure.in
  201. #    cd $(top_srcdir) ; autoconf
  202.