File: Makefile

package info (click to toggle)
prayer 1.3.5-dfsg1-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 6,576 kB
  • sloc: ansic: 43,161; makefile: 817; sh: 445; perl: 166
file content (151 lines) | stat: -rw-r--r-- 6,376 bytes parent folder | download | duplicates (3)
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
# $Cambridge: hermes/src/prayer/templates/cam/Makefile,v 1.5 2010/07/07 08:33:47 dpc22 Exp $

ifeq ($(strip $(RPM_BUILD)), true)
include ../../Config-RPM
else
include ../../Config
endif

MYCFLAGS  = $(BASECFLAGS) -fPIC
MYLDFLAGS = $(BASELDFLAGS) -fPIC
LDFLAGS_TEMPLATELIB = \
	-Wl,--defsym=template_map=template_map_$(TYPE) \
	-Wl,--defsym=template_map_count=template_map_$(TYPE)_count
MYLDFLAGS += $(LDFLAGS_TEMPLATELIB)

TYPE=cam

TARGETS=templates.a templates_frontend.a $(TYPE).so $(TYPE)_frontend.so

T_FILES_FRONTEND=login.t login_hermes.t \
  frontend_login_error.t frontend_security.t frontend_session.t \
  frontend_timeout.t frontend_compose_timeout.t \
  header.t footer.t container_start.t container_end.t

O_FILES_FRONTEND=_template_index_frontend.o ${T_FILES_FRONTEND:.t=.o} 

C_FILES_FRONTEND=${O_FILES_FRONTEND:.o=.c}

T_FILES=raven_blocked.t \
 printable.t printable_tail.t printable_hdrs.t printable_addr.t \
 abook_add_help.t abook_add.t abook_list_help.t abook_list_nav_1_icons.t \
 abook_list_nav_1_noicons.t abook_list_nav_1.t abook_list_nav_2.t \
 abook_list_search.t abook_list.t abook_list_title.t \
 abook_list_toolbar_bottom.t abook_list_toolbar_top.t abook_lookup_help.t \
 abook_lookup_nav_1_icons.t abook_lookup_nav_1_noicons.t \
 abook_lookup_nav_1.t abook_lookup_search.t abook_lookup.t \
 abook_search_help.t abook_search.t abook_take_help.t abook_take.t \
 abook_transfer_help.t abook_transfer.t abook_update_help.t abook_update.t \
 action_stub.t attachments_help.t attachments.t block_fail.t block_help.t \
 block.t compose_large_help.t compose_large_top.t compose_postponed_help.t \
 compose_postponed.t compose_small_help.t compose_small_top.t compose.t \
 compose_toolbar_left.t compose_toolbar_right.t compose_toolbar.t \
 container_end.t container_start.t copy_help.t copy.t copy_toolbar.t \
 dictionary_help.t dictionary.t display_addr.t display_hdrs.t display_help.t \
 display_images.t display_mime_msg.t display_mime_other.t display_mime.t \
 display_mime_text.t display.t display_tail.t display_toolbar_icons.t \
 display_toolbar_noicons.t display_toolbar.t download_xfer_error.t error.t \
 expunge.t favlist_favourites.t favlist.t favourites_help.t favourites.t \
 favourites_toolbar.t filter_fail.t filter_help.t filter_select_help.t \
 filter_select.t filter_select_toolbar.t filter.t folderlist_folders.t \
 folderlist_icons.t folderlist_nfolders.t folderlist_noicons.t \
 folderlist_select.t folderlist.t folders_help.t folders.t folders_toolbar.t \
 footer.t fullname_help.t fullname.t header.t include_help.t include.t \
 list_help.t list_msgs.t list_nav_1_icons.t list_nav_1_noicons.t \
 list_nav_1.t list_nav_2.t list.t list_title.t list_toolbar_bottom.t \
 list_toolbar_top.t logout_raven.t logout.t manage_help.t manage.t \
 passwd_help.t passwd.t prefs_compose1_help.t prefs_compose2_help.t \
 prefs_compose2.t prefs_compose.t prefs_display1_help.t \
 prefs_display_abook_sort.t prefs_display_folder_sort.t prefs_display.t \
 prefs_folder_help.t prefs_folder.t prefs_general_help.t prefs_general.t \
 prefs_option.t quota_help.t quota.t redirect_fail.t redirect_help.t \
 redirect.t rename_help.t rename.t rename_toolbar.t reply_help.t reply.t \
 restart.t rm.t roles_entry_help.t roles_entry.t roles_list_help.t \
 roles_list.t roles_select_help.t roles_select.t search_date_help.t \
 search_date.t search_footer.t search_header.t search_size_help.t \
 search_size.t search_status_help.t search_status.t search_text_help.t \
 search_text.t sieve_error.t sieve_error_tail.t sieve_fail.t sieve_help.t \
 sieve.t sizes_help.t sizes.t sizes_toolbar.t sort_icon.t spam_fail.t \
 spam_help.t spam.t spell.t status.t submitenter_js.t tb_form.t \
 tb_icon_form.t tb_icon.t tb_item.t toolbar_help.t toolbar_left.t \
 toolbar_right.t toolbar_stub_help.t toolbar.t transfer_help.t transfer.t \
 transfer_toolbar_bottom.t transfer_toolbar_top.t upload_select_help.t \
 upload_select.t vacation_fail.t vacation_help.t vacation.t vaclog_fail.t \
 vaclog_help.t vaclog.t welcome_help.t welcome.t 


