[Asterisk-Dev] Asterisk make clean and make looping??
tim panton
tpanton at attglobal.net
Wed Nov 2 01:11:41 MST 2005
On 2 Nov 2005, at 01:11, 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
> 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.
>
> 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)
>
>
> so could be an issue for the make not the asterisk Makefile
>
> I am using GNU Make 3.80
>
I'm not in a position to test this, but I think that the problem
relates to
the fact that neither mv nor echo will change the modified time
stamp on version.h
Make uses modified time to decide what to do next.
you could try changing the if section to read
include/asterisk/version.h: FORCE
build_tools/make_version_h > $@.tmp
if cmp -s $@.tmp $@ ; then touch $@; else \
cp $@.tmp $@ ; \
fi
rm -f $@.tmp
Tim.
More information about the asterisk-dev
mailing list