Subversion Repositories DevTools

Rev

Rev 369 | Rev 5672 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 369 Rev 381
Line 163... Line 163...
163
    Message    "         Incdir : $_";
163
    Message    "         Incdir : $_";
164
}
164
}
165
 
165
 
166
Message    "======================================================================";
166
Message    "======================================================================";
167
 
167
 
-
 
168
#
-
 
169
#   Convert the list of source files into object files
-
 
170
#   Needed for cleaning
-
 
171
#
-
 
172
my @obj_files = map { $_ =~ s~\.\w+$~.o~; $_ } @opt_source;
168
 
173
 
169
#
174
#
170
#   Clean any existing build artifacts
175
#   Clean any existing build artifacts
171
#   The build optiosn to place things in a different diractory are broken.
176
#   The build options to place things in a different diractory are broken.
172
#   We must be able to build for multiple targets without confusion so we
177
#   We must be able to build for multiple targets without confusion so we
173
#   clean, then build, then copy out the bits we need.
178
#   clean, then build, then copy out the bits we need.
174
clean();
179
clean();
175
 
180
 
176
#
181
#
Line 228... Line 233...
228
    #
233
    #
229
    #   Create variables for the data that will be substituted
234
    #   Create variables for the data that will be substituted
230
    #
235
    #
231
    my $driver_line = "obj-m	:= $opt_driver.o";
236
    my $driver_line = "obj-m	:= $opt_driver.o";
232
 
237
 
233
    #
-
 
234
    #   Convert the list of source files into object files
-
 
235
    #
-
 
236
    my @obj_files = map { $_ =~ s~\..*$~.o~; $_ } @opt_source;
-
 
237
    my $file_list = "${opt_driver}-objs := @obj_files";
238
    my $file_list = "${opt_driver}-objs := @obj_files";
238
    my $debug_line = "DEBUG = y";
239
    my $debug_line = "DEBUG = y";
239
       $debug_line = "# " . $debug_line unless ( $opt_type eq 'D' );
240
       $debug_line = "# " . $debug_line unless ( $opt_type eq 'D' );
240
 
241
 
241
 
242
 
Line 299... Line 300...
299
 
300
 
300
#-------------------------------------------------------------------------------
301
#-------------------------------------------------------------------------------
301
# Function        : clean
302
# Function        : clean
302
#
303
#
303
# Description     : Clean up build artifacts
304
# Description     : Clean up build artifacts
304
#                   That was done in a makefile, buts its quicker todo it
305
#                   Need to remove stuff that we build as the the kernel builder
305
#                   internally
306
#                   doesn't handle multiple platforms
306
#
307
#
307
# Inputs          :
308
# Inputs          : Globals: @obj_files
308
#
309
#
309
# Returns         :
310
# Returns         : Nothing
310
#
311
#
311
sub clean
312
sub clean
312
{
313
{
313
    foreach my $files (qw (*.o *~ core .depend .*.cmd *.ko *.mod.c Kbuild ))
314
    foreach my $files (qw (*.o *~ core .depend .*.cmd *.ko *.mod.c Kbuild ), @obj_files )
314
    {
315
    {
315
        unlink ( glob ( $files ));
316
        unlink ( glob ( $files ));
316
    }
317
    }
317
    rmtree  ( '.tmp_versions' );
318
    rmtree  ( '.tmp_versions' );
318
}
319
}