diff options
author | Björn Gustavsson <[email protected]> | 2011-09-19 15:11:16 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2011-09-19 15:11:16 +0200 |
commit | 70fa7fabed2fb4f47155f02a1c8fa4054a546739 (patch) | |
tree | 7d755f622e3568f78fad2da4409725d3a13f11b8 /lib | |
parent | bdc4bab74e7ea605d38f1d0b7dca4b92ec4c7f1d (diff) | |
parent | 692772c8e238d66eb054faba5dd0fba4bacf3a2f (diff) | |
download | otp-70fa7fabed2fb4f47155f02a1c8fa4054a546739.tar.gz otp-70fa7fabed2fb4f47155f02a1c8fa4054a546739.tar.bz2 otp-70fa7fabed2fb4f47155f02a1c8fa4054a546739.zip |
Merge branch 'dev' into major
* dev:
tar_SUITE: Work around limited pathname length on Windows
Merge the fourth bootstrap stage into the third bootstrap stage
Remove unused lib/orber/include/Makefile
Remove lib/orber/include/* from the primary bootstrap
otp_build update_primary: Don't commit generated source files
primary bootstrap: Remove source files
Conflicts:
Makefile.in
bootstrap/bin/start.script
bootstrap/bin/start_clean.script
bootstrap/lib/compiler/ebin/compiler.app
bootstrap/lib/compiler/egen/beam_opcodes.erl
bootstrap/lib/compiler/egen/core_parse.erl
bootstrap/lib/kernel/ebin/kernel.app
bootstrap/lib/kernel/ebin/kernel.appup
bootstrap/lib/orber/include/Makefile
bootstrap/lib/orber/include/corba.hrl
bootstrap/lib/orber/include/orber_pi.hrl
bootstrap/lib/stdlib/ebin/stdlib.app
bootstrap/lib/stdlib/ebin/stdlib.appup
bootstrap/lib/stdlib/egen/erl_parse.erl
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile | 12 | ||||
-rw-r--r-- | lib/orber/include/Makefile | 66 | ||||
-rw-r--r-- | lib/stdlib/test/tar_SUITE.erl | 60 |
3 files changed, 51 insertions, 87 deletions
diff --git a/lib/Makefile b/lib/Makefile index c443425f8b..7e52d6e32e 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -70,19 +70,15 @@ endif ifdef BOOTSTRAP SUB_DIRECTORIES = \ - kernel stdlib compiler orber/include + kernel stdlib compiler else ifdef SECONDARY_BOOTSTRAP SUB_DIRECTORIES = hipe parsetools asn1/src else ifdef TERTIARY_BOOTSTRAP - SUB_DIRECTORIES = snmp - else - ifdef FOURTH_BOOTSTRAP - SUB_DIRECTORIES = sasl jinterface ic syntax_tools - else # Not bootstrap build - SUB_DIRECTORIES = $(ERTS_SUB_DIRECTORIES) $(OTHER_SUB_DIRECTORIES) - endif + SUB_DIRECTORIES = snmp sasl jinterface ic syntax_tools + else # Not bootstrap build + SUB_DIRECTORIES = $(ERTS_SUB_DIRECTORIES) $(OTHER_SUB_DIRECTORIES) endif endif endif diff --git a/lib/orber/include/Makefile b/lib/orber/include/Makefile deleted file mode 100644 index 219b7085e6..0000000000 --- a/lib/orber/include/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# -# %CopyrightBegin% -# -# Copyright Ericsson AB 1998-2009. All Rights Reserved. -# -# The contents of this file are subject to the Erlang Public License, -# Version 1.1, (the "License"); you may not use this file except in -# compliance with the License. You should have received a copy of the -# Erlang Public License along with this software. If not, it can be -# retrieved online at http://www.erlang.org/. -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. -# -# %CopyrightEnd% -# -# -include $(ERL_TOP)/make/target.mk - -include $(ERL_TOP)/make/$(TARGET)/otp.mk - -# ---------------------------------------------------- -# Application version -# ---------------------------------------------------- -include ../vsn.mk -VSN=$(ORBER_VSN) - -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/orber-$(VSN) - -# ---------------------------------------------------- -# Target Specs -# ---------------------------------------------------- - -EXTERNAL_HRL_FILES= ../include/corba.hrl \ - ../include/ifr_types.hrl \ - ../include/orber_pi.hrl - -# ---------------------------------------------------- -# FLAGS -# ---------------------------------------------------- - -# ---------------------------------------------------- -# Targets -# ---------------------------------------------------- -debug opt clean docs: - - -# ---------------------------------------------------- -# Release Target -# ---------------------------------------------------- -include $(ERL_TOP)/make/otp_release_targets.mk - - -release_spec: opt - $(INSTALL_DIR) $(RELSYSDIR)/include - $(INSTALL_DATA) $(EXTERNAL_HRL_FILES) $(RELSYSDIR)/include - - -release_docs_spec: - - diff --git a/lib/stdlib/test/tar_SUITE.erl b/lib/stdlib/test/tar_SUITE.erl index 48f58cd05d..9ad3936928 100644 --- a/lib/stdlib/test/tar_SUITE.erl +++ b/lib/stdlib/test/tar_SUITE.erl @@ -283,17 +283,16 @@ long_names(doc) -> long_names(Config) when is_list(Config) -> ?line DataDir = ?config(data_dir, Config), ?line Long = filename:join(DataDir, "long_names.tar"), + run_in_short_tempdir(Config, + fun() -> do_long_names(Long) end). +do_long_names(Long) -> %% Try table/2 and extract/2. ?line case erl_tar:table(Long, [verbose]) of {ok,List} when is_list(List) -> ?line io:format("~p\n", [List]) end, - - %% To avoid getting too long paths for Windows to handle, extract into - %% the current directory (which is the test_server directory). Its path - %% is quite a bit shorter than the path to priv_dir. ?line {ok,Cwd} = file:get_cwd(), ?line ok = erl_tar:extract(Long), ?line Base = filename:join([Cwd, "original_software", "written_by", @@ -312,17 +311,16 @@ long_names(Config) when is_list(Config) -> ?line "Here"++_ = binary_to_list(First), ?line "And"++_ = binary_to_list(Second), - %% Clean up. - ?line delete_files([filename:join(Cwd, "original_software"),EmptyDir]), - ok. create_long_names(doc) -> ["Creates a tar file from a deep directory structure (filenames are ", "longer than 100 characters)."]; create_long_names(Config) when is_list(Config) -> - ?line PrivDir = ?config(priv_dir, Config), - ?line ok = file:set_cwd(PrivDir), + run_in_short_tempdir(Config, fun create_long_names/0). + +create_long_names() -> + ?line {ok,Dir} = file:get_cwd(), Dirs = ["aslfjkshjkhliuf", "asdhjfehnbfsky", "sahajfskdfhsz", @@ -334,7 +332,7 @@ create_long_names(Config) when is_list(Config) -> ?line AFile = filename:join(DeepDir, "a_file"), ?line Hello = "hello, world\n", ?line ok = file:write_file(AFile, Hello), - ?line TarName = filename:join(PrivDir, "my_tar_with_long_names.tar"), + ?line TarName = filename:join(Dir, "my_tar_with_long_names.tar"), ?line ok = erl_tar:create(TarName, [AFile]), %% Print contents. @@ -347,9 +345,6 @@ create_long_names(Config) when is_list(Config) -> ?line {ok, Bin} = file:read_file(filename:join(ExtractDir, AFile)), ?line Hello = binary_to_list(Bin), - %% Clean up. - ?line delete_files([ExtractDir,TarName,hd(Dirs)]), - ok. make_dirs([Dir|Rest], []) -> @@ -734,3 +729,42 @@ delete_files([Item|Rest]) -> end, delete_files(Rest). +%% Move to a temporary directory with as short name as possible and +%% execute Fun. Remove the directory and any files in it afterwards. +%% This is necessary because pathnames on Windows may be limited to +%% 260 characters. +run_in_short_tempdir(Config, Fun) -> + {ok,Cwd} = file:get_cwd(), + PrivDir0 = ?config(priv_dir, Config), + + %% Normalize name to make sure that there is no slash at the end. + PrivDir = filename:absname(PrivDir0), + + %% We need a base directory with a much shorter pathname than + %% priv_dir. We KNOW that priv_dir is located four levels below + %% the directory that common_test puts the ct_run.* directories + %% in. That fact is not documented, but an usually reliable source + %% assured me that the directory structure is unlikely to change + %% in future versions of common_test because of backward + %% compatibility (tools developed by users of common_test depend + %% on the current directory layout). + Base = lists:foldl(fun(_, D) -> + filename:dirname(D) + end, PrivDir, [1,2,3,4]), + + Dir = make_temp_dir(Base, 0), + ok = file:set_cwd(Dir), + io:format("Running test in ~s\n", [Dir]), + try + Fun() + after + file:set_cwd(Cwd), + delete_files([Dir]) + end. + +make_temp_dir(Base, I) -> + Name = filename:join(Base, integer_to_list(I, 36)), + case file:make_dir(Name) of + ok -> Name; + {error,eexist} -> make_temp_dir(Base, I+1) + end. |