de525120e07bbd2b1a236f376d5159799f9c91db
[asterisk/asterisk.git] / Makefile
1 #
2 # Asterisk -- A telephony toolkit for Linux.
3
4 # Top level Makefile
5 #
6 # Copyright (C) 1999, Mark Spencer
7 #
8 # Mark Spencer <markster@linux-support.net>
9 #
10 # This program is free software, distributed under the terms of
11 # the GNU General Public License
12 #
13
14 .EXPORT_ALL_VARIABLES:
15
16 # Create OPTIONS variable
17 OPTIONS=
18
19 OSARCH=$(shell uname -s)
20
21 ifeq (${OSARCH},Linux)
22 PROC=$(shell uname -m)
23 else
24 ifeq (${OSARCH},FreeBSD)
25 PROC=$(shell uname -m)
26 endif
27 endif
28 # Pentium Pro Optimize
29 #PROC=i686
30
31 # Pentium & VIA processors optimize
32 #PROC=i586
33
34 #PROC=k6
35 #PROC=ppc
36
37 PWD=$(shell pwd)
38
39 ######### More GSM codec optimization
40 ######### Uncomment to enable MMXTM optimizations for x86 architecture CPU's
41 ######### which support MMX instructions.  This should be newer pentiums,
42 ######### ppro's, etc, as well as the AMD K6 and K7.  
43 #K6OPT  = -DK6OPT
44
45 #Tell gcc to optimize the asterisk's code
46 OPTIMIZE=-O6
47
48 #Include debug symbols in the executables (-g) and profiling info (-pg)
49 DEBUG=-g #-pg
50
51 # New hangup routines for chan_zap.c
52 # If this flag is uncommented then you need to have new libpri code in your system
53 # You can still use the old libpri if you do "cvs update -D "08/03/03" in libpri source code
54 OPTIONS += -DNEW_PRI_HANGUP
55
56 # Optional debugging parameters
57 DEBUG_THREADS = #-DDEBUG_THREADS #-DDO_CRASH 
58
59 # Uncomment next one to enable ast_frame tracing (for debugging)
60 TRACE_FRAMES = #-DTRACE_FRAMES
61
62 # Uncomment next one to enable malloc debugging
63 # You can view malloc debugging with:
64 #   *CLI> show memory allocations [filename]
65 #   *CLI> show memory summary [filename]
66 #
67 MALLOC_DEBUG = #-include $(PWD)/include/asterisk/astmm.h
68
69 # Where to install asterisk after compiling
70 # Default -> leave empty
71 INSTALL_PREFIX=
72
73 # Staging directory
74 # Files are copied here temporarily during the install process
75 # For example, make DESTDIR=/tmp/asterisk woud put things in
76 # /tmp/asterisk/etc/asterisk
77 DESTDIR=
78
79 # Original busydetect routine
80 BUSYDETECT = #-DBUSYDETECT
81
82 # Improved busydetect routine, comment the previous one if you use this one
83 BUSYDETECT+= -DBUSYDETECT_MARTIN 
84 # Detect the busy signal looking only at tone lengths
85 # For example if you have 3 beeps 100ms tone, 100ms silence separated by 500 ms of silence
86 BUSYDETECT+= #-DBUSYDETECT_TONEONLY
87 # Inforce the detection of busy singal (get rid of false hangups)
88 # Don't use together with -DBUSYDETECT_TONEONLY
89 BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE
90
91 ASTLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk
92 ASTVARLIBDIR=$(INSTALL_PREFIX)/var/lib/asterisk
93 ASTETCDIR=$(INSTALL_PREFIX)/etc/asterisk
94 ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
95 ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
96 ASTHEADERDIR=$(INSTALL_PREFIX)/usr/include/asterisk
97 ASTCONFPATH=$(ASTETCDIR)/asterisk.conf
98 ASTBINDIR=$(INSTALL_PREFIX)/usr/bin
99 ASTSBINDIR=$(INSTALL_PREFIX)/usr/sbin
100 ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
101
102 MODULES_DIR=$(ASTLIBDIR)/modules
103 AGI_DIR=$(ASTVARLIBDIR)/agi-bin
104
105 INCLUDE=-Iinclude -I../include
106 CFLAGS=-pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
107 CFLAGS+=$(OPTIMIZE)
108 CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
109 CFLAGS+=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
110 ifeq (${OSARCH},FreeBSD)
111 CFLAGS+=-pthread
112 INCLUDE+=-I/usr/local/include
113 endif
114 ifeq (${OSARCH},OpenBSD)
115 CFLAGS+=-pthread
116 endif
117
118 #Uncomment this to use the older DSP routines
119 #CFLAGS+=-DOLD_DSP_ROUTINES
120
121 CFLAGS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "-DZAPTEL_OPTIMIZATIONS"; fi)
122
123 LIBEDIT=editline/libedit.a
124
125 ASTERISKVERSION=$(shell if [ -f .version ]; then cat .version; else if [ -d CVS ]; then echo "CVS-`date +"%D-%T"`"; fi; fi)
126 HTTPDIR=$(shell if [ -d /var/www ]; then echo "/var/www"; else echo "/home/httpd"; fi)
127 RPMVERSION=$(shell if [ -f .version ]; then sed 's/[-\/:]/_/g' .version; else echo "unknown" ; fi)
128 CFLAGS+=-DASTERISK_VERSION=\"$(ASTERISKVERSION)\"
129 CFLAGS+=-DINSTALL_PREFIX=\"$(INSTALL_PREFIX)\"
130 CFLAGS+=-DASTETCDIR=\"$(ASTETCDIR)\"
131 CFLAGS+=-DASTLIBDIR=\"$(ASTLIBDIR)\"
132 CFLAGS+=-DASTVARLIBDIR=\"$(ASTVARLIBDIR)\"
133 CFLAGS+=-DASTVARRUNDIR=\"$(ASTVARRUNDIR)\"
134 CFLAGS+=-DASTSPOOLDIR=\"$(ASTSPOOLDIR)\"
135 CFLAGS+=-DASTLOGDIR=\"$(ASTLOGDIR)\"
136 CFLAGS+=-DASTCONFPATH=\"$(ASTCONFPATH)\"
137 CFLAGS+=-DASTMODDIR=\"$(MODULES_DIR)\"
138 CFLAGS+=-DASTAGIDIR=\"$(AGI_DIR)\"
139
140 CFLAGS+= $(DEBUG_THREADS)
141 CFLAGS+= $(TRACE_FRAMES)
142 CFLAGS+= $(MALLOC_DEBUG)
143 CFLAGS+= $(BUSYDETECT)
144 CFLAGS+= $(OPTIONS)
145 CFLAGS+=# -fomit-frame-pointer 
146 SUBDIRS=res channels pbx apps codecs formats agi cdr astman stdtime
147 ifeq (${OSARCH},Linux)
148 LIBS=-ldl -lpthread
149 endif
150 ifeq (${OSARCH},OpenBSD)
151 LIBS=-pthread
152 else
153 ifeq (${OSARCH},FreeBSD)
154 LIBS=-pthread
155 else
156 endif
157 endif
158 LIBS+=-lncurses -lm
159 ifeq (${OSARCH},Linux)
160 LIBS+=-lresolv  #-lnjamd
161 endif
162 ifeq (${OSARCH},Darwin)
163 ifeq ($(shell uname -r),7.0.0)
164 LIBS+=-lresolv
165 endif
166 endif
167 OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
168         translate.o file.o say.o pbx.o cli.o md5.o term.o \
169         ulaw.o alaw.o callerid.o fskmodem.o image.o app.o \
170         cdr.o tdd.o acl.o rtp.o manager.o asterisk.o ast_expr.o \
171         dsp.o chanvars.o indications.o autoservice.o db.o privacy.o \
172         astmm.o enum.o srv.o dns.o aescrypt.o aestab.o aeskey.o
173 ifeq (${OSARCH},Darwin)
174 OBJS+=poll.o dlfcn.o
175 ASTLINK=-Wl,-dynamic
176 SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
177 else
178 ASTLINK=-Wl,-E 
179 SOLINK=-shared -Xlinker -x
180 endif
181
182 CC=gcc
183 INSTALL=install
184
185 _all: all
186         @echo " +--------- Asterisk Build Complete ---------+"  
187         @echo " + Asterisk has successfully been built, but +"  
188         @echo " + cannot be run before being installed by   +"  
189         @echo " + running:                                  +"  
190         @echo " +                                           +"
191         @echo " +               $(MAKE) install                +"  
192         @echo " +-------------------------------------------+"  
193
194 all: depend asterisk subdirs
195
196 editline/config.h:
197         cd editline && unset CFLAGS LIBS && ./configure ; \
198
199 editline/libedit.a: FORCE
200         cd editline && unset CFLAGS LIBS && test -f config.h || ./configure
201         $(MAKE) -C editline libedit.a
202
203 db1-ast/libdb1.a: FORCE
204         @if [ -d db1-ast ]; then \
205                 $(MAKE) -C db1-ast libdb1.a ; \
206         else \
207                 echo "You need to do a cvs update -d not just cvs update"; \
208                 exit 1; \
209         fi
210
211 ifneq ($(wildcard .depend),)
212 include .depend
213 endif
214
215 .PHONY: _version
216
217 _version: 
218         if [ -d CVS ] && ! [ -f .version ]; then echo $(ASTERISKVERSION) > .version; fi 
219
220 .version: _version
221
222 .y.c:
223         bison $< --name-prefix=ast_yy -o $@
224
225 ast_expr.o: ast_expr.c
226
227 cli.o: cli.c build.h
228
229 asterisk.o: asterisk.c build.h
230
231 ifneq ($(strip $(ASTERISKVERSION)),)
232 build.h: .version
233         ./make_build_h
234 else
235 build.h:
236         ./make_build_h
237 endif
238
239 stdtime/libtime.a: FORCE
240         @if [ -d stdtime ]; then \
241                 $(MAKE) -C stdtime libtime.a ; \
242         else \
243                 echo "You need to do a cvs update -d not just cvs update"; \
244                 exit 1; \
245         fi
246
247 asterisk: editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
248         $(CC) $(DEBUG) -o asterisk $(ASTLINK) $(OBJS) $(LIBS) $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a
249
250 subdirs: 
251         for x in $(SUBDIRS); do $(MAKE) -C $$x || exit 1 ; done
252
253 clean:
254         for x in $(SUBDIRS); do $(MAKE) -C $$x clean || exit 1 ; done
255         rm -f *.o *.so asterisk .depend
256         rm -f build.h 
257         rm -f ast_expr.c
258         @if [ -e editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
259         $(MAKE) -C db1-ast clean
260         $(MAKE) -C stdtime clean
261
262 datafiles: all
263         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/digits
264         for x in sounds/digits/*.gsm; do \
265                 if grep -q "^%`basename $$x`%" sounds.txt; then \
266                         install -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/digits ; \
267                 else \
268                         echo "No description for $$x"; \
269                         exit 1; \
270                 fi; \
271         done
272         for x in sounds/vm-* sounds/transfer* sounds/pbx-* sounds/ss-* sounds/beep* sounds/dir-* sounds/conf-* sounds/agent-* sounds/invalid* sounds/tt-* sounds/auth-* sounds/privacy-* sounds/queue-*; do \
273                 if grep -q "^%`basename $$x`%" sounds.txt; then \
274                         install -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \
275                 else \
276                         echo "No description for $$x"; \
277                         exit 1; \
278                 fi; \
279         done
280         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/mohmp3
281         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/images
282         for x in images/*.jpg; do \
283                 install -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/images ; \
284         done
285         mkdir -p $(DESTDIR)$(AGI_DIR)
286
287 update: 
288         @if [ -d CVS ]; then \
289                 echo "Updating from CVS..." ; \
290                 cvs -q update -Pd; \
291                 rm -f .version; \
292         else \
293                 echo "Not CVS";  \
294         fi
295
296 bininstall: all
297         mkdir -p $(DESTDIR)$(MODULES_DIR)
298         mkdir -p $(DESTDIR)$(ASTSBINDIR)
299         mkdir -p $(DESTDIR)$(ASTETCDIR)
300         mkdir -p $(DESTDIR)$(ASTBINDIR)
301         mkdir -p $(DESTDIR)$(ASTSBINDIR)
302         mkdir -p $(DESTDIR)$(ASTVARRUNDIR)
303         mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail
304         install -m 755 asterisk $(DESTDIR)$(ASTSBINDIR)/
305         install -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
306         if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
307                 install -m 755 contrib/scripts/safe_asterisk $(DESTDIR)$(ASTSBINDIR)/ ;\
308         fi
309         for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
310         install -d $(DESTDIR)$(ASTHEADERDIR)
311         install -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR)
312         rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/vm
313         rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail
314         if [ ! -h $(DESTDIR)$(ASTSPOOLDIR)/vm ] && [ -d $(DESTDIR)$(ASTSPOOLDIR)/vm ]; then \
315                 mv $(DESTDIR)$(ASTSPOOLDIR)/vm $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default; \
316         else \
317                 mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default; \
318                 rm -f $(DESTDIR)$(ASTSPOOLDIR)/vm; \
319         fi
320         ln -s $(ASTSPOOLDIR)/voicemail/default $(DESTDIR)$(ASTSPOOLDIR)/vm
321         rm -f $(DESTDIR)$(MODULES_DIR)/chan_ixj.so
322         rm -f $(DESTDIR)$(MODULES_DIR)/chan_tor.so
323         rm -f $(DESTDIR)$(MODULES_DIR)/cdr_mysql.so
324         rm -f $(DESTDIR)$(MODULES_DIR)/cdr_unixodbc.so
325         rm -f $(DESTDIR)$(MODULES_DIR)/codec_mp3_d.so
326         rm -f $(DESTDIR)$(MODULES_DIR)/format_mp3.so
327         rm -f $(DESTDIR)$(MODULES_DIR)/app_voicemail2.so
328         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds
329         mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv
330         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/keys
331         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/firmware
332         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/firmware/iax
333         install -m 644 keys/iaxtel.pub $(DESTDIR)$(ASTVARLIBDIR)/keys
334         if [ -d contrib/firmware/iax ]; then \
335                 install -m 644 contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTVARLIBDIR)/firmware/iax/iaxy.bin; \
336         else \
337                 echo "You need to do cvs update -d not just cvs update" ; \
338         fi 
339         ( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds  ; ln -s $(ASTSPOOLDIR)/vm . )
340         ( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds  ; ln -s $(ASTSPOOLDIR)/voicemail . )
341         @echo " +---- Asterisk Installation Complete -------+"  
342         @echo " +                                           +"
343         @echo " +    YOU MUST READ THE SECURITY DOCUMENT    +"
344         @echo " +                                           +"
345         @echo " + Asterisk has successfully been installed. +"  
346         @echo " + If you would like to install the sample   +"  
347         @echo " + configuration files (overwriting any      +"
348         @echo " + existing config files), run:              +"  
349         @echo " +                                           +"
350         @echo " +               $(MAKE) samples                +"
351         @echo " +                                           +"
352         @echo " +-----------------  or ---------------------+"
353         @echo " +                                           +"
354         @echo " + You can go ahead and install the asterisk +"
355         @echo " + program documentation now or later run:   +"
356         @echo " +                                           +"
357         @echo " +              $(MAKE) progdocs                +"
358         @echo " +                                           +"
359         @echo " + **Note** This requires that you have      +"
360         @echo " + doxygen installed on your local system    +"
361         @echo " +-------------------------------------------+"
362
363 install: all datafiles bininstall
364
365 upgrade: all bininstall
366
367 adsi: all
368         mkdir -p $(DESTDIR)$(ASTETCDIR)
369         for x in configs/*.adsi; do \
370                 if ! [ -f $(DESTDIR)$(ASTETCDIRX)/$$x ]; then \
371                         install -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x` ; \
372                 fi ; \
373         done
374
375 samples: all datafiles adsi
376         mkdir -p $(DESTDIR)$(ASTETCDIR)
377         for x in configs/*.sample; do \
378                 if [ -f $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` ]; then \
379                         mv -f $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample`.old ; \
380                 fi ; \
381                 install -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` ;\
382         done
383         echo "[directories]" > $(DESTDIR)$(ASTETCDIR)/asterisk.conf
384         echo "astetcdir => $(ASTETCDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
385         echo "astmoddir => $(MODULES_DIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
386         echo "astvarlibdir => $(ASTVARLIBDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
387         echo "astagidir => $(AGI_DIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
388         echo "astspooldir => $(ASTSPOOLDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
389         echo "astrundir => $(ASTVARRUNDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
390         echo "astlogdir => $(ASTLOGDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
391         for x in sounds/demo-*; do \
392                 if grep -q "^%`basename $$x`%" sounds.txt; then \
393                         install -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \
394                 else \
395                         echo "No description for $$x"; \
396                         exit 1; \
397                 fi; \
398         done
399         for x in sounds/*.mp3; do \
400                 install -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/mohmp3 ; \
401         done
402         mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX
403         :> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm
404         for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isunavail; do \
405                 cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm ; \
406         done
407         :> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/busy.gsm
408         for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isonphone; do \
409                 cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/busy.gsm ; \
410         done
411
412 webvmail:
413         @[ -d $(DESTDIR)$(HTTPDIR) ] || ( echo "No HTTP directory" && exit 1 )
414         @[ -d $(DESTDIR)$(HTTPDIR)/html ] || ( echo "No http directory" && exit 1 )
415         @[ -d $(DESTDIR)$(HTTPDIR)/cgi-bin ] || ( echo "No cgi-bin directory" && exit 1 )
416         install -m 4755 -o root -g root contrib/scripts/vmail.cgi $(DESTDIR)$(HTTPDIR)/cgi-bin/vmail.cgi
417         mkdir -p $(DESTDIR)$(HTTPDIR)/html/_asterisk
418         for x in images/*.gif; do \
419                 install -m 644 $$x $(DESTDIR)$(HTTPDIR)/html/_asterisk/; \
420         done
421         @echo " +--------- Asterisk Web Voicemail ----------+"  
422         @echo " +                                           +"
423         @echo " + Asterisk Web Voicemail is installed in    +"
424         @echo " + your cgi-bin directory.  IT USES A SETUID +"
425         @echo " + ROOT PERL SCRIPT, SO IF YOU DON'T LIKE    +"
426         @echo " + THAT, UNINSTALL IT!                       +"
427         @echo " +                                           +"
428         @echo " +-------------------------------------------+"  
429
430 mailbox:
431         ./contrib/scripts/addmailbox 
432
433 rpm: __rpm
434
435 __rpm: _version
436         rm -rf /tmp/asterisk ; \
437         mkdir -p /tmp/asterisk/redhat/RPMS/i386 ; \
438         $(MAKE) DESTDIR=/tmp/asterisk install ; \
439         $(MAKE) DESTDIR=/tmp/asterisk samples ; \
440         mkdir -p /tmp/asterisk/etc/rc.d/init.d ; \
441         cp -f redhat/asterisk /tmp/asterisk/etc/rc.d/init.d/ ; \
442         sed "s/^Version:.*/Version: $(RPMVERSION)/g" redhat/asterisk.spec > asterisk.spec ; \
443         rpmbuild --rcfile /usr/lib/rpm/rpmrc:redhat/rpmrc -bb asterisk.spec
444
445 progdocs:
446         doxygen contrib/asterisk-ng-doxygen
447
448 config:
449         if [ -d /etc/rc.d/init.d ]; then \
450                 install -m 755 contrib/init.d/rc.redhat.asterisk /etc/rc.d/init.d/asterisk; \
451                 /sbin/chkconfig --add asterisk; \
452         elif [ -d /etc/init.d ]; then \
453                 install -m 755 init.asterisk /etc/init.d/asterisk; \
454         fi 
455
456 dont-optimize:
457         $(MAKE) OPTIMIZE= K6OPT= install
458
459 valgrind: dont-optimize
460
461 depend: .depend
462         for x in $(SUBDIRS); do $(MAKE) -C $$x depend || exit 1 ; done
463
464 .depend:
465         ./mkdep ${CFLAGS} `ls *.c`
466
467 FORCE:
468
469 %_env:
470         make -C $(shell echo $@ | /bin/sed "s/_env//g") env
471
472 env:
473         /bin/env