c_addrcodec(): CID 1549184 (not on [next])
[s-mailx.git] / makefile
blob5a72a04ac62aafcd55248c1fe338ee1f5fe4f933
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 # (Targets of ./make-emerge.sh)
6 CWDDIR=
7 TOPDIR=
8 OBJDIR=.obj
10 ## -- >8 -- 8< -- ##
12 # For make(1)s which not honour POSIX special treatment
13 SHELL = /bin/sh
15 .PHONY: ohno tangerine citron \
16 all config build install uninstall clean distclean \
17 devel odevel \
18 test testnj
19 .NOTPARALLEL:
20 .WAIT: # Luckily BSD make supports specifying this as target, too
22 ohno: build
23 tangerine: config .WAIT build .WAIT test .WAIT install
24 citron: config .WAIT build .WAIT install
25 all: config .WAIT build
27 config:
28 @$(_prego)
29 build:
30 @$(_prestop); LC_ALL=C $${MAKE} -f mk-config.mk all
31 install packager-install: build
32 @$(_prestop);\
33 LC_ALL=C $${MAKE} -f mk-config.mk DESTDIR="$(DESTDIR)" install
34 uninstall:
35 @$(_prestop); LC_ALL=C $${MAKE} -f mk-config.mk uninstall
37 clean:
38 @$(_prestop); LC_ALL=C $${MAKE} -f mk-config.mk clean
39 distclean:
40 @$(_prestop); LC_ALL=C $${MAKE} -f mk-config.mk distclean
42 devel:
43 @CONFIG=DEVEL; export CONFIG; $(_prego); $(_prestop);\
44 $${SHELL} "$${TOPDIR}"mk/make-version.sh create &&\
45 LC_ALL=C $${MAKE} -f mk-config.mk all
46 odevel:
47 @CONFIG=ODEVEL; export CONFIG; $(_prego); $(_prestop);\
48 $${SHELL} "$${TOPDIR}"mk/make-version.sh create &&\
49 LC_ALL=C $${MAKE} -f mk-config.mk all
51 # (Test should inherit user runtime environ, at least a bit)
52 test:
53 @$(__prestop); cd "$(OBJDIR)" && LC_ALL=C $(MAKE) -f mk-config.mk test
54 testnj:
55 @$(__prestop); cd "$(OBJDIR)" &&\
56 LC_ALL=C $(MAKE) -f mk-config.mk testnj
58 d-cross-build:
59 @DEVEL_ORIG_CC=$(CC); export DEVEL_ORIG_CC; \
60 $(MAKE) OPT_CROSS_BUILD=y OPT_DEVEL=1 VERBOSE=1 \
61 CC="$(TOPDIR)"mk/pcb-cc.sh config;\
62 $(MAKE) distclean
63 d-b:
64 @$(_prestop);\
65 $${SHELL} "$${TOPDIR}"mk/make-version.sh create &&\
66 LC_ALL=C $${MAKE} -f mk-config.mk all
67 d-v:
68 @$(_prestop);\
69 $${SHELL} "$${TOPDIR}"mk/make-version.sh create
70 d-cmd-tab:
71 sh mk/make-cmd-tab.sh
72 d-cmd-tab-nv:
73 sh mk/make-cmd-tab.sh noverbose
74 d-cs-ctype:
75 sh mk/su-make-cs-ctype.sh
76 d-cs-ctype-nv:
77 sh mk/su-make-cs-ctype.sh noverbose
78 d-errors:
79 sh mk/su-make-errors.sh
80 d-errors-nv:
81 sh mk/su-make-errors.sh noverbose
82 d-okeys:
83 perl mk/make-okey-map.pl
84 d-okeys-nv:
85 perl mk/make-okey-map.pl noverbose
86 d-tcaps:
87 perl mk/make-tcap-map.pl
88 d-tcaps-nv:
89 perl mk/make-tcap-map.pl noverbose
91 d-dox:
92 doxygen mk/su-doxygen.rc
93 d-gettext:
94 LC_ALL=C xgettext --sort-by-file --strict --add-location \
95 --from-code=UTF-8 --keyword --keyword=_ --keyword=N_ \
96 --add-comments=I18N --foreign-user \
97 -o messages.pot src/mx/*.c src/mx/*.h src/su/*.c src/su/*.h
99 _prego = if CWDDIR="$(CWDDIR)" TOPDIR="$(TOPDIR)" \
100 SHELL="$(SHELL)" MAKE="$(MAKE)" CC="$(CC)" \
101 CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
102 $(SHELL) "$(TOPDIR)"mk/make-config.sh "$(MAKEFLAGS)"; then :;\
103 else exit 1; fi
104 __prestop = if [ -f "$(OBJDIR)"/mk-config.mk ]; then :; else \
105 echo 'Program not configured, nothing to do';\
106 echo 'Use one of the targets: config, all, tangerine, citron';\
107 exit 0;\
109 _prestop = $(__prestop); cd "$(OBJDIR)" && . ./mk-config.env
111 # s-mk-mode