Files
mercury/tests/hard_coded/sub-modules/Mmakefile
Peter Ross 2cb44121b7 When compiling a module which contains a nested sub-module you must
Estimated hours taken: 1
Branches: main

When compiling a module which contains a nested sub-module you must
build the .int0 file before attempting to build the .int file.  This is
because while building the .int file you will need the .int0 file to
build the .int file of the nested sub-module.

compiler/modules.m:
    When generating the .d file for a nested submodule.  Add the rule
        <sourcefilename>.date : <sourcefilename>.int0
    where <sourcefilename> is the name of the sourcefile which contains
    the nested sub-module.

tests/hard_coded/sub-modules/Mmakefile:
tests/hard_coded/sub-modules/include_parent.m:
tests/hard_coded/sub-modules/include_parent.separate.m:
tests/hard_coded/sub-modules/use_submodule.exp:
tests/hard_coded/sub-modules/use_submodule.m:
    Include a test which tests that we can build both nested and
    separate sub-modules when they are not the module which contains
    main.
2001-11-15 15:01:31 +00:00

51 lines
1.1 KiB
Plaintext

#-----------------------------------------------------------------------------#
#
# This directory contains test cases for sub-modules,
# including both nested modules and seperate sub-modules.
#
#-----------------------------------------------------------------------------#
main_target: check
include ../../Mmake.common
-include ../../Mmake.params
#-----------------------------------------------------------------------------#
#
# Note: currently these test cases do not reliabily pass
# if you use parallel make.
#
PROGS= \
use_submodule \
parent \
parent2 \
nested \
nested2 \
nested3 \
class \
nested_intermod_main
MCFLAGS-nested_intermod = --intermodule-optimization
MCFLAGS-nested_intermod_main = --intermodule-optimization
#-----------------------------------------------------------------------------#
DEPS= $(PROGS:%=%.dep)
DEPENDS=$(PROGS:%=%.depend)
OUTS= $(PROGS:%=%.out)
RESS= $(PROGS:%=%.res)
#-----------------------------------------------------------------------------#
dep: $(DEPS)
depend: $(DEPENDS)
check: $(OUTS) $(RESS)
all: $(PROGS)
#-----------------------------------------------------------------------------#