-#!################################################################################
+#!#############################################################################
#! File: motif.t
#! Purpose: tmake template file from which src/motif/files.lst containing the
#! list of files for wxMotif library is generated by tmake
#! Author: Vadim Zeitlin
#! Created: 28.01.00
#! Version: $Id$
-#!################################################################################
+#!#############################################################################
#${
+ use lib './lib';
+ use wxFileList qw(:default make_arrays);
+
#! include the code which parses filelist.txt file and initializes
#! %wxCommon, %wxGeneric, %wxHtml, %wxUNIX, %wxMOTIF, %wxMOTIF and
#! %wxOS2PM hashes.
IncludeTemplate("filelist.t");
+ make_arrays( 'wxGeneric', 'wxCommon', 'wxMotif',
+ 'wxUnix', 'wxHtml',
+ 'wxWxInclude', 'wxMotifInclude', 'wxGenericInclude',
+ 'wxUnixInclude', 'wxHtmlInclude', 'wxProtocolInclude' );
+
#! find all our sources
- $project{"COMMONOBJS"} .= "parser.o ";
$project{"GUIOBJS"} .= "xmcombo.o ";
- foreach $file (sort keys %wxGeneric) {
- next if $wxGeneric{$file} =~ /\bNotX\b/;
-
- ($fileobj = $file) =~ s/cp?p?$/\o/;
-
- $project{"MOTIF_SOURCES"} .= "generic/" . $file . " ";
- $project{"GENERICOBJS"} .= $fileobj . " ";
- }
-
- foreach $file (sort keys %wxCommon) {
- next if $wxCommon{$file} =~ /\bNotX\b/;
-
- ($fileobj = $file) =~ s/cp?p?$/\o/;
-
- $project{"MOTIF_SOURCES"} .= "common/" . $file . " ";
- $project{"COMMONOBJS"} .= $fileobj . " ";
- }
-
- foreach $file (sort keys %wxMOTIF) {
- ($fileobj = $file) =~ s/cp?p?$/\o/;
+ my @generic = grep_not_fileflag 'NotX', @wxGeneric;
+ my @common = grep_not_fileflag 'NotX', @wxCommon;
+ my @motif = ( @wxMotif,
+ grep_source( grep_fileflag 'Motif', @wxALL ) );
- $project{"MOTIF_SOURCES"} .= "motif/" . $file . " ";
- $project{"GUIOBJS"} .= $fileobj . " ";
+ foreach my $file ( @generic ) {
+ $project{"GENERICOBJS"} .= $file->object_file . " ";
}
- foreach $file (sort keys %wxUNIX) {
- ($fileobj = $file) =~ s/cp?p?$/\o/;
-
- $project{"MOTIF_SOURCES"} .= "unix/" . $file . " ";
- $project{"UNIXOBJS"} .= $fileobj . " ";
+ foreach my $file ( @common ) {
+ $project{"COMMONOBJS"} .= $file->object_file . " ";
}
- foreach $file (sort keys %wxHTML) {
- ($fileobj = $file) =~ s/cp?p?$/\o/;
-
- $project{"MOTIF_SOURCES"} .= "html/" . $file . " ";
- $project{"HTMLOBJS"} .= $fileobj . " ";
+ foreach my $file ( @motif ) {
+ $project{"GUIOBJS"} .= $file->object_file . " ";
}
- #! find all our headers
- foreach $file (sort keys %wxWXINCLUDE) {
- next if $wxWXINCLUDE{$file} =~ /\bNotX\b/;
- $project{"MOTIF_HEADERS"} .= $file . " "
+ foreach my $file ( @wxUnix ) {
+ $project{"UNIXOBJS"} .= $file->object_file . " ";
}
- foreach $file (sort keys %wxMOTIFINCLUDE) {
- $project{"MOTIF_HEADERS"} .= "motif/" . $file . " "
+ foreach my $file ( @wxHtml ) {
+ $project{"HTMLOBJS"} .= $file->object_file . " ";
}
- foreach $file (sort keys %wxGENERICINCLUDE) {
- $project{"MOTIF_HEADERS"} .= "generic/" . $file . " "
+ foreach my $file ( @generic, @common, @motif,
+ @wxUnix, @wxHtml ) {
+ $project{"MOTIF_SOURCES"} .= $file->source_file . " ";
}
- foreach $file (sort keys %wxUNIXINCLUDE) {
- $project{"MOTIF_HEADERS"} .= "unix/" . $file . " "
- }
-
- foreach $file (sort keys %wxHTMLINCLUDE) {
- $project{"MOTIF_HEADERS"} .= "html/" . $file . " "
- }
-
- foreach $file (sort keys %wxPROTOCOLINCLUDE) {
- $project{"MOTIF_HEADERS"} .= "protocol/" . $file . " "
+ #! find all our headers
+ foreach my $file ( grep_not_fileflag( 'NotX', @wxWxInclude ),
+ @wxMotifInclude, @wxGenericInclude, @wxUnixInclude,
+ @wxHtmlInclude, @wxProtocolInclude,
+ grep_header( grep_fileflag( 'Motif', @wxALL ) ) ) {
+ $project{MOTIF_HEADERS} .= $file->source_file . " ";
}
#$}
# This file was automatically generated by tmake