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