[Asterisk-Dev] Asterisk make clean and make looping??
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Wed Nov 2 01:28:10 MST 2005
On Wed, Nov 02, 2005 at 08:11:41AM +0000, tim panton wrote:
>
> 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.
even if there were an older version.h.tmp:
echo something >version.h.tmp
mv version.h.tmp version.h
# now there is no version.h.tmp
#
# looping...
#
echo something >version.h.tmp
# version.h.tmp did not exist and thus a new file with the time of
# "now" is created.
>
> 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
--
Tzafrir Cohen icq#16849755 +972-50-7952406
tzafrir.cohen at xorcom.com http://www.xorcom.com
More information about the asterisk-dev
mailing list