mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 17:33:38 +00:00
... instead of building a bunch of .c files.
Our tradition of adding an "s" at the end of a suffix to mean "all of the
files with the original suffix" had a problem when we added C# as a target
language. Until then, just as "os" stood for ".o files" when it occurred
as either a mmake target, mmc --make target, or mmake variable name component.
"cs" likewise stood for ".c files", but was now also needed to mean ".cs file".
We coped by keeping "cs" meaning ".c files", and adding "csharp" as a target
name synonym to mean ".cs file".
This diff keeps that synonym, but it changes
- the name needed to refer to ".c files" from "cs" to "all_cs"
- the name needed to refer to ".o files" from "os" to "all_os"
- the name needed to refer to ".pic_o files" from "pic_os" to "all_pic_os"
- the name needed to refer to ".cs files" from "css" to "all_css"
- the name needed to refer to ".java files" from "javas" to "all_javas"
- the name needed to refer to ".opt files" from "opts" to "all_opts"
- the name needed to refer to ".trans_opt files"
from "trans_opts" to "all_trans_opts"
It would be nice if we could apply this same change to all other similar
target names and mmake variable name suffixes, such as "ints" and "int3s",
but some of those names are already in use to mean semantically different
things. All of the names above that used to have the form "<ext>s" and
now have the form "all_<ext>s" stood for all the files with extension
".<ext>" that are prerequisites for building a linked target, i.e.
an executable or a library. But the mmake variable name suffixes
".all_mihs", ".all_mhs" and ".all_int0s" each stand for something subtly
different: the names of files that *may or may not exist", but which,
if they do exist, should be deleted by a clean or realclean target.
To make this breaking change easier to handle by users, this diff does
not simply redefine the meaning of ".all_int0s". (It does change the meaning
of the "cs" target, but the fact this will happen at some time has been
announced ages ago.) Instead, it defines three new mmake var suffixes,
".mihs_to_clean", ".mhs_to_clean" and ".int0s_to_clean", which are
synonyms for ".all_mihs", ".all_mhs" and ".all_int0s" respectively,
and announces that ".all_mihs", ".all_mhs" and ".all_int0s" are being
deprecated, and will have the above change of semantics applied to them
in the future.
NEWS.md:
Announce the breaking change.
compiler/make.top_level.m:
Stop treating the target "cs" as meaning "build all the .c files
for this program".
The code of classify_target_2 has long been semidet, but only in a way
that was not apparent to the compiler. Change the code to allow the
compiler to see its semidet nature while keeping the algorithm the same,
except for the change in the paragraph above.
This includes keeping e.g. "ints" as meaning "build all the .int/.int2
files needed by this program".
compiler/write_deps_file.m:
Stop generating mmake variables with suffixes ".cs", ".os", ".pic_os",
".javas" and ".css". The mmake variables with suffixes ".all_cs",
".all_os", ".all_pic_os", ".all_javas" and ".all_css" already existed.
All had the same value as the mmake variable without the "all",
with one exception: ".cs". However, in this case, the old (and still
current) value of ".all_cs" is what the value of ".cs" *should* have been.
Simplify some code.
The following changes in compiler/*.m are only cosmetic, but they helped me
rule out possible sources of problems with incomplete versions of this diff.
compiler/file_names.m:
Add a version of a fact_table_file_name_return_dirs which does not
return directories, since most of its callers don't need that info.
compiler/make.program_target.m:
Clarify code by making variable names more descriptive,
compiler/make.file_names.m:
compiler/make.module_target.m:
Conform to the changes above,
browser/Mmakefile:
compiler/Mmakefile:
deep_profiler/Mmakefile:
grade_lib/Mmakefile:
library/Mmakefile:
mdbcomp/Mmakefile:
mfilterjavac/Mmakefile:
profiler/Mmakefile:
slice/Mmakefile:
ssdb/Mmakefile:
Rename os to all_os, cs to all_cs, css to all_css, javas to all_javas,
and opts to all_opts. (There were no occurrences of trans_opts to rename.)
Replace [s as sh command names in actions.
scripts/Mmake.vars.in:
Specify the names of mmake variables holding the names of sets of files
with a given extension directly, since for some of them, adding an "s"
at the end of the name of the extension does not generate the name
of the corresponding mmake variable anymore.
scripts/Mmake.rules:
Use the directly specified mmake variable names from Mmake.vars.in
in the rule for installing lbraries. Temporarily add some debugging
output to make suree that the updated nested mmake variable references
work as intended.
tools/bootcheck:
Specify the names of mmake targets for making all the files in a program
with a given extension directly, since adding an "s" at the end of the
name of the extension does not generate the name of the corresponding
mmake target anymore.
Print timestamps around the action of checking namespace cleanliness,
to allow the time taken by that action to be measured. (I kept track
of bootchecks as they happened while working on this diff, and found
this time to be nontrivial.)
440 lines
13 KiB
Makefile
440 lines
13 KiB
Makefile
#-----------------------------------------------------------------------------#
|
|
# vim: ts=8 sw=8 noexpandtab ft=make
|
|
#-----------------------------------------------------------------------------#
|
|
# Copyright (C) 1995-2007, 2010 The University of Melbourne.
|
|
# This file may only be copied under the terms of the GNU General
|
|
# Public License - see the file COPYING in the Mercury distribution.
|
|
#-----------------------------------------------------------------------------#
|
|
#
|
|
# Mmake.rules - rules for building Mercury programs
|
|
#
|
|
# N.B. All the builtin rules must use $@ as the target, so that they work
|
|
# when $(VPATH) is set.
|
|
#
|
|
# When passing a module to mmc, strip off the directory part of the name.
|
|
# This way the compiler will report an error if the source file is in another
|
|
# directory, rather than generating interface files in the wrong directory.
|
|
|
|
main_target: $(MAIN_TARGET)
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
# Note that the order of suffixes is significant.
|
|
.SUFFIXES: .m .err \
|
|
.int0 .int .int2 .int3 .opt .trans_opt \
|
|
.dep .depend .dv .doit .ugly \
|
|
.date0 .date .date3 .optdate .trans_opt_date \
|
|
.c .$O .pic_o \
|
|
.i .s .pic_s \
|
|
.java .class \
|
|
.dll .exe .cpp .cs \
|
|
.c_date .java_date .s_date .pic_s_date
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
#
|
|
# Code to set variables based on the setting of MMAKE_USE_SUBDIRS
|
|
# (i.e. --use-subdirs).
|
|
#
|
|
|
|
ifeq ($(MMAKE_USE_SUBDIRS),yes)
|
|
|
|
MCFLAGS += --use-subdirs
|
|
ALL_MGNUCFLAGS += -I. -I$(mihs_subdir).
|
|
|
|
endif
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
#
|
|
# Find the directory containing the interface files for the standard library.
|
|
#
|
|
|
|
ifdef MERCURY_STDLIB_DIR
|
|
export MERCURY_STDLIB_DIR
|
|
MERC_INT_DIR = $(MERCURY_STDLIB_DIR)/ints
|
|
else
|
|
MERC_INT_DIR =
|
|
endif
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
.PRECIOUS: $(date0s_subdir)%.date0
|
|
.PRECIOUS: $(dates_subdir)%.date
|
|
.PRECIOUS: $(date3s_subdir)%.date3
|
|
.PRECIOUS: $(optdates_subdir)%.optdate
|
|
.PRECIOUS: $(trans_opt_dates_subdir)%.trans_opt_date
|
|
.PRECIOUS: $(c_dates_subdir)%.c_date
|
|
.PRECIOUS: $(java_dates_subdir)%.java_date
|
|
.PRECIOUS: $(s_dates_subdir)%.s_date
|
|
.PRECIOUS: $(pic_s_dates_subdir)%.pic_s_date
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
#
|
|
# Rules for building dependency files.
|
|
#
|
|
|
|
# When creating the dependencies with `--use-subdirs' enabled, we need
|
|
# to create the `Mercury/dates' directories manually in order to
|
|
# get things started. This should not be necessary, but there is a bug
|
|
# in GNU Make with regard to directory caching. I have sent off a bug report
|
|
# to the GNU Make maintainers (19 March 1998). -fjh.
|
|
|
|
ifneq ($(MMAKE_USE_MMC_MAKE),yes)
|
|
|
|
# Beware: the code for `%.depend' and `%.dep'/`%.dv' is duplicated,
|
|
# with each copy having two variants that differ only by a @.
|
|
# javac doesn't create the destination directory for class files
|
|
# so we must create it manually.
|
|
# The following mkdirs work around a bug in GNU Make.
|
|
$(deps_subdir)%.dep $(deps_subdir)%.dv:
|
|
$(MCD) $(ALL_GRADEFLAGS) $(ALL_MCDFLAGS) $* > $(*F).dep_err 2>&1
|
|
ifeq ($(MMAKE_USE_SUBDIRS),yes)
|
|
ifeq ($(MMAKE_USE_SUBDIRS_EXPLICIT),yes)
|
|
-mkdir -p $(classes_subdir) \
|
|
Mercury/dates Mercury/date0s Mercury/date3s \
|
|
Mercury/optdates Mercury/trans_opt_dates \
|
|
Mercury/c_dates \
|
|
Mercury/s_dates Mercury/pic_s_dates
|
|
else
|
|
@-mkdir -p $(classes_subdir) \
|
|
Mercury/dates Mercury/date0s Mercury/date3s \
|
|
Mercury/optdates Mercury/trans_opt_dates \
|
|
Mercury/c_dates \
|
|
Mercury/s_dates Mercury/pic_s_dates
|
|
endif
|
|
endif
|
|
|
|
# Beware: the code for `%.depend' and `%.dep'/`%.dv' is duplicated,
|
|
# with each copy having two variants that differ only by a @.
|
|
# javac doesn't create the destination directory for class files
|
|
# so we must create it manually.
|
|
# The following mkdirs work around a bug in GNU Make.
|
|
.PHONY: %.depend
|
|
%.depend:
|
|
$(MCD) $(ALL_GRADEFLAGS) $(ALL_MCDFLAGS) $* > $(*F).dep_err 2>&1
|
|
ifeq ($(MMAKE_USE_SUBDIRS),yes)
|
|
ifeq ($(MMAKE_USE_SUBDIRS_EXPLICIT),yes)
|
|
-mkdir -p $(classes_subdir) \
|
|
Mercury/dates Mercury/date0s Mercury/date3s \
|
|
Mercury/optdates Mercury/trans_opt_dates \
|
|
Mercury/c_dates \
|
|
Mercury/s_dates Mercury/pic_s_dates
|
|
else
|
|
@-mkdir -p $(classes_subdir) \
|
|
Mercury/dates Mercury/date0s Mercury/date3s \
|
|
Mercury/optdates Mercury/trans_opt_dates \
|
|
Mercury/c_dates \
|
|
Mercury/s_dates Mercury/pic_s_dates
|
|
endif
|
|
endif
|
|
|
|
endif # MMAKE_USE_MMC_MAKE != yes
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
#
|
|
# Rules for building interface files.
|
|
# WARNING: any changes here will probably need to be duplicated
|
|
# in compiler/write_deps_file.m.
|
|
#
|
|
|
|
ifneq ($(MMAKE_USE_MMC_MAKE),yes)
|
|
|
|
$(date0s_subdir)%.date0: %.m
|
|
$(MCPI) $(ALL_GRADEFLAGS) $(ALL_MCPIFLAGS) $(*F)
|
|
|
|
$(dates_subdir)%.date: %.m
|
|
$(MCI) $(ALL_GRADEFLAGS) $(ALL_MCIFLAGS) $(*F)
|
|
|
|
$(date3s_subdir)%.date3: %.m
|
|
$(MCSI) $(ALL_GRADEFLAGS) $(ALL_MCSIFLAGS) $(*F)
|
|
|
|
$(optdates_subdir)%.optdate: %.m
|
|
$(MCOI) $(ALL_GRADEFLAGS) $(ALL_MCOIFLAGS) $(*F)
|
|
|
|
$(trans_opt_dates_subdir)%.trans_opt_date: %.m
|
|
$(MCTOI) $(ALL_GRADEFLAGS) $(ALL_MCTOIFLAGS) $(*F)
|
|
|
|
# Be very careful about changing the following rules.
|
|
# The `@:' is a silent do-nothing command.
|
|
# It is used to force GNU Make to recheck the timestamp on the target file.
|
|
# (It is a pity that GNU Make doesn't have a way of handling these sorts
|
|
# of rules in a nicer manner.)
|
|
|
|
$(int0s_subdir)%.int0: $(date0s_subdir)%.date0
|
|
@:
|
|
|
|
$(ints_subdir)%.int: $(dates_subdir)%.date
|
|
@:
|
|
|
|
$(int2s_subdir)%.int2: $(dates_subdir)%.date
|
|
@:
|
|
|
|
$(int3s_subdir)%.int3: $(date3s_subdir)%.date3
|
|
@:
|
|
|
|
$(opts_subdir)%.opt: $(optdates_subdir)%.optdate
|
|
@:
|
|
|
|
$(trans_opts_subdir)%.trans_opt: $(trans_opt_dates_subdir)%.trans_opt_date
|
|
@:
|
|
|
|
endif # MMAKE_USE_MMC_MAKE != yes
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
#
|
|
# Rules for compiling Mercury source files.
|
|
# WARNING: any changes here will probably need to be duplicated
|
|
# in compiler/write_deps_file.m.
|
|
#
|
|
|
|
ifneq ($(MMAKE_USE_MMC_MAKE),yes)
|
|
|
|
# C back-end.
|
|
|
|
# When smart recompilation finds that a module does not need to be recompiled,
|
|
# it only touches the `.c_date' file.
|
|
$(cs_subdir)%.c: $(c_dates_subdir)%.c_date
|
|
@:
|
|
|
|
$(c_dates_subdir)%.c_date: %.m
|
|
$(MCG) $(ALL_GRADEFLAGS) $(ALL_MCGFLAGS) $(*F) $(ERR_REDIRECT)
|
|
|
|
# Java back-end.
|
|
|
|
ifeq ($(MMAKE_USE_SUBDIRS),yes)
|
|
|
|
$(classes_subdir)%.class: $(javas_subdir)%.java
|
|
$(JAVAC) $(ALL_JAVACFLAGS) -d $(classes_subdir) $<
|
|
|
|
else
|
|
|
|
$(classes_subdir)%.class: $(javas_subdir)%.java
|
|
$(JAVAC) $(ALL_JAVACFLAGS) $<
|
|
|
|
endif
|
|
|
|
# When smart recompilation finds that a module does not need to be recompiled,
|
|
# it only touches the `.java_date' file.
|
|
$(javas_subdir)%.java: $(java_dates_subdir)%.java_date
|
|
@:
|
|
|
|
$(java_dates_subdir)%.java_date: %.m
|
|
$(MCG) $(ALL_GRADEFLAGS) $(ALL_MCGFLAGS) \
|
|
--java-only $(*F) $(ERR_REDIRECT)
|
|
|
|
# The `touch' is necessary. If it weren't there, and both the old and the
|
|
# new .err files are zero size, the timestamp would not get updated.
|
|
# The timestamp is updated by the write system call: if the new file
|
|
# is zero size, write is never called. `touch' has code to test specifically
|
|
# for this situation, and adds a byte to the file and then removes it.
|
|
|
|
%.err: %.m
|
|
$(MCE) $(ALL_GRADEFLAGS) $(ALL_MCFLAGS) $(*F) $(ERR_REDIRECT)
|
|
@touch $@
|
|
|
|
endif # MMAKE_USE_MMC_MAKE != yes
|
|
|
|
%.ugly: %.m
|
|
$(MC) --convert-to-mercury $(ALL_GRADEFLAGS) $(ALL_MCFLAGS) $(*F)
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
#
|
|
# Rules for compiling C files in the user's source directory.
|
|
#
|
|
# There is a near-identical of the rule for %.$O in ../Mmake.common.in
|
|
# (search for %.pseudo_o). Any changes to the rule here should be made
|
|
# there as well.
|
|
#
|
|
|
|
%.$O: %.c
|
|
$(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) -c $< $(OBJFILE_OPT)$@
|
|
|
|
%.pic_o: %.c
|
|
$(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) $(CFLAGS_FOR_PIC) \
|
|
-c $< $(OBJFILE_OPT)$@
|
|
|
|
%.s: %.c
|
|
$(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) -S $< -o $@
|
|
|
|
%.pic_s: %.c
|
|
$(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) $(CFLAGS_FOR_PIC) \
|
|
-S $< -o $@
|
|
|
|
%.i: %.c
|
|
$(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) -E $< > $@
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
#
|
|
# Rules for compiling C files in a subdirectory.
|
|
# Note that we need both these rules and the ones above,
|
|
# since even if the compiler generates all of its files in subdirectories,
|
|
# the user may have some C files of their own which need to be compiled.
|
|
#
|
|
|
|
ifneq ($(MMAKE_USE_MMC_MAKE),yes)
|
|
|
|
ifneq ("$(cs_subdir)","")
|
|
|
|
$(os_subdir)%.$O: $(cs_subdir)%.c
|
|
$(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) -c $< $(OBJFILE_OPT)$@
|
|
|
|
$(os_subdir)%.pic_o: $(cs_subdir)%.c
|
|
$(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) $(CFLAGS_FOR_PIC) \
|
|
-c $< -o $@
|
|
|
|
%.s: $(cs_subdir)%.c
|
|
$(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) -S $< -o $@
|
|
|
|
%.pic_s: $(cs_subdir)%.c
|
|
$(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) $(CFLAGS_FOR_PIC) \
|
|
-S $< -o $@
|
|
|
|
%.i: $(cs_subdir)%.c
|
|
$(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) -E $< > $@
|
|
|
|
endif # $(cs_subdir) != ""
|
|
|
|
endif # $(MMAKE_USE_MMC_MAKE) != yes
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
ifeq ($(MMAKE_USE_MMC_MAKE),yes)
|
|
|
|
# Always attempt to rebuild these files, even if they exist.
|
|
.PHONY: $(ALL_MC_BUILD_FILES) *.err
|
|
$(ALL_MC_BUILD_FILES):
|
|
$(MCM) $@
|
|
|
|
%.err:
|
|
$(MCM) $@
|
|
|
|
# If we don't know how to make the file, try using `mmc --make'.
|
|
.DEFAULT:
|
|
$(MCM) $@
|
|
|
|
clean_local:
|
|
$(MCM) $(MERCURY_MAIN_MODULES:%=%.clean)
|
|
|
|
realclean_local:
|
|
$(MCM) $(MERCURY_MAIN_MODULES:%=%.realclean)
|
|
|
|
endif # $(MMAKE_USE_MMC_MAKE) == yes
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
#
|
|
# Targets for cleaning up.
|
|
#
|
|
# Note that the actions for most of these targets are in the
|
|
# automatically generated `.d' files.
|
|
#
|
|
|
|
.PHONY: clean realclean clean_prof_files
|
|
|
|
clean_prof_files:
|
|
-rm -f Prof.CallPair Prof.Counts Prof.Decl Prof.MemWords Prof.MemCells
|
|
|
|
# The `clean' and `realclean' targets are implemented via `clean_local'
|
|
# and `realclean_local'. This allows a user to add rules in their
|
|
# Mmakefile to do a recursive mmake clean, for example, while still being
|
|
# able to use the local versions in their original form.
|
|
|
|
.PHONY: clean_local realclean_local
|
|
|
|
realclean: realclean_local
|
|
|
|
clean: clean_local
|
|
|
|
realclean_local: clean_local
|
|
|
|
clean_local: clean_prof_files
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
#
|
|
# Targets for building and installing libraries.
|
|
#
|
|
|
|
# Note: the `lib%.install_ints' rule is generated in each module's `.dep'
|
|
# file so it can be more easily customised based on the desired level of
|
|
# intermodule optimisation. Likewise the `lib%.install_grade_hdrs' is also
|
|
# generated in the `.dep' file, since it depends on the setting of
|
|
# the `--high-level-code' option.
|
|
|
|
.PHONY: lib%.install
|
|
lib%.install: lib%.install_ints lib%.install_hdrs lib%.install_library
|
|
$(MMAKE) lib$*.install_grades
|
|
|
|
.PHONY: lib%.install_grade_init
|
|
lib%.install_grade_init: %.init install_grade_dirs
|
|
$(INSTALL) `vpath_find $*.init` $(INSTALL_GRADE_MODULE_DIR)
|
|
|
|
.PHONY: lib%.install_library
|
|
lib%.install_library: lib%.$A lib%.$(EXT_FOR_SHARED_LIB) \
|
|
install_grade_dirs lib%.install_grade_hdrs \
|
|
lib%.install_opts lib%.install_grade_init
|
|
$(INSTALL) `vpath_find lib$*.$A lib$*.$(EXT_FOR_SHARED_LIB)` \
|
|
$(INSTALL_MERC_LIB_DIR)
|
|
$(RANLIB) $(RANLIBFLAGS) $(INSTALL_MERC_LIB_DIR)/lib$*.$A
|
|
|
|
# XXX grade_files only contains the files for the default grade, not the
|
|
# current grade in each iteration of the loop over ALL_LIBGRADES below.
|
|
lib%.install_grades:
|
|
rm -rf tmp_dir && \
|
|
mkdir tmp_dir && \
|
|
grade_files="$(foreach mve,$(GRADE_SUBDIR_MVEXTS),$($*.$(mve)))" && \
|
|
for file in x $$grade_files; do \
|
|
if test "$$file" != "x"; then \
|
|
mv -f $$file tmp_dir > /dev/null 2>&1; \
|
|
true; \
|
|
fi; \
|
|
done && \
|
|
{ mv -f $(deps_subdir)$*.dep $(deps_subdir)$*.dv \
|
|
*.a *.so tmp_dir || true; } && \
|
|
for grade in $(ALL_LIBGRADES); do \
|
|
if test "$$grade" != "$(GRADE)"; then \
|
|
$(MMAKE) GRADE=$$grade $*.depend || \
|
|
exit 1; \
|
|
$(MMAKE) GRADE=$$grade lib$*.install_library || \
|
|
exit 1; \
|
|
for file in x $$grade_files; do \
|
|
if test "$$file" != "x"; then \
|
|
rm -f $$file; \
|
|
fi; \
|
|
done; \
|
|
rm -f $(deps_subdir)$*.dep $(deps_subdir)$*.dv \
|
|
*.a *.so; \
|
|
fi; \
|
|
done && \
|
|
for file in x $$grade_files; do \
|
|
if test "$$file" != "x"; then \
|
|
mv -f tmp_dir/`basename $$file` $$file > /dev/null 2>&1; \
|
|
true; \
|
|
fi; \
|
|
done && \
|
|
{ mv -f tmp_dir/*.dep tmp_dir/*.dv $(deps_subdir).; \
|
|
mv -f tmp_dir/* .; rmdir tmp_dir; true; }
|
|
|
|
.PHONY: install_lib_dirs
|
|
install_lib_dirs:
|
|
-test -d $(INSTALL_INT_DIR) || $(INSTALL_MKDIR) $(INSTALL_INT_DIR)
|
|
-test -d $(INSTALL_INC_DIR) || $(INSTALL_MKDIR) $(INSTALL_INC_DIR)
|
|
-test -d $(INSTALL_MODULE_DIR) || \
|
|
$(INSTALL_MKDIR) $(INSTALL_MODULE_DIR)
|
|
# The following is needed to support the `--use-subdirs' option.
|
|
-test -d $(INSTALL_INT_DIR)/Mercury || \
|
|
$(INSTALL_MKDIR) $(INSTALL_INT_DIR)/Mercury
|
|
|
|
.PHONY: install_grade_dirs
|
|
install_grade_dirs: #install_lib_dirs
|
|
-test -d $(INSTALL_MERC_LIB_DIR) || \
|
|
$(INSTALL_MKDIR) $(INSTALL_MERC_LIB_DIR)
|
|
-test -d $(INSTALL_GRADE_INC_DIR) || \
|
|
$(INSTALL_MKDIR) $(INSTALL_GRADE_INC_DIR)
|
|
-test -d $(INSTALL_GRADE_INT_DIR) || \
|
|
$(INSTALL_MKDIR) $(INSTALL_GRADE_INT_DIR)
|
|
-test -d $(INSTALL_GRADE_MODULE_DIR) || \
|
|
$(INSTALL_MKDIR) $(INSTALL_GRADE_MODULE_DIR)
|
|
# The following is needed to support the `--use-subdirs' option.
|
|
-test -d $(INSTALL_GRADE_INC_DIR)/Mercury || \
|
|
$(INSTALL_MKDIR) $(INSTALL_GRADE_INC_DIR)/Mercury
|
|
-test -d $(INSTALL_GRADE_INT_DIR)/Mercury || \
|
|
$(INSTALL_MKDIR) $(INSTALL_GRADE_INT_DIR)/Mercury
|