Makefile.am revision 4d9b34d9
1# $Id: Makefile.am,v 1.1.1.1 2008/07/30 04:13:35 mrg Exp $
2# 
3#  Copyright 2005  Red Hat, Inc.
4# 
5#  Permission to use, copy, modify, distribute, and sell this software and its
6#  documentation for any purpose is hereby granted without fee, provided that
7#  the above copyright notice appear in all copies and that both that
8#  copyright notice and this permission notice appear in supporting
9#  documentation, and that the name of Red Hat not be used in
10#  advertising or publicity pertaining to distribution of the software without
11#  specific, written prior permission.  Red Hat makes no
12#  representations about the suitability of this software for any purpose.  It
13#  is provided "as is" without express or implied warranty.
14# 
15#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
17#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
18#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
19#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
20#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
21#  PERFORMANCE OF THIS SOFTWARE.
22
23bin_PROGRAMS = xcalc
24
25AM_CFLAGS = $(XCALC_CFLAGS)
26xcalc_LDADD = $(XCALC_LIBS) -lm
27
28xcalc_SOURCES =	\
29        actions.c \
30        actions.h \
31        math.c \
32        xcalc.c \
33        xcalc.h
34
35appman_PRE = \
36        xcalc.man
37
38# App default files  (*.ad)
39
40appdefaultdir = @appdefaultdir@
41
42
43APPDEFAULTFILES = \
44        XCalc \
45        XCalc-color
46
47SUFFIXES = .ad 
48
49.ad:
50	cp $< $@
51
52appdefault_DATA = $(APPDEFAULTFILES)
53
54EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) ChangeLog autogen.sh
55
56CLEANFILES = $(APPDEFAULTFILES)
57
58MAINTAINERCLEANFILES = ChangeLog
59
60.PHONY: ChangeLog
61
62ChangeLog:
63	(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
64
65dist-hook: ChangeLog
66
67appmandir = $(APP_MAN_DIR)
68
69appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
70
71EXTRA_DIST += $(appman_PRE)
72CLEANFILES += $(appman_DATA)
73
74SED = sed
75
76# Strings to replace in man pages
77XORGRELSTRING = @PACKAGE_STRING@
78  XORGMANNAME = X Version 11
79
80MAN_SUBSTS = \
81	-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
82	-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
83	-e 's|__xservername__|Xorg|g' \
84	-e 's|__xconfigfile__|xorg.conf|g' \
85	-e 's|__projectroot__|$(prefix)|g' \
86	-e 's|__apploaddir__|$(appdefaultdir)|' \
87	-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
88	-e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
89	-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
90	-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
91	-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
92
93SUFFIXES += .$(APP_MAN_SUFFIX) .man
94
95.man.$(APP_MAN_SUFFIX):
96	sed $(MAN_SUBSTS) < $< > $@
97