summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/data
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-01-02 18:55:14 -0200
committerThiago Macieira <thiago.macieira@intel.com>2016-01-11 05:20:20 +0000
commit29f41e5e3858c7fdb51909eb7cc9a0bb440600ff (patch)
tree00c303b1f27dbb682f2a930058c82d9e8743b434 /mkspecs/features/data
parent15b65e7a5f6f5ca962a6688116641502ff41ae00 (diff)
Change the ELF linker version script creator to take no parameters
It only needs stdin now, instead of stdin plus a separate file containing a list of file names. Change-Id: I9f3db030001e47e4a4e5ffff1425b76884cc7ca0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'mkspecs/features/data')
-rw-r--r--mkspecs/features/data/unix/findclasslist.pl42
1 files changed, 14 insertions, 28 deletions
diff --git a/mkspecs/features/data/unix/findclasslist.pl b/mkspecs/features/data/unix/findclasslist.pl
index ac010ae0a7..adec22d58d 100644
--- a/mkspecs/features/data/unix/findclasslist.pl
+++ b/mkspecs/features/data/unix/findclasslist.pl
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
#############################################################################
##
-## Copyright (C) 2015 Intel Corporation
+## Copyright (C) 2016 Intel Corporation
## Contact: http://www.qt.io/licensing/
##
## This file is part of the build configuration tools of the Qt Toolkit.
@@ -33,40 +33,26 @@
#############################################################################
use strict;
-my $syntax = "findclasslist.pl <file (containing private header list)>\n" .
- "Replaces \@CLASSLIST\@ with the classes found in the header files\n";
-
-die("Expected exactly one argument") if (@ARGV != 1);
-
-my @headers = ();
-
-# Expand contents of the command-line arguments file
-open ARGFILE, "<$ARGV[0]" or die("Could not open arguments file $ARGV[0]: $!");
-while (my $line = <ARGFILE>) {
- chomp($line);
- push @headers, $line;
-}
-close ARGFILE;
+my $syntax = "findclasslist.pl\n" .
+ "Replaces each \@FILE:filename\@ in stdin with the classes found in that file\n";
$\ = $/;
while (<STDIN>) {
chomp;
- unless (/\@CLASSLIST\@/) {
+ unless (/\@FILE:(.*)\@/) {
print;
next;
}
- # Replace @CLASSLIST@ with the class list
- for my $header (@headers) {
- open HDR, "<$header" or die("Could not open header $header: $!");
- my $comment = " /* $header */";
- while (my $line = <HDR>) {
- # Match a struct or class declaration, but not a forward declaration
- $line =~ /^(?:struct|class) (?:Q_.*_EXPORT)? (\w+)(?!;)/ or next;
- print $comment if $comment;
- printf " *%d%s*;\n", length $1, $1;
- $comment = 0;
- }
- close HDR;
+ # Replace this line with the class list
+ open HDR, "<$1" or die("Could not open header $1: $!");
+ my $comment = " /* $1 */";
+ while (my $line = <HDR>) {
+ # Match a struct or class declaration, but not a forward declaration
+ $line =~ /^(?:struct|class) (?:Q_.*_EXPORT)? (\w+)(?!;)/ or next;
+ print $comment if $comment;
+ printf " *%d%s*;\n", length $1, $1;
+ $comment = 0;
}
+ close HDR;
}