[m-rev.] For review: Fix 'tags' make target in compiler directory.

Paul Bone pbone at csse.unimelb.edu.au
Thu Sep 18 23:19:47 AEST 2008


On Thu, Sep 18, 2008 at 11:06:04PM +1000, Julien Fischer wrote:
> 
> On Fri, 12 Sep 2008, Paul Bone wrote:
> 
> >
> >For review by anyone:
> >
> >Estimated hours taken: 0.1
> >Branches: main
> >
> >The 'tags' target in the compiler directory often does nothing when it 
> >should
> >rebuild the tags file.  This occurs because mmake uses VPATH to find
> >../library/tags which is up to date and decides not to build the tags 
> >target.
> >
> >This solution is also used in the deep_profiler directory.
> >
> >compiler/Mmakefile:
> >   As above.
> >
> >Index: compiler/Mmakefile
> >===================================================================
> >RCS file: /home/mercury1/repository/mercury/compiler/Mmakefile,v
> >retrieving revision 1.99
> >diff -u -p -r1.99 Mmakefile
> >--- compiler/Mmakefile	22 Feb 2008 07:27:56 -0000	1.99
> >+++ compiler/Mmakefile	11 Sep 2008 22:32:00 -0000
> >@@ -269,13 +269,23 @@ ints:	$(MC_PROG).ints
> >
> >#-----------------------------------------------------------------------------#
> >
> >-tags:	$(PREPROCESSED_M_FILES) *.m $(LIBRARY_DIR)/*.m 
> >$(MDBCOMP_DIR)/*.m
> >+# We need the shenanigans with .deep_tags to avoid situations in which an
> 
> The "shenanigans" are with .compiler_tags here, not .deep_tags.
> 
> >+# "mmake tags" in this directory does nothing even in the absence of a 
> >tags
> >+# file in this directory, because mmake uses VPATH to find ../library/tags
> >+# and believes it to be the tags file we are asking for.
> >+
> >+.PHONY: tags
> >+tags:	.compiler_tags
> >+
> >+.compiler_tags:	$(PREPROCESSED_M_FILES) *.m $(LIBRARY_DIR)/*.m 
> >$(MDBCOMP_DIR)/*.m
> >	$(MTAGS) $(MTAGSFLAGS) *.m $(LIBRARY_DIR)/*.m $(MDBCOMP_DIR)/*.m
> >+	touch .compiler_tags
> >
> >.PHONY: tags_file_exists
> >tags_file_exists:
> >	@if test ! -f tags; then echo making tags ; \
> >	$(MTAGS) $(MTAGSFLAGS) *.m $(LIBRARY_DIR)/*.m $(MDBCOMP_DIR)/*.m ; fi
> >+	touch .compiler_tags
> >
> >$(MC_PROG).stats: source_stats.awk $($(MC_PROG).ms)
> >	awk -f `vpath_find source_stats.awk` \
> >
> 
> That's fine otherwise.
> 

Thanks, this is now fixed and commited.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20080918/cbd18c66/attachment.sig>


More information about the reviews mailing list