1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
#
# Copyright 2005 Red Hat, Inc.
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of Red Hat not be used in
# advertising or publicity pertaining to distribution of the software without
# specific, written prior permission. Red Hat makes no
# representations about the suitability of this software for any purpose. It
# is provided "as is" without express or implied warranty.
#
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# rstartd server
rstart_serverdir = $(datadir)/X11/rstart
rstart_server_PROGRAMS = rstartd.real
rstartd_real_CFLAGS = $(RSTART_CFLAGS) \
-DSERVERNAME=\"rstart\" \
-DDEFAULT_CONFIG=\"$(rstart_serverdir)/config\"
rstartd_real_LDADD = $(RSTART_LIBS)
rstartd_real_SOURCES = \
auth.c \
server.c
# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM
# to cpp, because that trick does not work on all ANSI C preprocessors.
# Delete line numbers from the cpp output (-P is not portable, I guess).
# Allow XCOMM to be preceded by whitespace and provide a means of generating
# output lines with trailing backslashes.
# Allow XHASH to always be substituted, even in cases where XCOMM isn't.
CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \
-e '/^\#line *[0-9][0-9]* *.*$$/d' \
-e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \
-e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \
-e '/^[ ]*XHASH/s/XHASH/\#/' \
-e '/\@\@$$/s/\@\@$$/\\/'
# config data
configdir = $(datadir)/X11/rstart
config_DATA = config
config: config.cpp
$(RAWCPP) $(RAWCPPFLAGS) -DPACKAGEname=rstart -DLIBDIR=$(configdir) \
-DENVPREFIX=RSTART < ${srcdir}/config.cpp | $(CPP_SED_MAGIC) > $@
# wrapper scripts
bin_SCRIPTS = rstart rstartd
rstart: client.cpp
$(RAWCPP) $(RAWCPPFLAGS) -DRSHCMD=$(RSH) -DSERVERNAME=rstartd \
< ${srcdir}/client.cpp | $(CPP_SED_MAGIC) > $@
rstartd: server.cpp
$(RAWCPP) $(RAWCPPFLAGS) -DBINDIR=$(rstart_serverdir) \
-DLIBDIR=$(configdir) -DSERVERNAME=rstartd < ${srcdir}/server.cpp | \
$(CPP_SED_MAGIC) > $@
# man pages
appmandir = $(APP_MAN_DIR)
appman_PRE = rstartd.man rstart.man
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
# Strings to replace in man pages
XORGRELSTRING = @PACKAGE_STRING@
XORGMANNAME = X Version 11
MANDEFS = -D__projectroot__=$(prefix) \
-D__xorgversion__='"$(XORGRELSTRING)" "$(XORGMANNAME)"'
SUFFIXES = .$(APP_MAN_SUFFIX) .man
.man.$(APP_MAN_SUFFIX):
$(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@
EXTRA_DIST = client.cpp server.cpp config.cpp $(appman_PRE)
CLEANFILES = rstart rstartd config $(appman_DATA)
#
# commands and contexts
#
# FIXME: Someone who cares about rstart may want to look into sanitizing
# the stuff below.
DATA_DIR = $(datadir)/X11/rstart
install-data-hook:
( cd ${srcdir}; \
for name in `find ./commands -print | grep -v CVS` ; do \
if test -f $$name; then \
sed \
-e 's,ENVPREFIX,RSTART,g' \
< $$name > $(DESTDIR)$(DATA_DIR)/$$name; \
case `basename $(DESTDIR)$(DATA_DIR)/$$name` in \
@*) \
;; \
*) \
chmod a+x $(DESTDIR)$(DATA_DIR)/$$name ;; \
esac; \
else \
if [ -d $$name ] ; then \
mkdir -p $(DESTDIR)$(DATA_DIR)/$$name ; \
fi; \
fi; \
done; \
\
for name in `find ./contexts -print | grep -v CVS` ; do \
if test -f $$name; then \
sed \
-e 's,_PATH,$(DEFAULT_USER_PATH),g' \
-e 's,_MANPATH,$(DEFAULT_X_MANPATH),g' \
< $$name > $(DESTDIR)$(DATA_DIR)/$$name ; \
else \
if [ -d $$name ] ; then \
mkdir -p $(DESTDIR)$(DATA_DIR)/$$name ; \
fi ; \
fi ; \
done; \
); \
\
cd $(DESTDIR)$(DATA_DIR)/contexts; \
sed -e '/^$$/d' -e '/^#/d' ${srcdir}/contexts/@Aliases | \
while read real aliases; do \
for i in $$aliases; do \
$(RM) $$i; \
$(LN) $$real $$i; \
$(RM) $(DESTDIR)$(rstart_serverdir)/commands/$$i; \
$(LN) $$real $(DESTDIR)$(rstart_serverdir)/commands/$$i; \
done; \
done; \
$(RM) @Aliases
distuninstallcheck:
@:
EXTRA_DIST += \
server.os2 \
\
commands/ListContexts \
commands/x11r6/Terminal \
commands/x11r6/LoadMonitor \
commands/x11r6/@List \
commands/@List \
commands/ListGenericCommands \
\
contexts/default \
contexts/@Aliases \
contexts/x11r6 \
contexts/@List \
\
samples/commands/openwindows2/Terminal \
samples/commands/openwindows2/LoadMonitor \
samples/commands/openwindows2/@List \
samples/commands/ListContexts \
samples/commands/x11r5/Terminal \
samples/commands/x11r5/LoadMonitor \
samples/commands/x11r5/@List \
samples/commands/odt1/Terminal \
samples/commands/odt1/LoadMonitor \
samples/commands/odt1/@List \
samples/commands/@List \
samples/commands/ListGenericCommands \
samples/commands/openwindows3/Terminal \
samples/commands/openwindows3/LoadMonitor \
samples/commands/openwindows3/@List \
samples/contexts.odt1/openwindows2 \
samples/contexts.odt1/default \
samples/contexts.odt1/@Aliases \
samples/contexts.odt1/x11r5 \
samples/contexts.odt1/odt1 \
samples/contexts.odt1/x11r6 \
samples/contexts.odt1/@List \
samples/contexts.odt1/openwindows3
|