xref: /openbsd/gnu/usr.bin/cvs/contrib/Makefile.am (revision 0940c31d)
1## Process this file with automake to produce Makefile.in
2# Makefile for GNU CVS contributed sources.
3# Do not use this makefile directly, but only from `../Makefile'.
4# Copyright (C) 1986, 1988-1990 Free Software Foundation, Inc.
5
6# This program 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# This program 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# DISTFILES = \
17# 	ChangeLog README .cvsignore intro.doc \
18# 	Makefile.in clmerge.pl cln_hist.pl commit_prep.pl cvs2vendor.sh \
19# 	cvs_acls.pl cvscheck.sh cvscheck.man cvshelp.man debug_check_log.sh \
20# 	descend.sh \
21# 	descend.man dirfns.shar log.pl log_accum.pl mfpipe.pl rcs-to-cvs.sh \
22# 	rcs2log.sh rcslock.pl sccs2rcs.csh rcs2sccs.sh
23
24# files installed in $(pkgdatadir)
25#
26# CONTRIB_FILES = README intro.doc cvscheck.man
27
28contribscriptdir = $(pkglibexecdir)/contrib
29contribdatadir   = $(pkgdatadir)/contrib
30
31contrib_SCRIPTS = \
32	clmerge \
33	cln_hist \
34	commit_prep \
35	cvs2vendor \
36	cvs_acls \
37	cvscheck \
38	debug_check_log \
39	log \
40	log_accum \
41	mfpipe \
42	rcs-to-cvs \
43	rcs2log \
44	rcslock \
45	sccs2rcs
46
47contrib_DATA = \
48	README \
49	intro.doc
50
51contrib_MANS = \
52	cvscheck.man
53
54bin_LINKS = \
55	rcs2log
56
57EXTRA_DIST = \
58	.cvsignore \
59	$(contrib_DATA) \
60	$(contrib_MANS) \
61	cvs2vendor.sh \
62	cvscheck.sh \
63	cvshelp.man \
64	debug_check_log.sh \
65	descend.sh \
66	descend.man \
67	dirfns.shar \
68	rcs-to-cvs.sh \
69	rcs2log.sh \
70	rcs2sccs.sh
71
72CLEANFILES = $(bin_SCRIPTS) $(contrib_SCRIPTS)
73
74# we'd rather have a link here rather than two copies of a script
75install-data-local:
76	# FIXME - this path should be determined dynamically from bindir
77	# & contribdir
78	@$(NORMAL_INSTALL)
79	$(mkinstalldirs) $(DESTDIR)$(bindir)
80	@list='$(bin_LINKS)'; for p in $$list; do \
81	    echo "test ! -e $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
82	    echo "  && cd $(DESTDIR)$(bindir) && $(LN_S) ../share/$(PACKAGE)/contrib/`echo $$p|sed '$(transform)'` ."; \
83	    (test ! -e $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'` \
84	        && cd $(DESTDIR)$(bindir) && $(LN_S) ../share/$(PACKAGE)/contrib/`echo $$p|sed '$(transform)'` .) \
85	      || (echo "Link creation failed" && if test -f $$p; then \
86	           echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
87	           $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
88	         else if test -f $(srcdir)/$$p; then \
89	           echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
90	           $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
91	         else :; fi; fi); \
92	done
93
94uninstall-local:
95	@$(NORMAL_UNINSTALL)
96	list='$(bin_LINKS)'; for p in $$list; do \
97	  rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
98	done
99
100SUFFIXES = .sh
101
102.sh:
103	rm -f $@
104	cp $< $@
105	chmod +x $@
106
107# for backwards compatibility with the old makefiles
108realclean: maintainer-clean
109.PHONY: realclean
110