Hello!
Yet another fix, avoiding endless looping. I hope to go next to the
production of jars, which will force to take the inner and anonymous
classes into consideration. Please don't be afraid by the complexity
of the scripts in the rules: this is still intended as a proof of
concept. I give the whole jtargets.mk, since diffs to the previous
version are again about as large.
Also, one note concerning the usage: the OBJS macros expects _local_
classes, with only a basename.
Best Regards!
Marc
--------------------------------
build: $(DEPEND) build_ext
$(MAKE) -f $(MAKEFILE) $(MAKEOPTS) $(OBJS:.class=_)
exttags=$$(for i in _none/_none $(EXTOBJS); \
do echo $$(dirname $$i)/build.tag; done \
| grep -v _none | sort | uniq); \
$(STAT) $(OBJS:.class=.mk) $$exttags
if [ "$(MAKEFILE)" = makefile ]; then tag=build.tag; \
else tag=$(MAKEFILE:.mk=.tag); fi; $(TOUCH) $$tag
build_ext: $(EXTOBJS:=_ext)
no_EXTOBJS \
$(EXTOBJS:=_ext):
(dir=$$(dirname $(@:_ext=)); ext=$$(basename $(@:_ext=)); \
cd $$dir; $(MAKE) $(MAKEOPTS))
no_OBJS \
$(OBJS:.class=_):
mkf=$$(if [ -r $(@:_=.mk) ]; then echo $(@:_=.mk); \
else echo $(MAKEFILE); fi); \
$(MAKE) $(MAKEOPTS) DONE="$$DONE" -f $$mkf BASE=$(@:_=) makefile_
makefile_: $(DEPEND)
mkb=$(MAKEFILE:.mk=); \
DONE="$$DONE $(BASE).class"; \
function inlist { i=$$1; shift; \
while [ "$$1" ]; do \
if [ $$i=$$1 ]; then return 1; else shift; fi; done; \
return 0; }; \
for i in $(OBJS); do \
if $$(inlist "$$i" $$DONE $$mkb.class); then \
$(MAKE) $(MAKEOPTS) -f $(MAKEFILE) DONE="$$DONE" $${i%*.class}_; \
fi; done; \
$(MAKE) $(MAKEOPTS) -f $(MAKEFILE) BASE=$(BASE) $(BASE).mk
no_base \
$(BASE:=.mk): $(BASE:=.class)
-- Marc Girod P.O. Box 320 Voice: +358-9-511 23746 Nokia Networks 00045 NOKIA Group Mobile: +358-40-569 7954 Hiomo 5/1 Finland Fax: +358-9-511 23580 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This archive was generated by hypermail 2b29 : Sun May 06 2001 - 00:26:57 EDT