forked from sigmavirus24/x11-ssh-askpass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathImakefile
217 lines (174 loc) · 4.64 KB
/
Imakefile
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
XCOMM Imakefile: How to build x11-ssh-askpass, using xmkmf and then make
XCOMM
XCOMM by Jim Knoble <jmknoble@pobox.com>
XCOMM Copyright (C) 1999,2000,2001 Jim Knoble
XCOMM
XCOMM Disclaimer:
XCOMM
XCOMM This software is provided "as is", without warranty of any kind,
XCOMM express or implied, including but not limited to the warranties of
XCOMM merchantability, fitness for a particular purpose and
XCOMM noninfringement. In no event shall the author(s) be liable for any
XCOMM claim, damages or other liability, whether in an action of
XCOMM contract, tort or otherwise, arising from, out of or in connection
XCOMM with the software or the use or other dealings in the software.
XCOMM
XCOMM Permission to use, copy, modify, distribute, and sell this software
XCOMM and its documentation for any purpose is hereby granted without
XCOMM fee, provided that the above copyright notice appear in all copies
XCOMM and that both that copyright notice and this permission notice
XCOMM appear in supporting documentation.
NAME = x11-ssh-askpass
CLASS = SshAskpass
XCOMM -------- configurable settings --------
BINDIR = /usr/local/libexec
MANPATH = /usr/local/man
MANDIR = $(MANPATH)/man1
APPDEFDIR = $(XAPPLOADDIR)
APP_DEFAULTS = SshAskpass-default.ad
XCOMM CC =
XCOMM CDEBUGFLAGS =
XCOMM LOCAL_LDFLAGS =
XCOMM -------- end configurable settings --------
#ifndef CpCmd
# define CpCmd cp
#endif
#ifndef GzipCmd
# define GzipCmd gzip
#endif
#ifndef LnCmd
# if HasSymLinks
# define LnCmd ln -s
# else
# define LnCmd ln
# endif
#endif
#ifndef MvCmd
# define MvCmd mv -f
#endif
#ifndef RmCmd
# define RmCmd rm -f
#endif
CAT = cat
CHMOD = chmod
CP = CpCmd
GREP = grep
GZIP = GzipCmd
LN = LnCmd
MKDIR = MkdirHierCmd
MV = MvCmd
RM = RmCmd
SED = sed
TAR = tar
MAKE_CHANGELOG = cvs2cl
VERSION = 1.2.4.1
DATE = September 17, 2001
PROJECT = $(NAME)-$(VERSION)
DIST_DIR = $(PROJECT)
DIST = $(PROJECT).tar.gz
HDRS = \@@\
drawing.h \@@\
dynlist.h \@@\
resources.h \@@\
x11-ssh-askpass.h
SRCS = \@@\
drawing.c \@@\
dynlist.c \@@\
resources.c \@@\
x11-ssh-askpass.c
OBJS = \@@\
drawing.o \@@\
dynlist.o \@@\
resources.o \@@\
x11-ssh-askpass.o
MAN_OBJ = $(NAME).man
MAN_SRC = $(MAN_OBJ).in
MANS = $(MAN_SRC)
CHANGELOG = ChangeLog
CONFIGURE = configure
IMAKEFILE_OBJ = Imakefile
IMAKEFILE_SRC = $(IMAKEFILE_OBJ).in
IMAKEFILES = $(IMAKEFILE_SRC)
DOCS = \@@\
README \@@\
TODO
APP_DEFAULTS_FILES = \@@\
$(CLASS)-1337.ad \@@\
$(CLASS)-NeXTish.ad \@@\
$(CLASS)-green.ad \@@\
$(CLASS)-motif.ad \@@\
$(CLASS)-default.ad \@@\
DIST_FILES = \@@\
$(IMAKEFILES) \@@\
$(CONFIGURE) \@@\
$(DOCS) \@@\
$(APP_DEFAULTS_FILES) \@@\
$(MANS) \@@\
$(SRCS) \@@\
$(HDRS)
DIST_EXTRAS = \@@\
$(CHANGELOG) \@@\
$(IMAKEFILE_OBJ)
LOCAL_LIBRARIES = -lXt -lX11 -lSM -lICE
ComplexProgramTarget($(NAME))
install:: install-app-defaults
install-app-defaults: $(CLASS).ad
@if [ -d $(DESTDIR)$(APPDEFDIR) ]; then set +x; \@@\
else (set -x; $(MKDIRHIER) $(DESTDIR)$(APPDEFDIR)); fi
$(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) $(CLASS).ad \@@\
$(DESTDIR)$(APPDEFDIR)/$(CLASS)
install::
@set -x; \@@\
if [ -f $(DESTDIR)$(BINDIR)/ssh-askpass ]; then \@@\
$(MV) $(DESTDIR)$(BINDIR)/ssh-askpass \@@\
$(DESTDIR)$(BINDIR)/ssh-askpass.old; \@@\
fi
$(LN) $(NAME) $(DESTDIR)$(BINDIR)/ssh-askpass
install.man::
@set -x; \@@\
if [ -f $(DESTDIR)$(MANDIR)/ssh-askpass.$(MANSUFFIX) ]; then \@@\
$(MV) $(DESTDIR)$(MANDIR)/ssh-askpass.$(MANSUFFIX) \@@\
$(DESTDIR)$(MANDIR)/ssh-askpass.$(MANSUFFIX).old; \@@\
fi
$(LN) $(NAME).$(MANSUFFIX) $(DESTDIR)$(MANDIR)/ssh-askpass.$(MANSUFFIX)
.PHONY: depends changelog realclean squeakyclean spotless tar dist
all:: $(MAN_OBJ)
$(MAN_OBJ): $(MAN_SRC) $(IMAKEFILE_SRC)
$(SED) \@@\
-e 's#@NAME@#$(NAME)#g' \@@\
-e 's#@VERSION@#$(VERSION)#g' \@@\
-e 's#@DATE@#$(DATE)#g' \@@\
<$(MAN_SRC) >$@.tmp
$(MV) $@.tmp $@
depends: depend
includes:: $(CLASS)_ad.h
$(CLASS).ad:
$(LN) $(APP_DEFAULTS) $(CLASS).ad
$(CLASS)_ad.h: $(CLASS).ad
$(SED) -n '/^[^!]/s/.*/"&",/p' <$(CLASS).ad >$@.tmp
$(MV) $@.tmp $@
changelog: $(CHANGELOG)
$(CHANGELOG): $(DIST_FILES)
$(MAKE_CHANGELOG)
$(IMAKEFILE_OBJ): $(IMAKEFILE_SRC)
./$(CONFIGURE) --defaults
clean::
-$(RM) $(CLASS)_ad.h $(MAN_OBJ)
realclean: clean
-$(RM) $(CLASS).ad
-$(RM) *.LOG *.log
squeakyclean: realclean
-$(RM) Makefile Makefile.bak $(IMAKEFILE_OBJ) $(CHANGELOG)
spotless: squeakyclean
-$(RM) $(DIST)
tar: dist
dist: $(DIST)
$(DIST): $(DIST_EXTRAS) $(DIST_FILES)
-$(RM) -r $(DIST_DIR)
-$(RM) $@.tmp
$(MKDIR) $(DIST_DIR)
$(CP) $(DIST_EXTRAS) $(DIST_FILES) $(DIST_DIR)/
$(CHMOD) -R u+rwX,go+rX,go-w $(DIST_DIR)
$(TAR) -cvf - $(DIST_DIR) |$(GZIP) -9 -c >$@.tmp
$(MV) $@.tmp $@
-$(RM) -r $(DIST_DIR)