-#!################################################################################
+#!#############################################################################
#! 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{"COMMONDEPS"} .= "parser.d ";
$project{"GUIOBJS"} .= "xmcombo.o ";
- foreach $file (sort keys %wxGeneric) {
- next if $wxGeneric{$file} =~ /\bX\b/;
-
- ($fileobj = $file) =~ s/cp?p?$/\o/;
- ($filedep = $file) =~ s/cp?p?$/\d/;
-
- $project{"MOTIF_SOURCES"} .= "generic/" . $file . " ";
- $project{"GENERICOBJS"} .= $fileobj . " ";
- $project{"GENERICDEPS"} .= $filedep . " "
- }
-
- foreach $file (sort keys %wxCommon) {
- next if $wxCommon{$file} =~ /\bX\b/;
-
- ($fileobj = $file) =~ s/cp?p?$/\o/;
- ($filedep = $file) =~ s/cp?p?$/\d/;
-
- $project{"MOTIF_SOURCES"} .= "common/" . $file . " ";
- $project{"COMMONOBJS"} .= $fileobj . " ";
- $project{"COMMONDEPS"} .= $filedep . " "
- }
-
- foreach $file (sort keys %wxMOTIF) {
- ($fileobj = $file) =~ s/cp?p?$/\o/;
- ($filedep = $file) =~ s/cp?p?$/\d/;
-
- $project{"MOTIF_SOURCES"} .= "motif/" . $file . " ";
- $project{"GUIOBJS"} .= $fileobj . " ";
- $project{"GUIDEPS"} .= $filedep . " "
- }
-
- foreach $file (sort keys %wxUNIX) {
- ($fileobj = $file) =~ s/cp?p?$/\o/;
- ($filedep = $file) =~ s/cp?p?$/\d/;
-
- $project{"MOTIF_SOURCES"} .= "unix/" . $file . " ";
- $project{"UNIXOBJS"} .= $fileobj . " ";
- $project{"UNIXDEPS"} .= $filedep . " "
- }
-
- foreach $file (sort keys %wxHTML) {
- ($fileobj = $file) =~ s/cp?p?$/\o/;
- ($filedep = $file) =~ s/cp?p?$/\d/;
+ 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"} .= "html/" . $file . " ";
- $project{"HTMLOBJS"} .= $fileobj . " ";
- $project{"HTMLDEPS"} .= $filedep . " "
+ foreach my $file ( @generic ) {
+ $project{"GENERICOBJS"} .= $file->object_file . " ";
}
- #! find all our headers
- foreach $file (sort keys %wxWXINCLUDE) {
- next if $wxWXINCLUDE{$file} =~ /\bX\b/;
- $project{"MOTIF_HEADERS"} .= $file . " "
+ foreach my $file ( @common ) {
+ $project{"COMMONOBJS"} .= $file->object_file . " ";
}
- foreach $file (sort keys %wxMOTIFINCLUDE) {
- $project{"MOTIF_HEADERS"} .= "motif/" . $file . " "
+ foreach my $file ( @motif ) {
+ $project{"GUIOBJS"} .= $file->object_file . " ";
}
- foreach $file (sort keys %wxGENERICINCLUDE) {
- $project{"MOTIF_HEADERS"} .= "generic/" . $file . " "
+ foreach my $file ( @wxUnix ) {
+ $project{"UNIXOBJS"} .= $file->object_file . " ";
}
- foreach $file (sort keys %wxUNIXINCLUDE) {
- $project{"MOTIF_HEADERS"} .= "unix/" . $file . " "
+ foreach my $file ( @wxHtml ) {
+ $project{"HTMLOBJS"} .= $file->object_file . " ";
}
- foreach $file (sort keys %wxHTMLINCLUDE) {
- $project{"MOTIF_HEADERS"} .= "html/" . $file . " "
+ foreach my $file ( @generic, @common, @motif,
+ @wxUnix, @wxHtml ) {
+ $project{"MOTIF_SOURCES"} .= $file->source_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 at #$ Now()
+# This file was automatically generated by tmake
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MOTIF.T!
ALL_SOURCES = \
#$ ExpandList("MOTIF_SOURCES");
COMMONOBJS = \
#$ ExpandList("COMMONOBJS");
-COMMONDEPS = \
- #$ ExpandList("COMMONDEPS");
-
GENERICOBJS = \
#$ ExpandList("GENERICOBJS");
-GENERICDEPS = \
- #$ ExpandList("GENERICDEPS");
-
GUIOBJS = \
#$ ExpandList("GUIOBJS");
-GUIDEPS = \
- #$ ExpandList("GUIDEPS");
-
UNIXOBJS = \
#$ ExpandList("UNIXOBJS");
-UNIXDEPS = \
- #$ ExpandList("UNIXDEPS");
-
HTMLOBJS = \
#$ ExpandList("HTMLOBJS");
-HTMLDEPS = \
- #$ ExpandList("HTMLDEPS");