O_FILES=_template_index.o ${T_FILES:.t=.o} 

C_FILES=${O_FILES:.o=.c}

.PRECIOUS: $(C_FILES)

HTML=\
 abook_add.html abook_list.html abook_lookup.html \
 abook_search.html abook_take.html abook_transfer.html abook_update.html \
 attachments.html block_fail.html block.html compose_postponed.html \
 compose.html copy.html dictionary.html display.html download_xfer_error.html \
 error.html expunge.html favourites.html filter_fail.html \
 filter_select.html filter.html folders.html fullname.html include.html \
 list.html logout.html logout_raven.html manage.html passwd.html \
 prefs_compose2.html prefs_compose.html prefs_display.html prefs_folder.html \
 prefs_general.html quota.html redirect_fail.html \
 redirect.html rename.html reply.html restart.html rm.html roles_entry.html \
 roles_list.html roles_select.html search_date.html \
 search_size.html search_status.html search_text.html sieve_error.html \
 sieve_fail.html sieve.html spam_fail.html spam.html spell.html \
 transfer.html upload_select.html vacation_fail.html vacation.html \
 vaclog_fail.html vaclog.html welcome.html

EXPAND=../src/template_expand
COMPILE=../src/template_compile

all: $(TARGETS)

test: $(HTML)

%.html: %.t %.vars common.vars Makefile
	$(EXPAND) $@ $* common.vars $*.vars

templates_frontend.a: $(O_FILES_FRONTEND)
	rm -f templates_frontend.a
	ar q templates_frontend.a $(O_FILES_FRONTEND)

templates.a: $(O_FILES)
	rm -f templates.a
	ar q templates.a $(O_FILES)

$(TYPE)_frontend.so: $(O_FILES_FRONTEND)
	$(CC) $(MYLDFLAGS) -shared -o $@ $(O_FILES_FRONTEND)

$(TYPE).so: $(O_FILES)
	$(CC) $(MYLDFLAGS) -shared -o $@ $(O_FILES)

%.o: %.c Makefile
	$(CC) $(MYCFLAGS) -I../../lib -c $<

_template_index_frontend.c:
	../src/build_index.pl $(TYPE) $(T_FILES_FRONTEND) > _template_index_frontend.c

_template_index.c:
	../src/build_index.pl $(TYPE) $(T_FILES) > _template_index.c

%.c: %.t Makefile
	$(COMPILE) $(TYPE) $@ $*

install:
	$(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_DIR) -d \
	  $(BROOT)$(PREFIX)/templates/$(TYPE)
	cp *.t $(BROOT)$(PREFIX)/templates/$(TYPE)
	cp *.vars $(BROOT)$(PREFIX)/templates/$(TYPE)

	$(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_DIR) -d \
	  $(BROOT)$(LIB_PREFIX)/templates
	cp *.so $(BROOT)$(LIB_PREFIX)/templates/

clean:
	rm -f $(TARGETS) *.html *.o *.c \#*\# *~

include Makefile.deps