3 $description = "Test GNU make's archive management features.";
6 This only works on systems that support it.";
8 # If this instance of make doesn't support archives, skip it
9 exists $FEATURES{archives} or return -1;
11 # Create some .o files to work with
12 utouch(-60, qw(a1.o a2.o a3.o));
15 run_make_test('all: libxx.a(a1.o)',
16 '', "ar rv libxx.a a1.o\nar: creating libxx.a\na - a1.o\n");
18 # Multiple .o's. Add a new one to the existing library
19 run_make_test('all: libxx.a(a1.o a2.o)',
20 '', "ar rv libxx.a a2.o\na - a2.o\n");
22 # Touch one of the .o's so it's rebuilt
24 run_make_test(undef, '', "ar rv libxx.a a1.o\nr - a1.o\n");
27 run_make_test('all: libxx.a(*.o)',
28 '', "#MAKE#: Nothing to be done for 'all'.\n");
30 # Touch one of the .o's so it's rebuilt
32 run_make_test(undef, '', "ar rv libxx.a a1.o\nr - a1.o\n");
34 # Use both wildcards and simple names
36 run_make_test('all: libxx.a(a3.o *.o)', '',
37 "ar rv libxx.a a3.o\na - a3.o\nar rv libxx.a a2.o\nr - a2.o\n");
39 # Check whitespace handling
41 run_make_test('all: libxx.a( a3.o *.o )', '',
42 "ar rv libxx.a a2.o\nr - a2.o\n");
44 rmfiles(qw(a1.o a2.o a3.o libxx.a));
46 # This tells the test driver that the perl test script executed properly.