[Asterisk-Dev] Asterisk make clean and make looping??

Tzafrir Cohen tzafrir.cohen at xorcom.com
Wed Nov 2 00:30:41 MST 2005


On Tue, Nov 01, 2005 at 06:11:27PM -0700, Saul Diaz wrote:
> OK
> 
> this is where the asterisk is doing the looping
> 
> build_tools/make_version_h > include/asterisk/version.h.tmp
> if cmp -s include/asterisk/version.h.tmp include/asterisk/version.h ; 
> then echo; else \
>        mv include/asterisk/version.h.tmp include/asterisk/version.h ; \
> fi
> rm -f include/asterisk/version.h.tmp

This means include/asterisk/version.h was re-made.
include/asterisk/version.h is only required by the targets 'depend' and
'.depend'

Generally if you run 'make depend' it should make
include/asterisk/version.h first.

> build_tools/mkdep  -pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes 
> -Wmissing-declarations -g  -Iinclude -I../include -D_REENTRANT 
> -D_GNU_SOURCE  -O6 -march=i686 -DZAPTEL_OPTIMIZATIONS         
> -fomit-frame-pointer  acl.c aescrypt.c aeskey.c aestab.c alaw.c app.c 
> asterisk.c ast_expr2.c ast_expr2f.c astmm.c autoservice.c callerid.c 
> cdr.c channel.c chanvars.c cli.c config.c cryptostub.c db.c 
> devicestate.c dlfcn.c dns.c dnsmgr.c dsp.c enum.c file.c frame.c 
> fskmodem.c image.c indications.c io.c jitterbuf.c loader.c logger.c 
> manager.c md5.c muted.c netsock.c pbx.c plc.c poll.c privacy.c rtp.c 
> say.c sched.c slinfactory.c srv.c strcompat.c tdd.c term.c translate.c 
> ulaw.c utils.c
> 
> it loops forever there.

.depend was recreated. Now the makefile is re-evaluated (as .depend is
included in it). 

A shot in the dark:

  grep 'version\.h' .depend

> 
> and i think is b/c this
> 
> include/asterisk/version.h: FORCE
>        build_tools/make_version_h > $@.tmp
>        if cmp -s $@.tmp $@ ; then echo; else \
>                mv $@.tmp $@ ; \
>        fi
>        rm -f $@.tmp
> 
> and this...
> 
> .depend: include/asterisk/version.h
>        build_tools/mkdep ${CFLAGS} $(wildcard *.c)

Side comment: 
Now why not simply:

  build_tools/mkdep $(CFLAGS) *.c

This is the same globbing. And the .c files are not going anywhere.

-- 
Tzafrir Cohen     icq#16849755  +972-50-7952406
tzafrir.cohen at xorcom.com  http://www.xorcom.com



More information about the asterisk-dev mailing list