summaryrefslogtreecommitdiff
path: root/tools/build/v2/test/test_nt_line_length.jam
blob: bc003964e30e3b90e58dd952c7bc523089ce3e38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Copyright 2001 Dave Abrahams 
# Distributed under the Boost Software License, Version 1.0. 
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) 

# Test that the patch which allows long command-lines in actions on NT is
# working. For reasons of backward-compatibility, this patch requires that the
# action fits on a single command-line, and that the JAMSHELL variable on the
# target being built is set to "%".
if $(NT)
{
    #
    # Build a really long commandline. (> 10K characters).
    #
    ten = 0 1 2 3 4 5 6 7 8 9 ;
    1x7chars = 0_____ ;
    # add a digit and multiply by 10
    10x8chars = $(ten)$(1x7chars) ;
    # add a digit to each of 10 strings and multiply by 10
    100x9chars = $(ten)$(10x8chars) ;
    # add a digit to each of 100 strings and multiply by 10
    1000x10chars = $(ten)$(100x9chars) ;

    #
    # Cause line_length_test to be built
    #
    actions do_echo
    {
        echo $(text)
    }

    400x10chars = $(ten[1-4])$(100x9chars) ;

    text on line_length_test = $(400x10chars) 40$(10x8chars[1-9]) 01234 ;
    text on line_length_test = $(1000x10chars) $(1000x10chars) ;
    JAMSHELL on line_length_test = % ;
    DEPENDS all : line_length_test ;

    do_echo line_length_test ;
}