aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hipe')
-rw-r--r--lib/hipe/Makefile21
-rw-r--r--lib/hipe/amd64/Makefile3
-rw-r--r--lib/hipe/arm/Makefile3
-rw-r--r--lib/hipe/boot_ebin/.gitignore0
-rw-r--r--lib/hipe/cerl/Makefile3
-rw-r--r--lib/hipe/cerl/erl_types.erl11
-rw-r--r--lib/hipe/doc/Makefile3
-rw-r--r--lib/hipe/doc/src/Makefile3
-rw-r--r--lib/hipe/flow/Makefile3
-rw-r--r--lib/hipe/icode/Makefile3
-rw-r--r--lib/hipe/main/Makefile3
-rw-r--r--lib/hipe/native.mk4
-rw-r--r--lib/hipe/opt/Makefile3
-rw-r--r--lib/hipe/ppc/Makefile3
-rw-r--r--lib/hipe/regalloc/Makefile3
-rw-r--r--lib/hipe/rtl/Makefile3
-rw-r--r--lib/hipe/sparc/Makefile3
-rw-r--r--lib/hipe/util/Makefile3
-rw-r--r--lib/hipe/x86/Makefile3
19 files changed, 68 insertions, 13 deletions
diff --git a/lib/hipe/Makefile b/lib/hipe/Makefile
index 6682c9aac0..f2be75f0dd 100644
--- a/lib/hipe/Makefile
+++ b/lib/hipe/Makefile
@@ -37,8 +37,13 @@ else
SUB_DIRECTORIES = $(ALWAYS_SUBDIRS)
endif
+
include native.mk
+ifndef EBIN
+EBIN = ../ebin
+endif
+
#
# Default Subdir Targets
#
@@ -52,12 +57,20 @@ edocs:
fi
all-subdirs:
- -for dir in $(SUB_DIRECTORIES); do \
- (cd $$dir; $(MAKE) $(MAKETARGET) EBIN=../ebin; cd ..); \
+ for dir in $(SUB_DIRECTORIES); do \
+ (cd $$dir; $(MAKE) $(MAKETARGET) EBIN=$(EBIN); cd ..); \
+ done
+
+# distclean and realclean should clean the bootstrap files
+all-subdirs-x:
+ for dir in $(SUB_DIRECTORIES); do \
+ (cd $$dir; $(MAKE) $(MAKETARGET) EBIN=../boot_ebin; cd ..); \
done
+clean:
+ $(MAKE) MAKETARGET="clean" all-subdirs all-subdirs-x
distclean:
- $(MAKE) MAKETARGET="distclean" all-subdirs
+ $(MAKE) MAKETARGET="distclean" all-subdirs all-subdirs-x
realclean:
- $(MAKE) MAKETARGET="realclean" all-subdirs
+ $(MAKE) MAKETARGET="realclean" all-subdirs all-subdirs-x
diff --git a/lib/hipe/amd64/Makefile b/lib/hipe/amd64/Makefile
index 58377e5349..397cc0539e 100644
--- a/lib/hipe/amd64/Makefile
+++ b/lib/hipe/amd64/Makefile
@@ -89,6 +89,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/arm/Makefile b/lib/hipe/arm/Makefile
index 3f60cd77cc..6187b7e925 100644
--- a/lib/hipe/arm/Makefile
+++ b/lib/hipe/arm/Makefile
@@ -90,6 +90,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/boot_ebin/.gitignore b/lib/hipe/boot_ebin/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/hipe/boot_ebin/.gitignore
diff --git a/lib/hipe/cerl/Makefile b/lib/hipe/cerl/Makefile
index 7fcc44d27d..d0a0ea1f59 100644
--- a/lib/hipe/cerl/Makefile
+++ b/lib/hipe/cerl/Makefile
@@ -82,6 +82,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl
index 620fed365e..65b9a057de 100644
--- a/lib/hipe/cerl/erl_types.erl
+++ b/lib/hipe/cerl/erl_types.erl
@@ -424,12 +424,7 @@ t_has_opaque_subtype(T) ->
-spec t_opaque_structure(erl_type()) -> erl_type().
t_opaque_structure(?opaque(Elements)) ->
- case ordsets:size(Elements) of
- 1 ->
- [#opaque{struct = Struct}] = ordsets:to_list(Elements),
- Struct;
- _ -> throw({error, "Unexpected multiple opaque types"})
- end.
+ t_sup([Struct || #opaque{struct = Struct} <- ordsets:to_list(Elements)]).
-spec t_opaque_module(erl_type()) -> module().
@@ -688,9 +683,9 @@ t_solve_remote(?opaque(Set), ET, R, C) ->
{NewList, RR} = opaques_solve_remote(List, ET, R, C),
{?opaque(ordsets:from_list(NewList)), RR};
t_solve_remote(?tuple(?any, _, _) = T, _ET, _R, _C) -> {T, []};
-t_solve_remote(?tuple(Types, Arity, Tag), ET, R, C) ->
+t_solve_remote(?tuple(Types, _Arity, _Tag), ET, R, C) ->
{RL, RR} = list_solve_remote(Types, ET, R, C),
- {?tuple(RL, Arity, Tag), RR};
+ {t_tuple(RL), RR};
t_solve_remote(?tuple_set(Set), ET, R, C) ->
{NewSet, RR} = tuples_solve_remote(Set, ET, R, C),
{?tuple_set(NewSet), RR};
diff --git a/lib/hipe/doc/Makefile b/lib/hipe/doc/Makefile
index cdf9c9c798..e28b16c12e 100644
--- a/lib/hipe/doc/Makefile
+++ b/lib/hipe/doc/Makefile
@@ -24,6 +24,9 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
clean:
-rm -f *.html edoc-info stylesheet.css erlang.png
+distclean: clean
+realclean: clean
+
# ----------------------------------------------------
# Special Build Targets
# ----------------------------------------------------
diff --git a/lib/hipe/doc/src/Makefile b/lib/hipe/doc/src/Makefile
index d440178e4c..065854e8a7 100644
--- a/lib/hipe/doc/src/Makefile
+++ b/lib/hipe/doc/src/Makefile
@@ -97,6 +97,9 @@ clean clean_docs:
rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
rm -f errs core *~
+distclean: clean
+realclean: clean
+
# ----------------------------------------------------
# Release Target
# ----------------------------------------------------
diff --git a/lib/hipe/flow/Makefile b/lib/hipe/flow/Makefile
index bbe8ef8666..e8d570ac48 100644
--- a/lib/hipe/flow/Makefile
+++ b/lib/hipe/flow/Makefile
@@ -82,6 +82,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/icode/Makefile b/lib/hipe/icode/Makefile
index bd6436c8b3..e57daecfbc 100644
--- a/lib/hipe/icode/Makefile
+++ b/lib/hipe/icode/Makefile
@@ -100,6 +100,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/main/Makefile b/lib/hipe/main/Makefile
index a14c9c3ca4..d49dd6f424 100644
--- a/lib/hipe/main/Makefile
+++ b/lib/hipe/main/Makefile
@@ -93,6 +93,9 @@ clean:
rm -f $(TARGET_FILES) $(DOC_FILES) $(HRL_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/native.mk b/lib/hipe/native.mk
index 6f4602477b..738e78e556 100644
--- a/lib/hipe/native.mk
+++ b/lib/hipe/native.mk
@@ -1,5 +1,7 @@
-ifndef SECONDARY_BOOTSTRAP
ifeq ($(NATIVE_LIBS_ENABLED),yes)
+ifndef SECONDARY_BOOTSTRAP
ERL_COMPILE_FLAGS += +native
+else
+EBIN = ../boot_ebin
endif
endif
diff --git a/lib/hipe/opt/Makefile b/lib/hipe/opt/Makefile
index 4596201801..8e244ab360 100644
--- a/lib/hipe/opt/Makefile
+++ b/lib/hipe/opt/Makefile
@@ -80,6 +80,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/ppc/Makefile b/lib/hipe/ppc/Makefile
index f24139e34b..83376e8d9d 100644
--- a/lib/hipe/ppc/Makefile
+++ b/lib/hipe/ppc/Makefile
@@ -92,6 +92,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/regalloc/Makefile b/lib/hipe/regalloc/Makefile
index 386f3589c6..c327b443b0 100644
--- a/lib/hipe/regalloc/Makefile
+++ b/lib/hipe/regalloc/Makefile
@@ -94,6 +94,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/rtl/Makefile b/lib/hipe/rtl/Makefile
index 48086ec79f..30026831b7 100644
--- a/lib/hipe/rtl/Makefile
+++ b/lib/hipe/rtl/Makefile
@@ -89,6 +89,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core erl_crash.dump
+distclean: clean
+realclean: clean
+
# ----------------------------------------------------
# Special Build Targets
# ----------------------------------------------------
diff --git a/lib/hipe/sparc/Makefile b/lib/hipe/sparc/Makefile
index f25212a89b..e3acecdcb8 100644
--- a/lib/hipe/sparc/Makefile
+++ b/lib/hipe/sparc/Makefile
@@ -92,6 +92,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/util/Makefile b/lib/hipe/util/Makefile
index 85719ec3d6..7d1a7c01c7 100644
--- a/lib/hipe/util/Makefile
+++ b/lib/hipe/util/Makefile
@@ -85,6 +85,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/x86/Makefile b/lib/hipe/x86/Makefile
index d7d0c7bf5a..aed757246f 100644
--- a/lib/hipe/x86/Makefile
+++ b/lib/hipe/x86/Makefile
@@ -100,6 +100,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop