mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-06 07:49:02 +00:00
Fix mmakefile rules for os,cs,css,javas.
The main objective of this change is to get bootchecks in the csharp
and java grades to actually build the slice, profiler, deep_profiler
and mfilterjavac directories, which (due to the bug this diff fixes)
they weren't doing before.
However, since one side effect of this change is to eliminate
one source of annoying warnings from mmake about references to undefined
variables, a subsidiary objective is to eliminate other sources of such
warnings as well, which mostly come from the rules for making tags files.
browser/Mmakefile:
deep_profiler/Mmakefile:
library/Mmakefile:
mdbcomp/Mmakefile:
profiler/Mmakefile:
slice/Mmakefile:
ssdb/Mmakefile:
When creating stage 3, the bootcheck builds, in each directory,
only the files that it wants to compare against their stage 2 versions.
This means that it wants to build all the .c, .cs or .java files,
which it does via the cs, css and javas mmake targets.
The correct definitions of the rules of these targets depends on
whether mmc --make is being used or not, so we need at least two
sets of definitions: one for mmc --make, and for no mmc --make,
and conditionally selecting the appropriate one. The latter definition
has the problem that it refers to mmake variables that are intended
to be defined in .dv files created by mmc --generate-dependencies,
but until that has been run, those mmake variables are undefined.
Until now, the only directories that had both the mmc --make
and the no mmc --make definitions were the ones needed to build
the compiler. Bootchecks in the csharp and java grades, which
always use --make make, got errors when they tried to build
the directories that bootcheck builds after the compiler:
the slice, profiler, deep_prof and mfilterjavac directories.
This diff ensures that all directories we build in bootcheck
get all both versions of the os, cs, css, and javas targets.
In fact, they get two subversions of the no mmc --make version:
one for use in the presence of .dv files, and one for use in their
absence. The latter just builds the .dv files and invokes mmake
again. This avoids one source of warnings about undefined mmake
variables.
To avoid another source, make the rules for tags files and their
proxies depends on *.m instead of mmake variables such as $(mcov.ms),
since this makes sense even before making dependencies. The only price
is that any untracked Mercury source files in the directory have to
either be given some other suffix, or moved somewhere else.
Where relevant, make the mtags invocation prefer the master versions
of files that are copied from the mdbcomp directory to other directories,
since this is the only writeable version.
Make the os and cs rules consistently NOT build the _init.[co] files.
The way we use those files in bootcheck, we never need them;
when we need them, the right target to give is the executable anyway.
In the slice directory, don't put mcov between mtc_union and mtc_diff.
Eliminate unnecessary duplication, e.g. of sources in rules.
Eliminate double negatives in conditionals.
Fix formatting.
Mmake.common.in:
bindist/Mmakefile:
bytecode/Mmakefile:
compiler/Mmakefile:
doc/Mmakefile:
grade_lib/Mmakefile:
robdd/Mmakefile:
samples/Mmakefile:
scripts/Mmakefile:
tools/Mmakefile:
trace/Mmakefile:
util/Mmakefile:
Add "ft=make" to vim modelines. This is redundant for the files whose
names is Mmakefile, but it is needed for Mmake.common.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
#-----------------------------------------------------------------------------#
|
||||
# vim: ts=8 sw=8 noexpandtab ft=make
|
||||
#-----------------------------------------------------------------------------#
|
||||
# Copyright (C) 1995-2006, 2009-2012 The University of Melbourne.
|
||||
# This file may only be copied under the terms of the GNU General
|
||||
# Public Licence - see the file COPYING in the Mercury distribution.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#-----------------------------------------------------------------------------#
|
||||
# vim: ts=8 sw=8 noexpandtab
|
||||
# vim: ts=8 sw=8 noexpandtab ft=make
|
||||
#-----------------------------------------------------------------------------#
|
||||
# Copyright (C) 1996-2003, 2005-2006, 2008, 2010 The University of Melbourne.
|
||||
# This file may only be copied under the terms of the GNU General
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#-----------------------------------------------------------------------------#
|
||||
# vim: ts=8 sw=8 noexpandtab
|
||||
# vim: ts=8 sw=8 noexpandtab ft=make
|
||||
#-----------------------------------------------------------------------------#
|
||||
# Copyright (C) 1998-2007, 2009-2010, 2012 The University of Melbourne.
|
||||
# This file may only be copied under the terms of the GNU General
|
||||
@@ -186,19 +186,32 @@ int3s: $(INT3S_TARGETS)
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
# We need the shenanigans with .browser_tags to avoid situations in which
|
||||
# "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.
|
||||
#
|
||||
# We give files in mdbcomp to mtags before the files in this directory
|
||||
# because we want references to entities defined in the modules copied from the
|
||||
# mdbcomp directory to this directory to go the actual, effective definitions,
|
||||
# the definitions which can be changed *without* those changes going away
|
||||
# on the next copy.
|
||||
|
||||
tags: .browser_tags
|
||||
|
||||
.browser_tags: $(MTAGS) $($(BROWSER_LIB_NAME).ms) \
|
||||
$(wildcard $(LIBRARY_DIR)/*.m) \
|
||||
$(wildcard $(MDBCOMP_DIR)/*.m)
|
||||
$(MTAGS) $($(BROWSER_LIB_NAME).ms) ../mdbcomp/*.m ../library/*.m
|
||||
.browser_tags: $(MTAGS) $(wildcard *.m) \
|
||||
$(wildcard $(MDBCOMP_DIR)/*.m) \
|
||||
$(wildcard $(LIBRARY_DIR)/*.m)
|
||||
$(MTAGS) $(MDBCOMP_DIR)/*.m *.m $(LIBRARY_DIR)/*.m
|
||||
@touch .browser_tags
|
||||
|
||||
.PHONY: tags_file_exists
|
||||
tags_file_exists:
|
||||
@if test ! -f tags; then echo making tags; \
|
||||
$(MTAGS) $($(BROWSER_LIB_NAME).ms) ../mdbcomp/*.m ../library/*.m; \
|
||||
touch .browser_tags; \
|
||||
@if test ! -f tags; \
|
||||
then \
|
||||
echo making tags; \
|
||||
$(MTAGS) $(MDBCOMP_DIR)/*.m *.m $(LIBRARY_DIR)/*.m; \
|
||||
touch .browser_tags; \
|
||||
fi
|
||||
|
||||
$(BROWSER_LIB_NAME).stats: $(COMPILER_DIR)/source_stats.awk \
|
||||
@@ -214,17 +227,34 @@ dates:
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
# The documentation of the reason for this set of rules
|
||||
# can be found in library/Mmakefile.
|
||||
|
||||
.PHONY: os cs css javas
|
||||
ifneq ($(MMAKE_USE_MMC_MAKE),yes)
|
||||
os: $($(BROWSER_LIB_NAME).os)
|
||||
cs: $($(BROWSER_LIB_NAME).cs)
|
||||
css: $($(BROWSER_LIB_NAME).css)
|
||||
javas: $($(BROWSER_LIB_NAME).javas)
|
||||
ifeq ($(MMAKE_USE_MMC_MAKE),yes)
|
||||
os: $(BROWSER_LIB_NAME).os
|
||||
cs: $(BROWSER_LIB_NAME).cs
|
||||
css: $(BROWSER_LIB_NAME).css
|
||||
javas: $(BROWSER_LIB_NAME).javas
|
||||
else
|
||||
os: $(BROWSER_LIB_NAME).os
|
||||
cs: $(BROWSER_LIB_NAME).cs
|
||||
css: $(BROWSER_LIB_NAME).css
|
||||
javas: $(BROWSER_LIB_NAME).javas
|
||||
ifneq ($(origin $(BROWSER_LIB_NAME).os),undefined)
|
||||
os: $($(BROWSER_LIB_NAME).os)
|
||||
cs: $($(BROWSER_LIB_NAME).cs)
|
||||
css: $($(BROWSER_LIB_NAME).css)
|
||||
javas: $($(BROWSER_LIB_NAME).javas)
|
||||
else
|
||||
os:
|
||||
mmake depend; mmake os
|
||||
|
||||
cs:
|
||||
mmake depend; mmake cs
|
||||
|
||||
css:
|
||||
mmake depend; mmake css
|
||||
|
||||
javas:
|
||||
mmake depend; mmake javas
|
||||
endif
|
||||
endif
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#-----------------------------------------------------------------------------#
|
||||
# vim: ts=8 sw=8 noexpandtab
|
||||
# vim: ts=8 sw=8 noexpandtab ft=make
|
||||
#-----------------------------------------------------------------------------#
|
||||
# Copyright (C) 1998-2002, 2005 The University of Melbourne.
|
||||
# This file may only be copied under the terms of the GNU General
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#-----------------------------------------------------------------------------#
|
||||
# vim: ts=8 sw=8 noexpandtab
|
||||
# vim: ts=8 sw=8 noexpandtab ft=make
|
||||
#-----------------------------------------------------------------------------#
|
||||
# Copyright (C) 1995-2003, 2005-2012 The University of Melbourne.
|
||||
# This file may only be copied under the terms of the GNU General
|
||||
@@ -175,20 +175,41 @@ dates:
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
# The documentation of the reason for this set of rules
|
||||
# can be found in library/Mmakefile.
|
||||
|
||||
# Note that the cs and os targets don't build mercury_compile_init.{c,o}.
|
||||
|
||||
.PHONY: os cs css javas opts
|
||||
ifneq ($(MMAKE_USE_MMC_MAKE),yes)
|
||||
os: $($(MC_PROG).os)
|
||||
cs: $($(MC_PROG).cs)
|
||||
css: $($(MC_PROG).css)
|
||||
javas: $($(MC_PROG).javas)
|
||||
opts: $($(MC_PROG).opts)
|
||||
ifeq ($(MMAKE_USE_MMC_MAKE),yes)
|
||||
os: $(MC_PROG).os
|
||||
cs: $(MC_PROG).cs
|
||||
css: $(MC_PROG).css
|
||||
javas: $(MC_PROG).javas
|
||||
opts: $(MC_PROG).opts
|
||||
else
|
||||
os: $(MC_PROG).os
|
||||
cs: $(MC_PROG).cs
|
||||
css: $(MC_PROG).css
|
||||
javas: $(MC_PROG).javas
|
||||
opts: $(MC_PROG).opts
|
||||
ifneq ($(origin $(MC_PROG).os),undefined)
|
||||
os: $($(MC_PROG).os)
|
||||
cs: $($(MC_PROG).cs)
|
||||
css: $($(MC_PROG).css)
|
||||
javas: $($(MC_PROG).javas)
|
||||
opts: $($(MC_PROG).opts)
|
||||
else
|
||||
os:
|
||||
mmake depend; mmake os
|
||||
|
||||
cs:
|
||||
mmake depend; mmake cs
|
||||
|
||||
css:
|
||||
mmake depend; mmake css
|
||||
|
||||
javas:
|
||||
mmake depend; mmake javas
|
||||
|
||||
opts:
|
||||
mmake depend; mmake opts
|
||||
endif
|
||||
endif
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
@@ -151,30 +151,28 @@ $(MDBCOMP_MODULES): %: $(MDBCOMP_DIR)/%
|
||||
|
||||
# Add some additional dependencies, so that Mmake knows to remake the
|
||||
# profiler if one of the libraries changes.
|
||||
|
||||
ifeq ("$(filter csharp% java% erlang%,$(GRADE))","")
|
||||
mdprof_cgi: $(RUNTIME_DIR)/lib$(RT_LIB_NAME).$A
|
||||
mdprof_cgi: $(LIBRARY_DIR)/lib$(STD_LIB_NAME).$A
|
||||
mdprof_test: $(RUNTIME_DIR)/lib$(RT_LIB_NAME).$A
|
||||
mdprof_test: $(LIBRARY_DIR)/lib$(STD_LIB_NAME).$A
|
||||
mdprof_dump: $(RUNTIME_DIR)/lib$(RT_LIB_NAME).$A
|
||||
mdprof_dump: $(LIBRARY_DIR)/lib$(STD_LIB_NAME).$A
|
||||
mdprof_create_feedback: $(RUNTIME_DIR)/lib$(RT_LIB_NAME).$A
|
||||
mdprof_create_feedback: $(LIBRARY_DIR)/lib$(STD_LIB_NAME).$A
|
||||
mdprof_report_feedback: $(RUNTIME_DIR)/lib$(RT_LIB_NAME).$A
|
||||
mdprof_report_feedback: $(LIBRARY_DIR)/lib$(STD_LIB_NAME).$A
|
||||
mdprof_procrep: $(RUNTIME_DIR)/lib$(RT_LIB_NAME).$A
|
||||
mdprof_procrep: $(LIBRARY_DIR)/lib$(STD_LIB_NAME).$A
|
||||
# XXX Should also depend on $(BOEHM_GC_DIR)/libgc(_prof).$A, but only
|
||||
# if in .gc(.prof) grade.
|
||||
|
||||
RUN_LIB = \
|
||||
$(RUNTIME_DIR)/lib$(RT_LIB_NAME).$A \
|
||||
$(LIBRARY_DIR)/lib$(STD_LIB_NAME).$A
|
||||
|
||||
ifeq ("$(filter csharp% java% erlang%,$(GRADE))","")
|
||||
mdprof_cgi: $(RUN_LIB)
|
||||
mdprof_test: $(RUN_LIB)
|
||||
mdprof_dump: $(RUN_LIB)
|
||||
mdprof_create_feedback: $(RUN_LIB)
|
||||
mdprof_report_feedback: $(RUN_LIB)
|
||||
mdprof_procrep: $(RUN_LIB)
|
||||
endif
|
||||
|
||||
$(cs_subdir)mdprof_cgi_init.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mdprof_test_init.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mdprof_dump_init.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mdprof_create_feedback_init.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mdprof_report_feedback_init.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mdprof_procrep_init.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mdprof_cgi_init.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mdprof_test_init.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mdprof_dump_init.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mdprof_create_feedback_init.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mdprof_report_feedback_init.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mdprof_procrep_init.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
@@ -186,33 +184,32 @@ ints: DEPEND=$(patsubst %,%.ints,$(ALL_DEEP_MAIN_MODULES))
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
# We need the shenanigans with .deep_tags to avoid situations in which an
|
||||
# We need the shenanigans with .deep_tags to avoid situations in which
|
||||
# "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.
|
||||
#
|
||||
# We give files in mdbcomp to mtags before the files in this directory
|
||||
# because we want references to entities defined in the modules copied from the
|
||||
# mdbcomp directory to this directory to go the actual, effective definitions,
|
||||
# the definitions which can be changed *without* those changes going away
|
||||
# on the next copy.
|
||||
|
||||
.PHONY: tags
|
||||
tags: .deep_tags
|
||||
|
||||
DEEP_MS = \
|
||||
$(mdprof_cgi.ms) \
|
||||
$(mdprof_test.ms) \
|
||||
$(mdprof_dump.ms) \
|
||||
$(mdprof_create_feedback.ms) \
|
||||
$(mdprof_report_feedback.ms) \
|
||||
$(mdprof_procrep.ms)
|
||||
|
||||
.deep_tags: $(MTAGS) $(DEEP_MS) \
|
||||
.deep_tags: $(MTAGS) $(wildcard *.m) \
|
||||
$(wildcard $(MDBCOMP_DIR)/*.m) \
|
||||
$(wildcard $(LIBRARY_DIR)/*.m)
|
||||
$(MTAGS) $(DEEP_MS) $(MDBCOMP_DIR)/*.m $(LIBRARY_DIR)/*.m
|
||||
$(MTAGS) $(MDBCOMP_DIR)/*.m *.m $(LIBRARY_DIR)/*.m
|
||||
@touch .deep_tags
|
||||
|
||||
.PHONY: tags_file_exists
|
||||
tags_file_exists:
|
||||
@if test ! -f tags; then \
|
||||
@if test ! -f tags; \
|
||||
then \
|
||||
echo making tags; \
|
||||
$(MTAGS) $(DEEP_MS) $(MDBCOMP_DIR)/*.m $(LIBRARY_DIR)/*.m; \
|
||||
$(MTAGS) *.m $(MDBCOMP_DIR)/*.m $(LIBRARY_DIR)/*.m; \
|
||||
touch .deep_tags; \
|
||||
fi
|
||||
|
||||
@@ -220,7 +217,7 @@ tags_file_exists:
|
||||
|
||||
.PHONY: dates
|
||||
dates:
|
||||
touch $(mdprof_cgi.dates) \
|
||||
touch $(mdprof_cgi.dates) \
|
||||
$(mdprof_test.dates) \
|
||||
$(mdprof_dump.dates) \
|
||||
$(mdprof_create_feedback.dates) \
|
||||
@@ -229,31 +226,93 @@ dates:
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
# The documentation of the reason for this set of rules
|
||||
# can be found in library/Mmakefile.
|
||||
|
||||
.PHONY: os cs css javas
|
||||
os: $(mdprof_cgi.os) $(os_subdir)mdprof_cgi_init.o
|
||||
os: $(mdprof_test.os) $(os_subdir)mdprof_test_init.o
|
||||
os: $(mdprof_dump.os) $(os_subdir)mdprof_dump_init.o
|
||||
os: $(mdprof_create_feedback.os) $(os_subdir)mdprof_create_feedback_init.o
|
||||
os: $(mdprof_report_feedback.os) $(os_subdir)mdprof_report_feedback_init.o
|
||||
os: $(mdprof_procrep.os) $(os_subdir)mdprof_procrep_init.o
|
||||
cs: $(mdprof_cgi.cs) $(cs_subdir)mdprof_cgi_init.c
|
||||
cs: $(mdprof_test.cs) $(cs_subdir)mdprof_test_init.c
|
||||
cs: $(mdprof_dump.cs) $(cs_subdir)mdprof_dump_init.c
|
||||
cs: $(mdprof_create_feedback.cs) $(cs_subdir)mdprof_create_feedback_init.c
|
||||
cs: $(mdprof_report_feedback.cs) $(cs_subdir)mdprof_report_feedback_init.c
|
||||
cs: $(mdprof_procrep.cs) $(cs_subdir)mdprof_procrep_init.c
|
||||
css: $(mdprof_cgi.css)
|
||||
css: $(mdprof_test.css)
|
||||
css: $(mdprof_dump.css)
|
||||
css: $(mdprof_create_feedback.css)
|
||||
css: $(mdprof_report_feedback.css)
|
||||
css: $(mdprof_procrep.css)
|
||||
javas: $(mdprof_cgi.javas)
|
||||
javas: $(mdprof_test.javas)
|
||||
javas: $(mdprof_dump.javas)
|
||||
javas: $(mdprof_create_feedback.javas)
|
||||
javas: $(mdprof_report_feedback.javas)
|
||||
javas: $(mdprof_procrep.javas)
|
||||
|
||||
ifeq ($(MMAKE_USE_MMC_MAKE),yes)
|
||||
|
||||
os: \
|
||||
mdprof_cgi.os \
|
||||
mdprof_test.os \
|
||||
mdprof_dump.os \
|
||||
mdprof_create_feedback.os \
|
||||
mdprof_report_feedback.os \
|
||||
mdprof_procrep.os
|
||||
|
||||
cs: \
|
||||
mdprof_cgi.cs \
|
||||
mdprof_test.cs \
|
||||
mdprof_dump.cs \
|
||||
mdprof_create_feedback.cs \
|
||||
mdprof_report_feedback.cs \
|
||||
mdprof_procrep.cs
|
||||
|
||||
css: \
|
||||
mdprof_cgi.css \
|
||||
mdprof_test.css \
|
||||
mdprof_dump.css \
|
||||
mdprof_create_feedback.css \
|
||||
mdprof_report_feedback.css \
|
||||
mdprof_procrep.css
|
||||
|
||||
javas: \
|
||||
mdprof_cgi.javas \
|
||||
mdprof_test.javas \
|
||||
mdprof_dump.javas \
|
||||
mdprof_create_feedback.javas \
|
||||
mdprof_report_feedback.javas \
|
||||
mdprof_procrep.javas
|
||||
|
||||
else
|
||||
ifneq ($(origin mdprof_cgi.os),undefined)
|
||||
|
||||
os: \
|
||||
$(mdprof_cgi.os) \
|
||||
$(mdprof_test.os) \
|
||||
$(mdprof_dump.os) \
|
||||
$(mdprof_create_feedback.os) \
|
||||
$(mdprof_report_feedback.os) \
|
||||
$(mdprof_procrep.os)
|
||||
|
||||
cs: \
|
||||
$(mdprof_cgi.cs) \
|
||||
$(mdprof_test.cs) \
|
||||
$(mdprof_dump.cs) \
|
||||
$(mdprof_create_feedback.cs) \
|
||||
$(mdprof_report_feedback.cs) \
|
||||
$(mdprof_procrep.cs)
|
||||
|
||||
css: \
|
||||
$(mdprof_cgi.css) \
|
||||
$(mdprof_test.css) \
|
||||
$(mdprof_dump.css) \
|
||||
$(mdprof_create_feedback.css) \
|
||||
$(mdprof_report_feedback.css) \
|
||||
$(mdprof_procrep.css)
|
||||
|
||||
javas: \
|
||||
$(mdprof_cgi.javas) \
|
||||
$(mdprof_test.javas) \
|
||||
$(mdprof_dump.javas) \
|
||||
$(mdprof_create_feedback.javas) \
|
||||
$(mdprof_report_feedback.javas) \
|
||||
$(mdprof_procrep.javas)
|
||||
else
|
||||
os:
|
||||
mmake depend; mmake os
|
||||
|
||||
cs:
|
||||
mmake depend; mmake cs
|
||||
|
||||
css:
|
||||
mmake depend; mmake css
|
||||
|
||||
javas:
|
||||
mmake depend; mmake javas
|
||||
endif
|
||||
endif
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#-----------------------------------------------------------------------------#
|
||||
# vim: ts=8 sw=8 noexpandtab
|
||||
# vim: ts=8 sw=8 noexpandtab ft=make
|
||||
#-----------------------------------------------------------------------------#
|
||||
# Copyright (C) 1996-2007, 2009-2012 The University of Melbourne.
|
||||
# This file may only be copied under the terms of the GNU General
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#-----------------------------------------------------------------------------#
|
||||
# vim: ts=8 sw=8 noexpandtab
|
||||
# vim: ts=8 sw=8 noexpandtab ft=make
|
||||
#-----------------------------------------------------------------------------#
|
||||
# Copyright (C) 2016 The Mercury team.
|
||||
# This file may only be copied under the terms of the GNU General
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#-----------------------------------------------------------------------------#
|
||||
# vim: ts=8 sw=8 noexpandtab
|
||||
# vim: ts=8 sw=8 noexpandtab ft=make
|
||||
#-----------------------------------------------------------------------------#
|
||||
# Copyright (C) 1997-2012 The University of Melbourne.
|
||||
# This file may only be copied under the terms of the GNU General
|
||||
@@ -234,13 +234,15 @@ check_doc_undoc: MODULES_DOC MODULES_UNDOC *.m
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
tags: $(MTAGS) $($(STD_LIB_NAME).ms)
|
||||
$(MTAGS) $($(STD_LIB_NAME).ms)
|
||||
tags: $(MTAGS) $(wildcard *.m)
|
||||
$(MTAGS) $(wildcard *.m)
|
||||
|
||||
.PHONY: tags_file_exists
|
||||
tags_file_exists:
|
||||
@if test ! -f tags; then echo making tags; \
|
||||
$(MTAGS) $($(STD_LIB_NAME).ms); \
|
||||
@if test ! -f tags; \
|
||||
then \
|
||||
echo making tags; \
|
||||
$(MTAGS) $($(STD_LIB_NAME).ms); \
|
||||
fi
|
||||
|
||||
$(STD_LIB_NAME).stats: $(COMPILER_DIR)/source_stats.awk $($(STD_LIB_NAME).ms)
|
||||
@@ -255,18 +257,85 @@ dates:
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
.PHONY: os cs javas
|
||||
ifneq ($(MMAKE_USE_MMC_MAKE),yes)
|
||||
os: $($(STD_LIB_NAME).os)
|
||||
cs: $($(STD_LIB_NAME).cs)
|
||||
css: $($(STD_LIB_NAME).css)
|
||||
javas: $($(STD_LIB_NAME).javas)
|
||||
# We have three separate rules for each of the os, cs, css, javas and
|
||||
# opts targets, because no single rule can get the job done.
|
||||
#
|
||||
# 1. When we are using mmake merely as a wrapper around mmc --make,
|
||||
# we get mmc --make compute the set of .o, .c, .cs, .java or .opt files
|
||||
# to be (re)built. It has the internal rules to do this computation,
|
||||
# and more crucially, when we are using mmc --make, making dependencies
|
||||
# for an executable or library does NOT create a .dv file for that
|
||||
# executable or binary, so the set of .o, .c, .cs, .java or .opt files
|
||||
# required to build that executable or binary is not recorded there.
|
||||
#
|
||||
# 2. When we are NOT using mmc --make, then mmc itself won't know what
|
||||
# target language files are needed to create the executable or library,
|
||||
# so it is mmake's job to decide which files to ask mmc to (re)build.
|
||||
# Mmake gets this information from the .dv files it reads. These files
|
||||
# are created by "mmake depend" on an executable or library, and will
|
||||
# define the make variables x.os, x.cs, x.css, x.javas and x.opts
|
||||
# (if the executable or library is named x).
|
||||
#
|
||||
# 2a. If e.g. x.os is defined (which we test for as "not undefined"),
|
||||
# that means that "mmake depend" has been run at least on x, and since
|
||||
# we just about always just run "mmake depend" in a directory instead of
|
||||
# running "mmake x.depend" on its executables/libraries individually,
|
||||
# we assume that if one .dv file exists, they all exist. In this case,
|
||||
# we get the set of .o, .c, .cs, .java or .opt files to (re)build
|
||||
# from these variables defined in the .dv files.
|
||||
#
|
||||
# 2b. Conversely, if x.os is undefined, we assume that all the related
|
||||
# make variables are also undefined. In this case, we invoke mmake
|
||||
# depend to build the .dv files, and then invoke mmake again to do
|
||||
# the job we were asked to do. We need two separate mmake invocations,
|
||||
# because mmake can read .dv files only when it starts up. And while
|
||||
# the second invocation of mmake looks like a case of infinite tail
|
||||
# recursion, it isn't, because after the mmake depend step, the
|
||||
# recursive invocation will end up using the 2a rule, not the 2b.
|
||||
#
|
||||
# An additional reason why we want to handle 2a separately from 2b is that
|
||||
# the mere existence of an mmake rule such as
|
||||
#
|
||||
# os: $(mslice.os)
|
||||
#
|
||||
# in the Mmakefile will generate a warning about mslice.os being undefined
|
||||
# (if in fact it is undefined) *even if* the mmake invocation does not
|
||||
# involve the "os" target in any way, which can be confusing, and even
|
||||
# to those to whom it isn't confusing, it *is* annoying.
|
||||
|
||||
.PHONY: os cs css javas opts
|
||||
ifeq ($(MMAKE_USE_MMC_MAKE),yes)
|
||||
os: $(STD_LIB_NAME).os
|
||||
cs: $(STD_LIB_NAME).cs
|
||||
css: $(STD_LIB_NAME).css
|
||||
javas: $(STD_LIB_NAME).javas
|
||||
opts: $(STD_LIB_NAME).opts
|
||||
else
|
||||
os: $(STD_LIB_NAME).os
|
||||
cs: $(STD_LIB_NAME).cs
|
||||
css: $(STD_LIB_NAME).css
|
||||
javas: $(STD_LIB_NAME).javas
|
||||
ifneq ($(origin $(STD_LIB_NAME).os),undefined)
|
||||
os: $($(STD_LIB_NAME).os)
|
||||
cs: $($(STD_LIB_NAME).cs)
|
||||
css: $($(STD_LIB_NAME).css)
|
||||
javas: $($(STD_LIB_NAME).javas)
|
||||
opts: $($(STD_LIB_NAME).opts)
|
||||
else
|
||||
os:
|
||||
mmake depend; mmake os
|
||||
|
||||
cs:
|
||||
mmake depend; mmake cs
|
||||
|
||||
css:
|
||||
mmake depend; mmake css
|
||||
|
||||
javas:
|
||||
mmake depend; mmake javas
|
||||
|
||||
opts:
|
||||
mmake depend; mmake opts
|
||||
endif
|
||||
endif
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
# javac expects to find the sources for symbols named jmercury.runtime.* in
|
||||
# jmercury/runtime/*, but in our sources those symbols actually come from
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#-----------------------------------------------------------------------------#
|
||||
# vim: ts=8 sw=8 noexpandtab ft=make
|
||||
# vim: ts=8 sw=8 noexpandtab ft=make ft=make
|
||||
#-----------------------------------------------------------------------------#
|
||||
# Copyright (C) 2005-2007, 2009-2010, 2012 The University of Melbourne.
|
||||
# This file may only be copied under the terms of the GNU General
|
||||
@@ -189,17 +189,34 @@ dates:
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
# The documentation of the reason for this set of rules
|
||||
# can be found in library/Mmakefile.
|
||||
|
||||
.PHONY: os cs css javas
|
||||
ifneq ($(MMAKE_USE_MMC_MAKE),yes)
|
||||
os: $($(MDBCOMP_LIB_NAME).os)
|
||||
cs: $($(MDBCOMP_LIB_NAME).cs)
|
||||
css: $($(MDBCOMP_LIB_NAME).css)
|
||||
javas: $($(MDBCOMP_LIB_NAME).javas)
|
||||
ifeq ($(MMAKE_USE_MMC_MAKE),yes)
|
||||
os: $(MDBCOMP_LIB_NAME).os
|
||||
cs: $(MDBCOMP_LIB_NAME).cs
|
||||
css: $(MDBCOMP_LIB_NAME).css
|
||||
javas: $(MDBCOMP_LIB_NAME).javas
|
||||
else
|
||||
os: $(MDBCOMP_LIB_NAME).os
|
||||
cs: $(MDBCOMP_LIB_NAME).cs
|
||||
css: $(MDBCOMP_LIB_NAME).css
|
||||
javas: $(MDBCOMP_LIB_NAME).javas
|
||||
ifneq ($(origin $(MDBCOMP_LIB_NAME).os),undefined)
|
||||
os: $($(MDBCOMP_LIB_NAME).os)
|
||||
cs: $($(MDBCOMP_LIB_NAME).cs)
|
||||
css: $($(MDBCOMP_LIB_NAME).css)
|
||||
javas: $($(MDBCOMP_LIB_NAME).javas)
|
||||
else
|
||||
os:
|
||||
mmake depend; mmake os
|
||||
|
||||
cs:
|
||||
mmake depend; mmake cs
|
||||
|
||||
css:
|
||||
mmake depend; mmake css
|
||||
|
||||
javas:
|
||||
mmake depend; mmake javas
|
||||
endif
|
||||
endif
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
@@ -74,8 +74,9 @@ all: $(ALL_MODULES) $(TAGS_FILE_EXISTS)
|
||||
# profiler if one of the libraries changes.
|
||||
|
||||
ifeq ("$(filter csharp% java% erlang%,$(GRADE))","")
|
||||
mfilterjavac: $(RUNTIME_DIR)/lib$(RT_LIB_NAME).$A
|
||||
mfilterjavac: $(LIBRARY_DIR)/lib$(STD_LIB_NAME).$A
|
||||
mfilterjavac: \
|
||||
$(RUNTIME_DIR)/lib$(RT_LIB_NAME).$A \
|
||||
$(LIBRARY_DIR)/lib$(STD_LIB_NAME).$A
|
||||
endif
|
||||
|
||||
$(cs_subdir)mfilterjavac.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
@@ -98,19 +99,17 @@ ints: DEPEND=$(patsubst %,%.ints,$(ALL_MODULES))
|
||||
.PHONY: tags
|
||||
tags: .mfilterjavac_tags
|
||||
|
||||
MS = \
|
||||
$(mfilterjavac.ms)
|
||||
|
||||
.mfilterjavac_tags: $(MTAGS) $(MS) \
|
||||
$(wildcard $(LIBRARY_DIR)/*.m)
|
||||
$(MTAGS) $(MS) $(LIBRARY_DIR)/*.m
|
||||
.mfilterjavac_tags: $(MTAGS) $(wildcard *.m) $(wildcard $(LIBRARY_DIR)/*.m)
|
||||
$(MTAGS) *.m $(LIBRARY_DIR)/*.m
|
||||
@touch .mfilterjavac_tags
|
||||
|
||||
.PHONY: tags_file_exists
|
||||
tags_file_exists:
|
||||
@if test ! -f tags; then echo making tags; \
|
||||
$(MTAGS) $(MS) $(LIBRARY_DIR)/*.m; \
|
||||
touch .mfilterjavac_tags; \
|
||||
@if test ! -f tags; \
|
||||
then \
|
||||
echo making tags; \
|
||||
$(MTAGS) *.m $(LIBRARY_DIR)/*.m; \
|
||||
touch .mfilterjavac_tags; \
|
||||
fi
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
@@ -121,17 +120,41 @@ dates:
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
# The documentation of the reason for this set of rules
|
||||
# can be found in library/Mmakefile.
|
||||
|
||||
.PHONY: os cs css javas
|
||||
os: $(mfilterjavac.os) $(os_subdir)mfilterjavac_init.o
|
||||
cs: $(mfilterjavac.cs) $(cs_subdir)mfilterjavac_init.c
|
||||
css: $(mfilterjavac.css)
|
||||
javas: $(mfilterjavac.javas)
|
||||
ifeq ($(MMAKE_USE_MMC_MAKE),yes)
|
||||
os: mfilterjavac.os
|
||||
cs: mfilterjavac.cs
|
||||
css: mfilterjavac.css
|
||||
javas: mfilterjavac.javas
|
||||
else
|
||||
ifneq ($(origin mfilterjavac.os),undefined)
|
||||
os: $(mfilterjavac.os)
|
||||
cs: $(mfilterjavac.cs)
|
||||
css: $(mfilterjavac.css)
|
||||
javas: $(mfilterjavac.javas)
|
||||
else
|
||||
os:
|
||||
mmake depend; mmake os
|
||||
|
||||
cs:
|
||||
mmake depend; mmake cs
|
||||
|
||||
css:
|
||||
mmake depend; mmake css
|
||||
|
||||
javas:
|
||||
mmake depend; mmake javas
|
||||
endif
|
||||
endif
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
realclean_local:
|
||||
rm -f .mfilterjavac_tags tags MFILTERJAVAC_FLAGS MFILTERJAVAC_FLAGS.date
|
||||
rm -f $(PDBS) vc*.pdb
|
||||
rm -f .mfilterjavac_tags tags \
|
||||
MFILTERJAVAC_FLAGS MFILTERJAVAC_FLAGS.date $(PDBS) vc*.pdb
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
|
||||
@@ -86,15 +86,17 @@ ints: mercury_profile.ints
|
||||
|
||||
tags: .profiler_tags
|
||||
|
||||
.profiler_tags: $(MTAGS) $(mercury_profile.ms) $(wildcard $(LIBRARY_DIR)/*.m)
|
||||
$(MTAGS) $(mercury_profile.ms) $(LIBRARY_DIR)/*.m
|
||||
.profiler_tags: $(MTAGS) $(wildcard *.m) $(wildcard $(LIBRARY_DIR)/*.m)
|
||||
$(MTAGS) *.m $(LIBRARY_DIR)/*.m
|
||||
@touch .profiler_tags
|
||||
|
||||
.PHONY: tags_file_exists
|
||||
tags_file_exists:
|
||||
@if test ! -f tags; then echo making tags; \
|
||||
$(MTAGS) $(mercury_profile.ms) $(LIBRARY_DIR)/*.m ; \
|
||||
touch .profiler_tags ; \
|
||||
@if test ! -f tags; \
|
||||
then \
|
||||
echo making tags; \
|
||||
$(MTAGS) *.m $(LIBRARY_DIR)/*.m ; \
|
||||
touch .profiler_tags ; \
|
||||
fi
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
@@ -105,11 +107,35 @@ dates:
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
# The documentation of the reason for this set of rules
|
||||
# can be found in library/Mmakefile.
|
||||
|
||||
.PHONY: os cs css javas
|
||||
os: $(mercury_profile.os) $(os_subdir)mercury_profile_init.o
|
||||
cs: $(mercury_profile.cs) $(cs_subdir)mercury_profile_init.c
|
||||
css: $(mercury_profile.css)
|
||||
javas: $(mercury_profile.javas)
|
||||
ifeq ($(MMAKE_USE_MMC_MAKE),yes)
|
||||
os: mercury_profile.os
|
||||
cs: mercury_profile.cs
|
||||
css: mercury_profile.css
|
||||
javas: mercury_profile.javas
|
||||
else
|
||||
ifneq ($(origin mercury_profile.os),undefined)
|
||||
os: $(mercury_profile.os)
|
||||
cs: $(mercury_profile.cs)
|
||||
css: $(mercury_profile.css)
|
||||
javas: $(mercury_profile.javas)
|
||||
else
|
||||
os:
|
||||
mmake depend; mmake os
|
||||
|
||||
cs:
|
||||
mmake depend; mmake cs
|
||||
|
||||
css:
|
||||
mmake depend; mmake css
|
||||
|
||||
javas:
|
||||
mmake depend; mmake javas
|
||||
endif
|
||||
endif
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#-----------------------------------------------------------------------------#
|
||||
# vim: ts=8 sw=8 noexpandtab
|
||||
# vim: ts=8 sw=8 noexpandtab ft=make
|
||||
#-----------------------------------------------------------------------------#
|
||||
# Copyright (C) 2003-2004, 2006 University of Melbourne.
|
||||
# This file may only be copied under the terms of the GNU General
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#-----------------------------------------------------------------------------#
|
||||
# vim: ts=8 sw=8 noexpandtab
|
||||
# vim: ts=8 sw=8 noexpandtab ft=make
|
||||
#-----------------------------------------------------------------------------#
|
||||
# This source file is hereby placed in the public domain. -fjh (the author).
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#-----------------------------------------------------------------------------#
|
||||
# vim: ts=8 sw=8 noexpandtab
|
||||
# vim: ts=8 sw=8 noexpandtab ft=make
|
||||
#-----------------------------------------------------------------------------#
|
||||
# Copyright (C) 1996-2009, 2011 The University of Melbourne.
|
||||
# This file may only be copied under the terms of the GNU General
|
||||
|
||||
170
slice/Mmakefile
170
slice/Mmakefile
@@ -38,7 +38,7 @@ MAIN_TARGET = all
|
||||
|
||||
# If you add more modules, you will also have to modify the os, cs, css
|
||||
# and java targets below, as well as ../Mmakefile.
|
||||
MERCURY_MAIN_MODULES = mslice mdice mtc_union mcov mtc_diff
|
||||
MERCURY_MAIN_MODULES = mslice mdice mcov mtc_union mtc_diff
|
||||
|
||||
DEPENDS = $(patsubst %,%.depend,$(MERCURY_MAIN_MODULES))
|
||||
INTS = $(patsubst %,%.ints,$(MERCURY_MAIN_MODULES))
|
||||
@@ -137,32 +137,27 @@ endif
|
||||
|
||||
# Add some additional dependencies, so that Mmake knows to remake the
|
||||
# slicer and dicer if one of the libraries changes.
|
||||
|
||||
ifeq ("$(filter csharp% java% erlang%,$(GRADE))","")
|
||||
mslice: $(RUNTIME_DIR)/lib$(RT_LIB_NAME).$A
|
||||
mslice: $(LIBRARY_DIR)/lib$(STD_LIB_NAME).$A
|
||||
mslice: $(BROWSER_DIR)/lib$(BROWSER_LIB_NAME).$A
|
||||
mdice: $(RUNTIME_DIR)/lib$(RT_LIB_NAME).$A
|
||||
mdice: $(LIBRARY_DIR)/lib$(STD_LIB_NAME).$A
|
||||
mdice: $(BROWSER_DIR)/lib$(BROWSER_LIB_NAME).$A
|
||||
# XXX Should also depend on $(BOEHM_GC_DIR)/libgc(_prof).$A, but only
|
||||
# if in .gc(.prof) grade.
|
||||
mtc_union: $(RUNTIME_DIR)/lib$(RT_LIB_NAME).$A
|
||||
mtc_union: $(LIBRARY_DIR)/lib$(STD_LIB_NAME).$A
|
||||
mtc_union: $(BROWSER_DIR)/lib$(BROWSER_LIB_NAME).$A
|
||||
mcov: $(RUNTIME_DIR)/lib$(RT_LIB_NAME).$A
|
||||
mcov: $(LIBRARY_DIR)/lib$(STD_LIB_NAME).$A
|
||||
mcov: $(BROWSER_DIR)/lib$(BROWSER_LIB_NAME).$A
|
||||
mtc_diff: $(RUNTIME_DIR)/lib$(RT_LIB_NAME).$A
|
||||
mtc_diff: $(LIBRARY_DIR)/lib$(STD_LIB_NAME).$A
|
||||
mtc_diff: $(BROWSER_DIR)/lib$(BROWSER_LIB_NAME).$A
|
||||
|
||||
RUN_LIB_BROW = \
|
||||
$(RUNTIME_DIR)/lib$(RT_LIB_NAME).$A \
|
||||
$(LIBRARY_DIR)/lib$(STD_LIB_NAME).$A \
|
||||
$(BROWSER_DIR)/lib$(BROWSER_LIB_NAME).$A
|
||||
|
||||
ifeq ("$(filter csharp% java% erlang%,$(GRADE))","")
|
||||
mslice: $(RUN_LIB_BROW)
|
||||
mdice: $(RUN_LIB_BROW)
|
||||
mcov: $(RUN_LIB_BROW)
|
||||
mtc_union: $(RUN_LIB_BROW)
|
||||
mtc_diff: $(RUN_LIB_BROW)
|
||||
endif
|
||||
|
||||
$(cs_subdir)mslice_init.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mdice_init.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mtc_union.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mcov.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mtc_diff.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mslice_init.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mdice_init.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mcov_init.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mtc_union_init.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
$(cs_subdir)mtc_diff_init.c: $(UTIL_DIR)/mkinit$(EXT_FOR_EXE)
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
@@ -174,20 +169,31 @@ ints: $(INTS)
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
# We need the shenanigans with .slice_tags to avoid situations in which
|
||||
# "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.
|
||||
#
|
||||
# We give files in mdbcomp to mtags before the files in this directory
|
||||
# because we want references to entities defined in the modules copied from the
|
||||
# mdbcomp directory to this directory to go the actual, effective definitions,
|
||||
# the definitions which can be changed *without* those changes going away
|
||||
# on the next copy.
|
||||
|
||||
tags: .slice_tags
|
||||
|
||||
.slice_tags: $(MTAGS) $(mslice.ms) $(mdice.ms) $(mtc_union.ms) $(mcov.ms) \
|
||||
$(mtc_diff.ms) $(wildcard $(LIBRARY_DIR)/*.m)
|
||||
$(MTAGS) $(mslice.ms) $(mdice.ms) $(mtc_union.ms) $(mcov.ms) \
|
||||
$(mtc_diff.ms) $(LIBRARY_DIR)/*.m
|
||||
.slice_tags: $(MTAGS) $(wildcard *.m) \
|
||||
$(wildcard $(MDBCOMP_DIR)/*.m) \
|
||||
$(wildcard $(LIBRARY_DIR)/*.m)
|
||||
$(MTAGS) $(MDBCOMP_DIR)/*.m *.m $(LIBRARY_DIR)/*.m
|
||||
@touch .slice_tags
|
||||
|
||||
.PHONY: tags_file_exists
|
||||
tags_file_exists:
|
||||
@if test ! -f tags; then \
|
||||
@if test ! -f tags; \
|
||||
then \
|
||||
echo making tags; \
|
||||
$(MTAGS) $(mslice.ms) $(mdice.ms) $(mtc_union.ms) \
|
||||
$(mcov.ms) $(mtc_union.ms) $(LIBRARY_DIR)/*.m; \
|
||||
$(MTAGS) $(MDBCOMP_DIR)/*.m *.m $(LIBRARY_DIR)/*.m; \
|
||||
touch .slice_tags; \
|
||||
fi
|
||||
|
||||
@@ -195,45 +201,89 @@ tags_file_exists:
|
||||
|
||||
.PHONY: dates
|
||||
dates:
|
||||
touch $(mslice.dates) $(mdice.dates) $(mtc_union.dates) \
|
||||
$(mcov.dates) $(mtc_diff.ms)
|
||||
touch $(mslice.dates) $(mdice.dates) $(mcov.dates) \
|
||||
$(mtc_union.dates) $(mtc_diff.ms)
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
# The documentation of the reason for this set of rules
|
||||
# can be found in library/Mmakefile.
|
||||
|
||||
.PHONY: os cs css javas
|
||||
os: $(mslice.os) \
|
||||
|
||||
ifeq ($(MMAKE_USE_MMC_MAKE),yes)
|
||||
|
||||
os: \
|
||||
mslice.os \
|
||||
mdice.os \
|
||||
mcov.os \
|
||||
mtc_union.os \
|
||||
mtc_diff.os
|
||||
|
||||
cs: \
|
||||
mslice.cs \
|
||||
mdice.cs \
|
||||
mcov.cs \
|
||||
mtc_union.cs \
|
||||
mtc_diff.cs
|
||||
css: \
|
||||
mslice.css \
|
||||
mdice.css \
|
||||
mcov.css \
|
||||
mtc_union.css \
|
||||
mtc_diff.css
|
||||
javas: \
|
||||
mslice.javas \
|
||||
mdice.javas \
|
||||
mcov.javas \
|
||||
mtc_union.javas \
|
||||
mtc_diff.javas
|
||||
|
||||
else
|
||||
ifneq ($(origin mslice.os),undefined)
|
||||
|
||||
os: \
|
||||
$(mslice.os) \
|
||||
$(mdice.os) \
|
||||
$(mtc_union.os) \
|
||||
$(mcov.os) \
|
||||
$(mtc_diff.os) \
|
||||
$(os_subdir)mslice_init.o \
|
||||
$(os_subdir)mdice_init.o \
|
||||
$(os_subdir)mtc_union.o \
|
||||
$(os_subdir)mcov.o \
|
||||
$(os_subdir)mtc_diff.o
|
||||
$(mtc_union.os) \
|
||||
$(mtc_diff.os)
|
||||
|
||||
cs: $(mslice.cs) \
|
||||
cs: \
|
||||
$(mslice.cs) \
|
||||
$(mdice.cs) \
|
||||
$(mtc_union.cs) \
|
||||
$(mcov.cs) \
|
||||
$(mtc_diff.cs) \
|
||||
$(cs_subdir)mslice_init.c \
|
||||
$(cs_subdir)mdice_init.c \
|
||||
$(cs_subdir)mtc_union.c \
|
||||
$(cs_subdir)mcov.c \
|
||||
$(cs_subdir)mtc_diff.c
|
||||
|
||||
css: $(mslice.css) \
|
||||
$(mtc_union.cs) \
|
||||
$(mtc_diff.cs)
|
||||
css: \
|
||||
$(mslice.css) \
|
||||
$(mdice.css) \
|
||||
$(mtc_union.css) \
|
||||
$(mcov.css) \
|
||||
$(mtc_diff.css)
|
||||
|
||||
javas: $(mslice.javas) \
|
||||
$(mtc_union.css) \
|
||||
$(mtc_diff.css)
|
||||
javas: \
|
||||
$(mslice.javas) \
|
||||
$(mdice.javas) \
|
||||
$(mtc_union.javas) \
|
||||
$(mcov.javas) \
|
||||
$(mtc_diff.javas)
|
||||
$(mtc_union.javas) \
|
||||
$(mtc_diff.javas)
|
||||
|
||||
else
|
||||
|
||||
os:
|
||||
mmake depend; mmake os
|
||||
|
||||
cs:
|
||||
mmake depend; mmake cs
|
||||
|
||||
css:
|
||||
mmake depend; mmake css
|
||||
|
||||
javas:
|
||||
mmake depend; mmake javas
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
@@ -256,16 +306,16 @@ install_slicer: mslice mdice mtc_union mcov mtc_diff
|
||||
$(INSTALL_MERC_BIN_DIR)/mslice$(EXT_FOR_EXE)
|
||||
cp `vpath_find mdice$(EXT_FOR_EXE)` \
|
||||
$(INSTALL_MERC_BIN_DIR)/mdice$(EXT_FOR_EXE)
|
||||
cp `vpath_find mtc_union$(EXT_FOR_EXE)` \
|
||||
$(INSTALL_MERC_BIN_DIR)/mtc_union$(EXT_FOR_EXE)
|
||||
cp `vpath_find mcov$(EXT_FOR_EXE)` \
|
||||
$(INSTALL_MERC_BIN_DIR)/mcov$(EXT_FOR_EXE)
|
||||
cp `vpath_find mtc_union$(EXT_FOR_EXE)` \
|
||||
$(INSTALL_MERC_BIN_DIR)/mtc_union$(EXT_FOR_EXE)
|
||||
cp `vpath_find mtc_diff$(EXT_FOR_EXE)` \
|
||||
$(INSTALL_MERC_BIN_DIR)/mtc_diff$(EXT_FOR_EXE)
|
||||
ifeq ($(findstring java,$(GRADE)),java)
|
||||
cp `vpath_find mcov.jar` $(INSTALL_MERC_BIN_DIR)
|
||||
cp `vpath_find mdice.jar` $(INSTALL_MERC_BIN_DIR)
|
||||
cp `vpath_find mslice.jar` $(INSTALL_MERC_BIN_DIR)
|
||||
cp `vpath_find mcov.jar` $(INSTALL_MERC_BIN_DIR)
|
||||
cp `vpath_find mtc_diff.jar` $(INSTALL_MERC_BIN_DIR)
|
||||
cp `vpath_find mtc_union.jar` $(INSTALL_MERC_BIN_DIR)
|
||||
endif
|
||||
@@ -276,8 +326,8 @@ endif
|
||||
uninstall:
|
||||
-rm -f $(INSTALL_MERC_BIN_DIR)/mslice$(EXT_FOR_EXE)
|
||||
-rm -f $(INSTALL_MERC_BIN_DIR)/mdice$(EXT_FOR_EXE)
|
||||
-rm -f $(INSTALL_MERC_BIN_DIR)/mtc_union$(EXT_FOR_EXE)
|
||||
-rm -f $(INSTALL_MERC_BIN_DIR)/mcov$(EXT_FOR_EXE)
|
||||
-rm -f $(INSTALL_MERC_BIN_DIR)/mtc_union$(EXT_FOR_EXE)
|
||||
-rm -f $(INSTALL_MERC_BIN_DIR)/mtc_diff$(EXT_FOR_EXE)
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#-----------------------------------------------------------------------------#
|
||||
# vim: ts=8 sw=8 noexpandtab
|
||||
# vim: ts=8 sw=8 noexpandtab ft=make
|
||||
#-----------------------------------------------------------------------------#
|
||||
# Copyright (C) 2007, 2009-2010, 2012 The University of Melbourne.
|
||||
# This file may only be copied under the terms of the GNU General
|
||||
@@ -196,17 +196,34 @@ dates:
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
# The documentation of the reason for this set of rules
|
||||
# can be found in library/Mmakefile.
|
||||
|
||||
.PHONY: os cs css javas
|
||||
ifneq ($(MMAKE_USE_MMC_MAKE),yes)
|
||||
os: $($(SSDB_LIB_NAME).os)
|
||||
cs: $($(SSDB_LIB_NAME).cs)
|
||||
css: $($(SSDB_LIB_NAME).css)
|
||||
javas: $($(SSDB_LIB_NAME).javas)
|
||||
ifeq ($(MMAKE_USE_MMC_MAKE),yes)
|
||||
os: $(SSDB_LIB_NAME).os
|
||||
cs: $(SSDB_LIB_NAME).cs
|
||||
css: $(SSDB_LIB_NAME).css
|
||||
javas: $(SSDB_LIB_NAME).javas
|
||||
else
|
||||
os: $(SSDB_LIB_NAME).os
|
||||
cs: $(SSDB_LIB_NAME).cs
|
||||
css: $(SSDB_LIB_NAME).css
|
||||
javas: $(SSDB_LIB_NAME).javas
|
||||
ifneq ($(origin $(SSDB_LIB_NAME).os),undefined)
|
||||
os: $($(SSDB_LIB_NAME).os)
|
||||
cs: $($(SSDB_LIB_NAME).cs)
|
||||
css: $($(SSDB_LIB_NAME).css)
|
||||
javas: $($(SSDB_LIB_NAME).javas)
|
||||
else
|
||||
os:
|
||||
mmake depend; mmake os
|
||||
|
||||
cs:
|
||||
mmake depend; mmake cs
|
||||
|
||||
css:
|
||||
mmake depend; mmake css
|
||||
|
||||
javas:
|
||||
mmake depend; mmake javas
|
||||
endif
|
||||
endif
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#-----------------------------------------------------------------------------#
|
||||
# vim: ts=8 sw=8 noexpandtab
|
||||
# vim: ts=8 sw=8 noexpandtab ft=make
|
||||
#-----------------------------------------------------------------------------#
|
||||
# Copyright (C) 2003 The University of Melbourne.
|
||||
# This file may only be copied under the terms of the GNU General
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#-----------------------------------------------------------------------------#
|
||||
# vim: ts=8 sw=8 noexpandtab
|
||||
# vim: ts=8 sw=8 noexpandtab ft=make
|
||||
#-----------------------------------------------------------------------------#
|
||||
# Copyright (C) 1998-2008 The University of Melbourne.
|
||||
# This file may only be copied under the terms of the GNU General
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#-----------------------------------------------------------------------------#
|
||||
# vim: ts=8 sw=8 noexpandtab
|
||||
# vim: ts=8 sw=8 noexpandtab ft=make
|
||||
#-----------------------------------------------------------------------------#
|
||||
# Copyright (C) 1995-2002, 2005, 2006-2007, 2010, 2012 The University of Melbourne.
|
||||
# Copyright (C) 2013, 2019 The Mercury team.
|
||||
|
||||
Reference in New Issue
Block a user