FreeCalypso > hg > tcs211-l1-reconst
comparison g23m/system/busyb/tools/tune_mak_buildconfig.pl @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 #!perl -w | |
2 #----------------------------------------------------------------------------- | |
3 # Project : | |
4 # Modul : tune_make_buildconfig.pl | |
5 #----------------------------------------------------------------------------- | |
6 # Copyright 2003 Texas Instruments Deutschland GmbH | |
7 # All rights reserved. | |
8 # | |
9 # This file is confidential and a trade secret of Texas | |
10 # Instruments Deutschland GmbH | |
11 # The receipt of or possession of this file does not convey | |
12 # any rights to reproduce or disclose its contents or to | |
13 # manufacture, use, or sell anything it may describe, in | |
14 # whole, or in part, without the specific written consent of | |
15 # Texas Instruments Deutschland GmbH. | |
16 #----------------------------------------------------------------------------- | |
17 # Purpose : Dumps the build config in the generated BuSyB makefile | |
18 #----------------------------------------------------------------------------- | |
19 use strict; | |
20 | |
21 (@ARGV == 3) | |
22 or die "Usage: tune_mak_buildconfig <makefile-in> <makefile-out> <buildconfig_file>"; | |
23 | |
24 open (IN, $ARGV[0]) | |
25 or die "ERROR: could not open file \"" . $ARGV[0] . "\" for reading ($!),"; | |
26 | |
27 open (OUT, ">$ARGV[1]") | |
28 or die "ERROR: could not open file \"" . $ARGV[1] . "\" for writing ($!),"; | |
29 | |
30 open (XMLFILE, $ARGV[2]) | |
31 or die "ERROR: could not open file \"" . $ARGV[2] . "\" for reading ($!),"; | |
32 | |
33 while (<IN>) | |
34 { | |
35 if (/^#### contents of the XML configset file \(DO NOT CHANGE THIS TEXT!\) ####$/) | |
36 { | |
37 print OUT "#Filename: " . $ARGV[2] . "\n"; | |
38 while (<XMLFILE>) | |
39 { | |
40 print OUT "#" . $_; | |
41 } | |
42 } | |
43 else | |
44 { | |
45 print OUT $_; | |
46 } | |
47 } | |
48 | |
49 close IN; | |
50 close OUT; | |
51 close XMLFILE; |