/
Imakefile
87 lines (64 loc) · 2.86 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
PROGRAMS = amiwm requestchoice executecmd
AMIWM_HOME = /usr/X11/lib/X11/amiwm
SRCS1 = main.c drawinfo.c client.c frame.c icc.c \
icon.c menu.c diskobject.c gram.c lex.c rc.c
OBJS1 = main.o drawinfo.o client.o frame.o icc.o \
icon.o menu.o diskobject.o gram.o lex.o rc.o
SRCS2 = requestchoice.c drawinfo.c
OBJS2 = requestchoice.o drawinfo.o
SRCS3 = executecmd.c drawinfo.c
OBJS3 = executecmd.o drawinfo.o
YFLAGS = -d
all::
/* Some old implementations does not have LexFile and YaccFile... */
#ifndef LexFile
#define LexFile(file) @@\
depend:: file.c @@\
@@\
clean:: @@\
$(RM) lex.yy.c file.c
#endif /* LexFile */
#ifndef YaccFile
#define YaccFile(file,flags) @@\
depend:: file.c @@\
@@\
file.h file.c: file.y @@\
$(YACC) flags file.y @@\
$(MV) y.tab.c file.c @@\
$(MV) y.tab.h file.h @@\
@@\
clean:: @@\
$(RM) y.tab.c y.tab.h file.h file.c
#endif /* YaccFile */
LexFile(lex)
YaccFile(gram,$(YFLAGS))
ComplexProgramTarget_1(amiwm, $(XLIB) $(XMULIB), $(OTHER_LIBS))
ComplexProgramTarget_2(requestchoice, $(XLIB), $(OTHER_LIBS))
ComplexProgramTarget_3(executecmd, $(XLIB), $(OTHER_LIBS))
SpecialCObjectRule(menu,$(_NOOP_),'-DAMIWM_HOME="$(AMIWM_HOME)"')
SpecialCObjectRule(rc,$(_NOOP_),'-DAMIWM_HOME="$(AMIWM_HOME)"')
install ::
MakeDir($(AMIWM_HOME))
RemoveFile($(AMIWM_HOME)/requestchoice)
$(LN) $(BINDIR)/requestchoice $(AMIWM_HOME)/requestchoice
RemoveFile($(AMIWM_HOME)/executecmd)
$(LN) $(BINDIR)/executecmd $(AMIWM_HOME)/executecmd
InstallNonExec(system.amiwmrc, $(AMIWM_HOME)/system.amiwmrc)
InstallNonExec(def_tool.info, $(AMIWM_HOME)/def_tool.info)
/* Targets for my private use. Not very portable. // Marcus */
DISTFILES = README INSTALL Imakefile smakefile scoptions *.[chly] \
system.amiwmrc def_tool.info
patch :
mv version.h old_version.h
sed < old_version.h 's/l/"/' | awk '-F"' '{ printf "%s\"%sl%s\"\n",$$1,$$2,1+$$3 }' > version.h
rm old_version.h
dist : version.h clean
( version=`sed < version.h -e 's/^[^"]*"//' -e 's/"[^"]*$$//'`; \
tarname="amiwm$$version.tar"; \
mkdir amiwm; \
cp $(DISTFILES) amiwm/; \
rm -f $$tarname $$tarname.gz; \
tar cf $$tarname amiwm; \
rm -rf amiwm/; \
gzip $$tarname; \
)