summaryrefslogtreecommitdiffstats
path: root/bin/createpackage.pl
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-02-19 12:52:51 (GMT)
committeraxis <qt-info@nokia.com>2010-02-19 12:52:51 (GMT)
commit78ef8aadd693151b309dea320dc693707880331d (patch)
tree2e904a1ec84d823ffa286ab0dac45dd1a8bf83ef /bin/createpackage.pl
parenteab8943eee4ae2c373cd3e0c02ee3210c3567d3a (diff)
downloadQt-78ef8aadd693151b309dea320dc693707880331d.zip
Qt-78ef8aadd693151b309dea320dc693707880331d.tar.gz
Qt-78ef8aadd693151b309dea320dc693707880331d.tar.bz2
Changed check for platform and target to depend on macro existence.
This change was done in order to support build systems that do not use platform and target in the pkg file.
Diffstat (limited to 'bin/createpackage.pl')
-rwxr-xr-xbin/createpackage.pl16
1 files changed, 8 insertions, 8 deletions
diff --git a/bin/createpackage.pl b/bin/createpackage.pl
index dc8f3ef..e4c714e 100755
--- a/bin/createpackage.pl
+++ b/bin/createpackage.pl
@@ -171,14 +171,6 @@ unless (length($templatepkg)) {
Usage();
}
-# If the pkg file is not actually a template, there is no need for plaform or target.
-if ($templatepkg =~ m/_template\.pkg/i) {
- unless (length($platform) && length($target)) {
- print "\nError: Platform or target is not defined!\n";
- Usage();
- }
-}
-
# Check template exist
stat($templatepkg);
unless( -e _ ) {
@@ -246,6 +238,14 @@ open( TEMPLATE, $templatepkg) or die "Error '$templatepkg': $!\n";
$_=<TEMPLATE>;
close (TEMPLATE);
+# If the pkg file does not contain macros, there is no need for platform or target.
+if (m/\$\(PLATFORM\)/) {
+ unless (length($platform) && length($target)) {
+ print "\nError: Platform or target is not defined!\n";
+ Usage();
+ }
+}
+
# replace the PKG variables
s/\$\(PLATFORM\)/$platform/gm;
s/\$\(TARGET\)/$target/gm;