[m-rev.] for review: build grade_lib by default

Peter Wang novalazy at gmail.com
Tue Apr 14 16:37:37 AEST 2020


On Mon, 13 Apr 2020 07:22:49 +1000 (AEST), "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> 
> Build the grade_lib directory by default.
> 
> This should prevent bit rot in its code, such as that caused by the
> move of the one_or_more type from list.m to one_or_more.m.
> 
> Mmakefile:
>     Add grade_lib to the list of directories to build, to the list of
>     directories in which dependencies are made, the list of directories
>     in which tags files are made, and the list of directories to clean.
> 
>     Do not include the grade library in source distributions. In the
>     intended use case, the grade library modules that the compiler needs
>     will be present in the source distribution in the *compiler* directory.

configure wants to produce grade_lib/GRADE_LIB_FLAGS from
GRADE_LIB_FLAGS.in so I think the grade_lib needs to be included
in the source distribution.

After the following change, the resulting srcdist still doesn't
build without a bootstrap compiler. Hopefully the problem is
obvious to someone else:

make[2]: Entering directory '/tmp/mercury-srcdist-DEV/grade_lib'
mmc --grade hlc.gc.pregen     --mercury-linkage static --flags GRADE_LIB_FLAGS      -f *.m
../scripts/mmc: 31: exec: /tmp/mercury-srcdist-DEV/Install/bin/mercury_compile: not found

Peter

diff --git a/Mmakefile b/Mmakefile
index 9a77629db..8446b5ac2 100644
--- a/Mmakefile
+++ b/Mmakefile
@@ -508,6 +508,8 @@ tar: 	$(GENERATED_DOCS)
 	+cd deep_profiler && $(SUBDIR_MMAKE) cs tags
 	+cd mfilterjavac && $(SUBDIR_MMAKE) depend
 	+cd mfilterjavac && $(SUBDIR_MMAKE) cs tags
+	+cd grade_lib && $(SUBDIR_MMAKE) depend
+	+cd grade_lib && $(SUBDIR_MMAKE) cs tags
 	+cd doc && $(SUBDIR_MMAKE) info html dvi mdb_doc
 	# the following commands might fail on Windows?
 	-cd bindist && $(SUBDIR_MMAKE) bindist.Makefile
@@ -534,7 +536,6 @@ tar: 	$(GENERATED_DOCS)
 	export ROOTNAME;						\
 	cd .. && (							\
 		mkdir stuff-to-exclude;					\
-		mv $$ROOTNAME/grade_lib stuff-to-exclude;		\
 		test -d $$ROOTNAME/bytecode && 				\
 			mv $$ROOTNAME/bytecode stuff-to-exclude; 	\
 		mv $$ROOTNAME/extras/quickcheck stuff-to-exclude;	\




More information about the reviews mailing list