Makefile.in revision 17721
1# Makefile for GNU CVS contributed sources.
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.6 94/10/22 $
20
21SHELL = /bin/sh
22
23srcdir     = @srcdir@
24top_srcdir = @top_srcdir@
25VPATH      = @srcdir@
26
27prefix = @prefix@
28exec_prefix = @exec_prefix@
29
30# Where to install the executables.
31bindir = $(exec_prefix)/bin
32
33# Where to put the system-wide .cvsrc file
34libdir = $(prefix)/lib
35
36# Where to put the manual pages.
37mandir = $(prefix)/man
38
39# where to find command interpreters
40perl_path = @perl_path@
41csh_path = @csh_path@
42
43# Use cp if you don't have install.
44INSTALL = @INSTALL@
45INSTALL_DATA = @INSTALL_DATA@
46INSTALL_PROGRAM = @INSTALL_PROGRAM@
47
48DISTFILES = \
49	ChangeLog README .cvsignore intro.doc \
50	Makefile.in clmerge.pl cln_hist.pl commit_prep.pl cvs_acls.pl \
51	cvscheck.sh cvscheck.man cvshelp.man descend.sh descend.man \
52	dirfns.shar log.pl log_accum.pl mfpipe.pl rcs-to-cvs.sh rcs2log.sh \
53	rcslock.pl sccs2rcs.csh rcs2sccs.sh
54
55# files installed in $(libdir)/cvs/contrib
56#
57CONTRIB_FILES = README intro.doc cvscheck.man
58
59# things we actually build and install....
60#
61PROGS = rcs2log
62CONTRIB_PROGS = clmerge cln_hist commit_prep cvs_acls cvscheck log log_accum \
63	mfpipe rcs-to-cvs rcs2log rcslock sccs2rcs
64
65.SUFFIXES: .pl .sh .csh
66
67.pl:
68	rm -f $@
69	sed -e 's,xPERL_PATHx,$(perl_path),' $< > $@-t
70	mv $@-t $@
71	chmod +x $@
72
73.csh:
74	rm -f $@
75	sed -e 's,xCSH_PATHx,$(csh_path),' $< > $@-t
76	mv $@-t $@
77	chmod +x $@
78
79.sh:
80	rm -f $@
81	cp $< $@
82	chmod +x $@
83
84all: Makefile $(PROGS) $(CONTRIB_PROGS)
85.PHONY: all
86
87install: all $(libdir)/cvs/contrib
88	for f in $(CONTRIB_FILES) ; do\
89		$(INSTALL_DATA) $(srcdir)/$$f $(libdir)/cvs/contrib/$$f; \
90	done
91	for f in $(CONTRIB_PROGS) ; do\
92		$(INSTALL_PROGRAM) $$f $(libdir)/cvs/contrib/$$f; \
93	done
94	for f in $(PROGS) ; do\
95		$(INSTALL_PROGRAM) $$f $(bindir)/$$f; \
96	done
97	@echo "You might consider running 'cvsinit' to upgrade your repository(s)...."
98.PHONY: install
99
100$(libdir)/cvs/contrib:
101	$(top_srcdir)/mkinstalldirs $(libdir)/cvs/contrib
102
103tags:
104.PHONY: tags
105
106TAGS:
107.PHONY: TAGS
108
109ls:
110	@echo $(DISTFILES)
111.PHONY: ls
112
113clean:
114	/bin/rm -f *.o core
115.PHONY: clean
116
117distclean: clean
118	rm -f Makefile elib/Makefile $(PROGS) $(CONTRIB_PROGS)
119.PHONY: distclean
120
121realclean: distclean
122.PHONY: realclean
123
124dist-dir:
125	mkdir ${DISTDIR}
126	for i in ${DISTFILES}; do \
127	  ln $(srcdir)/$${i} ${DISTDIR}; \
128	done
129	cd elib; ${MAKE} dist-dir DISTDIR="../${DISTDIR}/elib"
130.PHONY: dist-dir
131
132subdir = contrib
133Makefile: ../config.status Makefile.in
134	cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
135