-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
139 lines (116 loc) · 3.93 KB
/
Makefile
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
###############################################################################
# Project: M
# File name: Makefile
# Purpose: the top level Makefile for Mahogany
# Author: Mahogany Dev-Team
# Modified by:
# Created: 1998
# CVS-ID: $Id$
# Copyright: (c) 1997-2003 M-Team
# Licence: M license
###############################################################################
include makeopts
include makeversion
M := mahogany-$(M_VERSION_MAJOR).$(M_VERSION_MINOR)
FILES := configure.in configure Makefile makeopts.in makerules
ifeq ($(USE_RESOURCES),yes)
SUB_DIRS := include lib res src
else
SUB_DIRS := include lib src
endif
ALL_DIRS := $(SUB_DIRS) doc
all semistatic quartstatic static:
@set -e; for i in $(SUB_DIRS); do \
if [ $$i = src ]; then \
$(MAKE) -C src $@; \
else \
$(MAKE) -C $$i all; \
fi \
done
doc:
set -e; for i in doc; do $(MAKE) -C $$i doc; done
classdoc:
set -e; for i in doc; do $(MAKE) -C $$i doc; done
clean:
set -e; for i in $(ALL_DIRS); do $(MAKE) -C $$i $@; done
allclean: clean
find . -name \*.bak -exec rm -f {} \;
find . -name \*~ -exec rm -f {} \;
find . -name .\\\#* -exec rm -f {} \;
find . -name \*.mo -exec rm -f {} \;
find . -name .libs -exec rm -rf {} \;
find . -name .xvpics -exec rm -r -f {} \;
$(RM) -r debian/tmp *.po config.log src/M config.status
$(RM) config.* makeopts include/config.h
find . -type l -name .src -exec rm -f {} \;
find . -type l -name Makefile -exec rm -f {} \;
$(RM) -f makeversion
realclean: allclean
clobber: realclean
depend:
@echo "-------------------------------------------------------------"
@echo "-------------------------------------------------------------"
@echo "\"make depend\" is obsolete; there's no need to run it any more"
@echo "-------------------------------------------------------------"
@echo "-------------------------------------------------------------"
bak backup:
tar cvf $(FILES) $(ALL_DIRS) | gzip -z9 > M-`date +"%y-%m-%d"`.tar.gz
# probably the most complicated target:
#
install_bin:
@echo "Installing M in " $(BINDIR)
@echo " data in " $(DATADIR)
@echo " docs in " $(DOCDIR)
set -e; for i in \
$(BINDIR) \
$(DATADIR) \
$(DOCDIR) \
$(DOCDIR)/Tips \
;do \
if test ! -d $$i; then $(INSTALL) -d -m 755 $$i; \
fi \
done
set -e; for i in $(SUB_DIRS) extra; do $(MAKE) -C $$i install; done
set -e; for i in .src/doc/Tips/Tips*.txt; \
do $(INSTALL_DATA) $$i $(DOCDIR)/Tips; \
done
install_strip:
$(MAKE) install INSTALL_OPTIONS="-s $(INSTALL_OPTIONS)"
install_bin_strip:
$(MAKE) install_bin INSTALL_OPTIONS="-s $(INSTALL_OPTIONS)"
install_locale:
$(MAKE) -C locale install
install_doc:
$(MAKE) -C doc install
set -e; for i in CHANGES COPYING CREDITS INSTALL README; \
do $(INSTALL_DATA) .src/$$i $(DOCDIR); \
done
install: install_bin install_locale install_doc
ifdef USE_MAC
@echo "Mahogany.app has been built in $(top_builddir)/src,"
@echo "now you can simply drag and drop it anywhere you want."
endif
locales:
$(MAKE) -C locale all
mergecat:
$(MAKE) -C locale mergecat
# create the file list for the RPM installation: used by redhat/M.spec
install_rpm:
@echo "Creating the list of files for RPM"
@echo "%doc $(DOCDIR)" > filelist
@echo "%config $(DATADIR)/M.conf" >> filelist
@echo "$(DATADIR)/scripts" >> filelist
@echo "$(DATADIR)/newmail.wav" >> filelist
@echo "$(DATADIR)/kylemail.wav" >> filelist
@echo "$(DATADIR)/afm" >> filelist
@echo "$(DATADIR)/icons" >> filelist
@echo "$(DATADIR)/python" >> filelist
@echo "$(DESTDIR)/share/locale" >> filelist
@echo "$(BINDIR)/M" >> filelist
@echo "$(BINDIR)/mahogany" >> filelist
@echo "$(DESTDIR)/man/man1/mahogany.1" >> filelist
@echo "$(DESTDIR)/man/man1/M.1" >> filelist
@# the second subsitution takes care of RPM_BUILD_ROOT
@$(PERL) -i -npe 's/^/%attr(-, root, root) /; s: /.*//: /:' filelist
.PHONY: all clean bak backup config program doc install install_doc \
locales scandoc install_locale install_rpm classdoc