[m-rev.] diff: shortcut some unneeded tests
Zoltan Somogyi
zoltan.somogyi at runbox.com
Wed Aug 19 01:01:09 AEST 2020
2020-08-19 00:07 GMT+10:00 "Julien Fischer" <jfischer at opturion.com>:
> No, the Java backend requires the use of mmc --make and that requires
> UseSubdirs = yes. (There is some long obsolete support for using the
> Java backend in mmake, but that has not been useful for a very long
> time.)
I looked into this, and found a deeper problem. I added an XXX for it.
--- a/compiler/file_names.m
+++ b/compiler/file_names.m
@@ -499,7 +499,16 @@ choose_file_name(Globals, _From, Search, OtherExt,
% Even if not putting files in a `Mercury' directory,
% Java files will have non-empty BaseParentDirs (the package)
% which may need to be created.
- % XXX Can we ever target Java while UseSubdirs = no?
+ % XXX We can never target Java while UseSubdirs = no. However,
+ % while making dependencies, generate_d_file in write_deps_file.m
+ % does call module_name_to_file_name with a .java suffix
+ % without --use-subdirs being enabled, so insisting on
+ % BaseParentDirs = [] here would cause an abort when making
+ % dependencies.
+ % XXX This indicates a deeper problem, which is that while
+ % different backends use different settings of --use-subdirs
+ % and --use-grade-subdirs, we are generating dependencies
+ % for *all* backends with the *same* settings of these options.
FileName = glue_dir_names_file_name(BaseParentDirs,
BaseNameNoExt, ExtStr),
DirComponents = BaseParentDirs
Zoltan.
More information about the reviews
mailing list