Temporarily freeze variables set via -S..
[s-mailx.git] / makefile
blobb4f1ff32dbe78f8796a50de423c0a59b9fd52b10
1 #@ Makefile for S-nail.
2 #@ Adjustments have to be made in make.rc -- or on the command line.
3 #@ See the file INSTALL if you need help.
5 .PHONY: ohno tangerine all config build install uninstall clean distclean test \
6 devel odevel
8 CWDDIR=./
9 SRCDIR=./
11 ohno: build
12 tangerine: config build test install
13 all: config build
15 config:
16 @$(_prego)
17 build:
18 @$(_prestop); LC_ALL=C $${MAKE} -f mk-config.mk $(MAKEJOBS) all
19 install packager-install: build
20 @$(_prestop);\
21 LC_ALL=C $${MAKE} -f mk-config.mk DESTDIR="$(DESTDIR)" install
22 uninstall:
23 @$(_prestop); LC_ALL=C $${MAKE} -f mk-config.mk uninstall
25 clean:
26 @$(_prestop); LC_ALL=C $${MAKE} -f mk-config.mk clean
27 distclean:
28 @$(_prestop); LC_ALL=C $${MAKE} -f mk-config.mk distclean
30 test:
31 @$(_prestop); LC_ALL=C $${MAKE} -f mk-config.mk $(MAKEJOBS) test
33 devel:
34 @CONFIG=DEVEL; export CONFIG; $(_prego); $(_prestop);\
35 LC_ALL=C $${MAKE} -f mk-config.mk _update-version &&\
36 LC_ALL=C $${MAKE} -f mk-config.mk $(MAKEJOBS) all
37 odevel:
38 @CONFIG=ODEVEL; export CONFIG; $(_prego); $(_prestop);\
39 LC_ALL=C $${MAKE} -f mk-config.mk _update-version &&\
40 LC_ALL=C $${MAKE} -f mk-config.mk $(MAKEJOBS) all
41 d-b:
42 @$(_prestop);\
43 LC_ALL=C $${MAKE} -f mk-config.mk _update-version &&\
44 LC_ALL=C $${MAKE} -f mk-config.mk $(MAKEJOBS) all
46 d-gettext:
47 cd "$(SRCDIR)" &&\
48 LC_ALL=C xgettext --sort-by-file --strict --add-location \
49 --from-code=UTF-8 --keyword --keyword=_ --keyword=N_ \
50 --add-comments=I18N --foreign-user \
51 -o messages.pot *.c *.h
53 _prego = SHELL="$(SHELL)" MAKE="$(MAKE)" CWDDIR="$(CWDDIR)" SRCDIR="$(SRCDIR)" \
54 CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
55 $(SHELL) "$(SRCDIR)"make-config.sh || exit 1
56 _prestop = if [ -f ./mk-config.mk ]; then :; else \
57 echo 'Program not configured, nothing to do';\
58 echo 'Use one of the targets: config, all, tangerine';\
59 exit 1;\
60 fi;\
61 < ./mk-config.ev read __ev__; eval $${__ev__}; unset __ev__
63 # s-mk-mode