Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Showing
with 2014 additions and 0 deletions
#!/bin/bash
# This is the script buildbot.libsdl.org uses to cross-compile SDL2 from
# x86 Linux to OS/2, using OpenWatcom.
# The final zipfile can be unpacked on any machine that supports OpenWatcom
# (Windows, Linux, OS/2, etc). Point the compiler at the include directory
# and link against the SDL2.lib file. Ship the SDL2.dll with your app.
if [ -z "$WATCOM" ]; then
echo "This script expects \$WATCOM to be set to the OpenWatcom install dir." 1>&2
echo "This is often something like '/usr/local/share/watcom'" 1>&2
exit 1
fi
export PATH="$WATCOM/binl:$PATH"
ZIPFILE="$1"
if [ -z $1 ]; then
ZIPFILE=sdl-os2.zip
fi
ZIPDIR=buildbot/SDL
set -e
set -x
cd `dirname "$0"`
cd ..
rm -f $ZIPFILE
wmake -f Makefile.os2
rm -rf $ZIPDIR
mkdir -p $ZIPDIR
chmod 644 SDL2.dll SDL2.lib SDL2test.lib
mv SDL2.dll SDL2.lib SDL2test.lib $ZIPDIR/
cp -R include $ZIPDIR/
zip -9r "buildbot/$ZIPFILE" $ZIPDIR
wmake -f Makefile.os2 distclean
set +x
echo "All done. Final installable is in $ZIPFILE ...";
#!/bin/bash
# This is the script buildbot.libsdl.org uses to cross-compile SDL2 from
# x86 Linux to Raspberry Pi.
# The final tarball can be unpacked in the root directory of a RPi,
# so the SDL2 install lands in /usr/local. Run ldconfig, and then
# you should be able to build and run SDL2-based software on your
# Pi. Standard configure scripts should be able to find SDL and
# build against it, and sdl2-config should work correctly on the
# actual device.
TARBALL="$1"
if [ -z $1 ]; then
TARBALL=sdl-raspberrypi.tar.xz
fi
OSTYPE=`uname -s`
if [ "$OSTYPE" != "Linux" ]; then
# !!! FIXME
echo "This only works on x86 or x64-64 Linux at the moment." 1>&2
exit 1
fi
if [ "x$MAKE" == "x" ]; then
NCPU=`cat /proc/cpuinfo |grep vendor_id |wc -l`
let NCPU=$NCPU+1
MAKE="make -j$NCPU"
fi
BUILDBOTDIR="buildbot"
PARENTDIR="$PWD"
set -e
set -x
rm -f $TARBALL
rm -rf $BUILDBOTDIR
mkdir -p $BUILDBOTDIR
pushd $BUILDBOTDIR
SYSROOT="/opt/rpi-sysroot"
export CC="ccache /opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux -L$SYSROOT/opt/vc/lib"
# -L$SYSROOT/usr/lib/arm-linux-gnueabihf"
# !!! FIXME: shouldn't have to --disable-* things here.
../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd --disable-video-wayland
$MAKE
$MAKE install
# Fix up a few things to a real install path on a real Raspberry Pi...
perl -w -pi -e "s#$PWD/rpi-sdl2-installed#/usr/local#g;" ./rpi-sdl2-installed/lib/libSDL2.la ./rpi-sdl2-installed/lib/pkgconfig/sdl2.pc ./rpi-sdl2-installed/bin/sdl2-config
mkdir -p ./usr
mv ./rpi-sdl2-installed ./usr/local
tar -cJvvf $TARBALL usr
popd
set +x
echo "All done. Final installable is in $TARBALL ...";
#!/bin/sh
#
# Print the current source revision, if available
SDL_ROOT=$(dirname $0)/..
cd $SDL_ROOT
if [ -x "$(command -v git)" ]; then
rev=$(echo "$(git remote get-url origin 2>/dev/null)@$(git rev-list HEAD~.. 2>/dev/null)")
if [ "$rev" != "@" ]; then
echo $rev
exit 0
fi
fi
if [ -x "$(command -v p4)" ]; then
rev="$(p4 changes -m1 ./...\#have 2>/dev/null| awk '{print $2}')"
if [ $? = 0 ]; then
echo $rev
exit 0
fi
fi
echo ""
exit 1
#!/bin/sh
#
# libtool assumes that the compiler can handle the -fPIC flag
# This isn't always true (for example, nasm can't handle it)
command=""
while [ $# -gt 0 ]; do
case "$1" in
-?PIC)
# Ignore -fPIC and -DPIC options
;;
-fno-common)
# Ignore -fPIC and -DPIC options
;;
*)
command="$command $1"
;;
esac
shift
done
echo $command
exec $command
#!/bin/sh
find . -type f -exec grep -Il "Copyright" {} \; \
| grep -v \.git \
| while read file; \
do \
LC_ALL=C sed -b -i "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \
done
#!/bin/sh
#
# Generate a header file with the current source revision
outdir=`pwd`
cd `dirname $0`
srcdir=..
header=$outdir/include/SDL_revision.h
rev=`sh showrev.sh 2>/dev/null`
if [ "$rev" != "" ]; then
echo "#define SDL_REVISION \"$rev\"" >"$header.new"
echo "#define SDL_REVISION_NUMBER 0" >>"$header.new"
if diff $header $header.new >/dev/null 2>&1; then
rm "$header.new"
else
mv "$header.new" "$header"
fi
fi
#!/usr/bin/perl -w
use warnings;
use strict;
use Text::Wrap;
my $srcpath = undef;
my $wikipath = undef;
my $warn_about_missing = 0;
my $copy_direction = 0;
foreach (@ARGV) {
$warn_about_missing = 1, next if $_ eq '--warn-about-missing';
$copy_direction = 1, next if $_ eq '--copy-to-headers';
$copy_direction = 1, next if $_ eq '--copy-to-header';
$copy_direction = -1, next if $_ eq '--copy-to-wiki';
$copy_direction = -2, next if $_ eq '--copy-to-manpages';
$srcpath = $_, next if not defined $srcpath;
$wikipath = $_, next if not defined $wikipath;
}
my $wordwrap_mode = 'mediawiki';
sub wordwrap_atom { # don't call this directly.
my $str = shift;
return fill('', '', $str);
}
sub wordwrap_with_bullet_indent { # don't call this directly.
my $bullet = shift;
my $str = shift;
my $retval = '';
#print("WORDWRAP BULLET ('$bullet'):\n\n$str\n\n");
# You _can't_ (at least with Pandoc) have a bullet item with a newline in
# MediaWiki, so _remove_ wrapping!
if ($wordwrap_mode eq 'mediawiki') {
$retval = "$bullet$str";
$retval =~ s/\n/ /gms;
$retval =~ s/\s+$//gms;
#print("WORDWRAP BULLET DONE:\n\n$retval\n\n");
return "$retval\n";
}
my $bulletlen = length($bullet);
# wrap it and then indent each line to be under the bullet.
$Text::Wrap::columns -= $bulletlen;
my @wrappedlines = split /\n/, wordwrap_atom($str);
$Text::Wrap::columns += $bulletlen;
my $prefix = $bullet;
my $usual_prefix = ' ' x $bulletlen;
foreach (@wrappedlines) {
$retval .= "$prefix$_\n";
$prefix = $usual_prefix;
}
return $retval;
}
sub wordwrap_one_paragraph { # don't call this directly.
my $retval = '';
my $p = shift;
#print "\n\n\nPARAGRAPH: [$p]\n\n\n";
if ($p =~ s/\A([\*\-] )//) { # bullet list, starts with "* " or "- ".
my $bullet = $1;
my $item = '';
my @items = split /\n/, $p;
foreach (@items) {
if (s/\A([\*\-] )//) {
$retval .= wordwrap_with_bullet_indent($bullet, $item);
$item = '';
}
s/\A\s*//;
$item .= "$_\n"; # accumulate lines until we hit the end or another bullet.
}
if ($item ne '') {
$retval .= wordwrap_with_bullet_indent($bullet, $item);
}
} else {
$retval = wordwrap_atom($p) . "\n";
}
return $retval;
}
sub wordwrap_paragraphs { # don't call this directly.
my $str = shift;
my $retval = '';
my @paragraphs = split /\n\n/, $str;
foreach (@paragraphs) {
next if $_ eq '';
$retval .= wordwrap_one_paragraph($_);
$retval .= "\n";
}
return $retval;
}
my $wordwrap_default_columns = 76;
sub wordwrap {
my $str = shift;
my $columns = shift;
$columns = $wordwrap_default_columns if not defined $columns;
$columns += $wordwrap_default_columns if $columns < 0;
$Text::Wrap::columns = $columns;
my $retval = '';
#print("\n\nWORDWRAP:\n\n$str\n\n\n");
$str =~ s/\A\n+//ms;
while ($str =~ s/(.*?)(\`\`\`.*?\`\`\`|\<syntaxhighlight.*?\<\/syntaxhighlight\>)//ms) {
#print("\n\nWORDWRAP BLOCK:\n\n$1\n\n ===\n\n$2\n\n\n");
$retval .= wordwrap_paragraphs($1); # wrap it.
$retval .= "$2\n\n"; # don't wrap it.
}
$retval .= wordwrap_paragraphs($str); # wrap what's left.
$retval =~ s/\n+\Z//ms;
#print("\n\nWORDWRAP DONE:\n\n$retval\n\n\n");
return $retval;
}
# This assumes you're moving from Markdown (in the Doxygen data) to Wiki, which
# is why the 'md' section is so sparse.
sub wikify_chunk {
my $wikitype = shift;
my $str = shift;
my $codelang = shift;
my $code = shift;
#print("\n\nWIKIFY CHUNK:\n\n$str\n\n\n");
if ($wikitype eq 'mediawiki') {
# convert `code` things first, so they aren't mistaken for other markdown items.
my $codedstr = '';
while ($str =~ s/\A(.*?)\`(.*?)\`//ms) {
my $codeblock = $2;
$codedstr .= wikify_chunk($wikitype, $1, undef, undef);
# Convert obvious SDL things to wikilinks, even inside `code` blocks.
$codeblock =~ s/\b(SDL_[a-zA-Z0-9_]+)/[[$1]]/gms;
$codedstr .= "<code>$codeblock</code>";
}
# Convert obvious SDL things to wikilinks.
$str =~ s/\b(SDL_[a-zA-Z0-9_]+)/[[$1]]/gms;
# Make some Markdown things into MediaWiki...
# bold+italic
$str =~ s/\*\*\*(.*?)\*\*\*/'''''$1'''''/gms;
# bold
$str =~ s/\*\*(.*?)\*\*/'''$1'''/gms;
# italic
$str =~ s/\*(.*?)\*/''$1''/gms;
# bullets
$str =~ s/^\- /* /gm;
$str = $codedstr . $str;
if (defined $code) {
$str .= "<syntaxhighlight lang='$codelang'>$code<\/syntaxhighlight>";
}
} elsif ($wikitype eq 'md') {
# Convert obvious SDL things to wikilinks.
$str =~ s/\b(SDL_[a-zA-Z0-9_]+)/[$1]($1)/gms;
if (defined $code) {
$str .= "```$codelang$code```";
}
}
#print("\n\nWIKIFY CHUNK DONE:\n\n$str\n\n\n");
return $str;
}
sub wikify {
my $wikitype = shift;
my $str = shift;
my $retval = '';
#print("WIKIFY WHOLE:\n\n$str\n\n\n");
while ($str =~ s/\A(.*?)\`\`\`(c\+\+|c)(.*?)\`\`\`//ms) {
$retval .= wikify_chunk($wikitype, $1, $2, $3);
}
$retval .= wikify_chunk($wikitype, $str, undef, undef);
#print("WIKIFY WHOLE DONE:\n\n$retval\n\n\n");
return $retval;
}
my $dewikify_mode = 'md';
my $dewikify_manpage_code_indent = 1;
sub dewikify_chunk {
my $wikitype = shift;
my $str = shift;
my $codelang = shift;
my $code = shift;
#print("\n\nDEWIKIFY CHUNK:\n\n$str\n\n\n");
if ($dewikify_mode eq 'md') {
if ($wikitype eq 'mediawiki') {
# Doxygen supports Markdown (and it just simply looks better than MediaWiki
# when looking at the raw headers), so do some conversions here as necessary.
$str =~ s/\[\[(SDL_[a-zA-Z0-9_]+)\]\]/$1/gms; # Dump obvious wikilinks.
# <code></code> is also popular. :/
$str =~ s/\<code>(.*?)<\/code>/`$1`/gms;
# bold+italic
$str =~ s/'''''(.*?)'''''/***$1***/gms;
# bold
$str =~ s/'''(.*?)'''/**$1**/gms;
# italic
$str =~ s/''(.*?)''/*$1*/gms;
# bullets
$str =~ s/^\* /- /gm;
}
if (defined $code) {
$str .= "```$codelang$code```";
}
} elsif ($dewikify_mode eq 'manpage') {
$str =~ s/\./\\[char46]/gms; # make sure these can't become control codes.
if ($wikitype eq 'mediawiki') {
$str =~ s/\s*\[\[(SDL_[a-zA-Z0-9_]+)\]\]\s*/\n.BR $1\n/gms; # Dump obvious wikilinks.
# <code></code> is also popular. :/
$str =~ s/\s*\<code>(.*?)<\/code>\s*/\n.BR $1\n/gms;
# bold+italic
$str =~ s/\s*'''''(.*?)'''''\s*/\n.BI $1\n/gms;
# bold
$str =~ s/\s*'''(.*?)'''\s*/\n.B $1\n/gms;
# italic
$str =~ s/\s*''(.*?)''\s*/\n.I $1\n/gms;
# bullets
$str =~ s/^\* /\n\\\(bu /gm;
} else {
die("Unexpected wikitype when converting to manpages\n"); # !!! FIXME: need to handle Markdown wiki pages.
}
if (defined $code) {
$code =~ s/\A\n+//gms;
$code =~ s/\n+\Z//gms;
if ($dewikify_manpage_code_indent) {
$str .= "\n.IP\n"
} else {
$str .= "\n.PP\n"
}
$str .= ".EX\n$code\n.EE\n.PP\n";
}
} else {
die("Unexpected dewikify_mode\n");
}
#print("\n\nDEWIKIFY CHUNK DONE:\n\n$str\n\n\n");
return $str;
}
sub dewikify {
my $wikitype = shift;
my $str = shift;
return '' if not defined $str;
#print("DEWIKIFY WHOLE:\n\n$str\n\n\n");
$str =~ s/\A[\s\n]*\= .*? \=\s*?\n+//ms;
$str =~ s/\A[\s\n]*\=\= .*? \=\=\s*?\n+//ms;
my $retval = '';
while ($str =~ s/\A(.*?)<syntaxhighlight lang='?(.*?)'?>(.*?)<\/syntaxhighlight\>//ms) {
$retval .= dewikify_chunk($wikitype, $1, $2, $3);
}
$retval .= dewikify_chunk($wikitype, $str, undef, undef);
#print("DEWIKIFY WHOLE DONE:\n\n$retval\n\n\n");
return $retval;
}
sub usage {
die("USAGE: $0 <source code git clone path> <wiki git clone path> [--copy-to-headers|--copy-to-wiki|--copy-to-manpages] [--warn-about-missing]\n\n");
}
usage() if not defined $srcpath;
usage() if not defined $wikipath;
#usage() if $copy_direction == 0;
my @standard_wiki_sections = (
'Draft',
'[Brief]',
'Deprecated',
'Syntax',
'Function Parameters',
'Return Value',
'Remarks',
'Version',
'Code Examples',
'Related Functions'
);
# Sections that only ever exist in the wiki and shouldn't be deleted when
# not found in the headers.
my %only_wiki_sections = ( # The ones don't mean anything, I just need to check for key existence.
'Draft', 1,
'Code Examples', 1
);
my %headers = (); # $headers{"SDL_audio.h"} -> reference to an array of all lines of text in SDL_audio.h.
my %headerfuncs = (); # $headerfuncs{"SDL_OpenAudio"} -> string of header documentation for SDL_OpenAudio, with comment '*' bits stripped from the start. Newlines embedded!
my %headerdecls = ();
my %headerfuncslocation = (); # $headerfuncslocation{"SDL_OpenAudio"} -> name of header holding SDL_OpenAudio define ("SDL_audio.h" in this case).
my %headerfuncschunk = (); # $headerfuncschunk{"SDL_OpenAudio"} -> offset in array in %headers that should be replaced for this function.
my %headerfuncshasdoxygen = (); # $headerfuncschunk{"SDL_OpenAudio"} -> 1 if there was no existing doxygen for this function.
my $incpath = "$srcpath/include";
opendir(DH, $incpath) or die("Can't opendir '$incpath': $!\n");
while (readdir(DH)) {
my $dent = $_;
next if not $dent =~ /\ASDL.*?\.h\Z/; # just SDL*.h headers.
open(FH, '<', "$incpath/$dent") or die("Can't open '$incpath/$dent': $!\n");
my @contents = ();
while (<FH>) {
chomp;
my $decl;
my @templines;
my $str;
my $has_doxygen = 1;
if (/\A\s*extern\s+(SDL_DEPRECATED\s+|)DECLSPEC/) { # a function declaration without a doxygen comment?
@templines = ();
$decl = $_;
$str = '';
$has_doxygen = 0;
} elsif (not /\A\/\*\*\s*\Z/) { # not doxygen comment start?
push @contents, $_;
next;
} else { # Start of a doxygen comment, parse it out.
@templines = ( $_ );
while (<FH>) {
chomp;
push @templines, $_;
last if /\A\s*\*\/\Z/;
if (s/\A\s*\*\s*\`\`\`/```/) { # this is a hack, but a lot of other code relies on the whitespace being trimmed, but we can't trim it in code blocks...
$str .= "$_\n";
while (<FH>) {
chomp;
push @templines, $_;
s/\A\s*\*\s?//;
if (s/\A\s*\`\`\`/```/) {
$str .= "$_\n";
last;
} else {
$str .= "$_\n";
}
}
} else {
s/\A\s*\*\s*//;
$str .= "$_\n";
}
}
$decl = <FH>;
$decl = '' if not defined $decl;
chomp($decl);
if (not $decl =~ /\A\s*extern\s+(SDL_DEPRECATED\s+|)DECLSPEC/) {
#print "Found doxygen but no function sig:\n$str\n\n";
foreach (@templines) {
push @contents, $_;
}
push @contents, $decl;
next;
}
}
my @decllines = ( $decl );
if (not $decl =~ /\)\s*;/) {
while (<FH>) {
chomp;
push @decllines, $_;
s/\A\s+//;
s/\s+\Z//;
$decl .= " $_";
last if /\)\s*;/;
}
}
$decl =~ s/\s+\);\Z/);/;
$decl =~ s/\s+\Z//;
#print("DECL: [$decl]\n");
my $fn = '';
if ($decl =~ /\A\s*extern\s+(SDL_DEPRECATED\s+|)DECLSPEC\s+(const\s+|)(unsigned\s+|)(.*?)\s*(\*?)\s*SDLCALL\s+(.*?)\s*\((.*?)\);/) {
$fn = $6;
#$decl =~ s/\A\s*extern\s+DECLSPEC\s+(.*?)\s+SDLCALL/$1/;
} else {
#print "Found doxygen but no function sig:\n$str\n\n";
foreach (@templines) {
push @contents, $_;
}
foreach (@decllines) {
push @contents, $_;
}
next;
}
$decl = ''; # build this with the line breaks, since it looks better for syntax highlighting.
foreach (@decllines) {
if ($decl eq '') {
$decl = $_;
$decl =~ s/\Aextern\s+(SDL_DEPRECATED\s+|)DECLSPEC\s+(.*?)\s+(\*?)SDLCALL\s+/$2$3 /;
} else {
my $trimmed = $_;
# !!! FIXME: trim space for SDL_DEPRECATED if it was used, too.
$trimmed =~ s/\A\s{24}//; # 24 for shrinking to match the removed "extern DECLSPEC SDLCALL "
$decl .= $trimmed;
}
$decl .= "\n";
}
#print("$fn:\n$str\n\n");
# There might be multiple declarations of a function due to #ifdefs,
# and only one of them will have documentation. If we hit an
# undocumented one before, delete the placeholder line we left for
# it so it doesn't accumulate a new blank line on each run.
my $skipfn = 0;
if (defined $headerfuncshasdoxygen{$fn}) {
if ($headerfuncshasdoxygen{$fn} == 0) { # An undocumented declaration already exists, nuke its placeholder line.
delete $contents[$headerfuncschunk{$fn}]; # delete DOES NOT RENUMBER existing elements!
} else { # documented function already existed?
$skipfn = 1; # don't add this copy to the list of functions.
if ($has_doxygen) {
print STDERR "WARNING: Function '$fn' appears to be documented in multiple locations. Only keeping the first one we saw!\n";
}
push @contents, join("\n", @decllines); # just put the existing declation in as-is.
}
}
if (!$skipfn) {
$headerfuncs{$fn} = $str;
$headerdecls{$fn} = $decl;
$headerfuncslocation{$fn} = $dent;
$headerfuncschunk{$fn} = scalar(@contents);
$headerfuncshasdoxygen{$fn} = $has_doxygen;
push @contents, join("\n", @templines);
push @contents, join("\n", @decllines);
}
}
close(FH);
$headers{$dent} = \@contents;
}
closedir(DH);
# !!! FIXME: we need to parse enums and typedefs and structs and defines and and and and and...
# !!! FIXME: (but functions are good enough for now.)
my %wikitypes = (); # contains string of wiki page extension, like $wikitypes{"SDL_OpenAudio"} == 'mediawiki'
my %wikifuncs = (); # contains references to hash of strings, each string being the full contents of a section of a wiki page, like $wikifuncs{"SDL_OpenAudio"}{"Remarks"}.
my %wikisectionorder = (); # contains references to array, each array item being a key to a wikipage section in the correct order, like $wikisectionorder{"SDL_OpenAudio"}[2] == 'Remarks'
opendir(DH, $wikipath) or die("Can't opendir '$wikipath': $!\n");
while (readdir(DH)) {
my $dent = $_;
my $type = '';
if ($dent =~ /\ASDL.*?\.(md|mediawiki)\Z/) {
$type = $1;
} else {
next; # only dealing with wiki pages.
}
open(FH, '<', "$wikipath/$dent") or die("Can't open '$wikipath/$dent': $!\n");
my $current_section = '[start]';
my @section_order = ( $current_section );
my $fn = $dent;
$fn =~ s/\..*\Z//;
my %sections = ();
$sections{$current_section} = '';
while (<FH>) {
chomp;
my $orig = $_;
s/\A\s*//;
s/\s*\Z//;
if ($type eq 'mediawiki') {
if (/\A\= (.*?) \=\Z/) {
$current_section = ($1 eq $fn) ? '[Brief]' : $1;
die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
push @section_order, $current_section;
$sections{$current_section} = '';
} elsif (/\A\=\= (.*?) \=\=\Z/) {
$current_section = ($1 eq $fn) ? '[Brief]' : $1;
die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
push @section_order, $current_section;
$sections{$current_section} = '';
next;
} elsif (/\A\-\-\-\-\Z/) {
$current_section = '[footer]';
die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
push @section_order, $current_section;
$sections{$current_section} = '';
next;
}
} elsif ($type eq 'md') {
if (/\A\#+ (.*?)\Z/) {
$current_section = ($1 eq $fn) ? '[Brief]' : $1;
die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
push @section_order, $current_section;
$sections{$current_section} = '';
next;
} elsif (/\A\-\-\-\-\Z/) {
$current_section = '[footer]';
die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
push @section_order, $current_section;
$sections{$current_section} = '';
next;
}
} else {
die("Unexpected wiki file type. Fixme!\n");
}
$sections{$current_section} .= "$orig\n";
}
close(FH);
foreach (keys %sections) {
$sections{$_} =~ s/\A\n+//;
$sections{$_} =~ s/\n+\Z//;
$sections{$_} .= "\n";
}
if (0) {
foreach (@section_order) {
print("$fn SECTION '$_':\n");
print($sections{$_});
print("\n\n");
}
}
$wikitypes{$fn} = $type;
$wikifuncs{$fn} = \%sections;
$wikisectionorder{$fn} = \@section_order;
}
closedir(DH);
if ($warn_about_missing) {
foreach (keys %wikifuncs) {
my $fn = $_;
if (not defined $headerfuncs{$fn}) {
print("WARNING: $fn defined in the wiki but not the headers!\n");
}
}
foreach (keys %headerfuncs) {
my $fn = $_;
if (not defined $wikifuncs{$fn}) {
print("WARNING: $fn defined in the headers but not the wiki!\n");
}
}
}
if ($copy_direction == 1) { # --copy-to-headers
my %changed_headers = ();
$dewikify_mode = 'md';
$wordwrap_mode = 'md'; # the headers use Markdown format.
foreach (keys %headerfuncs) {
my $fn = $_;
next if not defined $wikifuncs{$fn}; # don't have a page for that function, skip it.
my $wikitype = $wikitypes{$fn};
my $sectionsref = $wikifuncs{$fn};
my $remarks = %$sectionsref{'Remarks'};
my $params = %$sectionsref{'Function Parameters'};
my $returns = %$sectionsref{'Return Value'};
my $version = %$sectionsref{'Version'};
my $related = %$sectionsref{'Related Functions'};
my $deprecated = %$sectionsref{'Deprecated'};
my $brief = %$sectionsref{'[Brief]'};
my $addblank = 0;
my $str = '';
$headerfuncshasdoxygen{$fn} = 1; # Added/changed doxygen for this header.
$brief = dewikify($wikitype, $brief);
$brief =~ s/\A(.*?\.) /$1\n/; # \brief should only be one sentence, delimited by a period+space. Split if necessary.
my @briefsplit = split /\n/, $brief;
$brief = shift @briefsplit;
if (defined $remarks) {
$remarks = join("\n", @briefsplit) . dewikify($wikitype, $remarks);
}
if (defined $brief) {
$str .= "\n" if $addblank; $addblank = 1;
$str .= wordwrap($brief) . "\n";
}
if (defined $remarks) {
$str .= "\n" if $addblank; $addblank = 1;
$str .= wordwrap($remarks) . "\n";
}
if (defined $deprecated) {
# !!! FIXME: lots of code duplication in all of these.
$str .= "\n" if $addblank; $addblank = 1;
my $v = dewikify($wikitype, $deprecated);
my $whitespacelen = length("\\deprecated") + 1;
my $whitespace = ' ' x $whitespacelen;
$v = wordwrap($v, -$whitespacelen);
my @desclines = split /\n/, $v;
my $firstline = shift @desclines;
$str .= "\\deprecated $firstline\n";
foreach (@desclines) {
$str .= "${whitespace}$_\n";
}
}
if (defined $params) {
$str .= "\n" if $addblank; $addblank = (defined $returns) ? 0 : 1;
my @lines = split /\n/, dewikify($wikitype, $params);
if ($wikitype eq 'mediawiki') {
die("Unexpected data parsing MediaWiki table") if (shift @lines ne '{|'); # Dump the '{|' start
while (scalar(@lines) >= 3) {
my $name = shift @lines;
my $desc = shift @lines;
my $terminator = shift @lines; # the '|-' or '|}' line.
last if ($terminator ne '|-') and ($terminator ne '|}'); # we seem to have run out of table.
$name =~ s/\A\|\s*//;
$name =~ s/\A\*\*(.*?)\*\*/$1/;
$name =~ s/\A\'\'\'(.*?)\'\'\'/$1/;
$desc =~ s/\A\|\s*//;
#print STDERR "FN: $fn NAME: $name DESC: $desc TERM: $terminator\n";
my $whitespacelen = length($name) + 8;
my $whitespace = ' ' x $whitespacelen;
$desc = wordwrap($desc, -$whitespacelen);
my @desclines = split /\n/, $desc;
my $firstline = shift @desclines;
$str .= "\\param $name $firstline\n";
foreach (@desclines) {
$str .= "${whitespace}$_\n";
}
}
} else {
die("write me");
}
}
if (defined $returns) {
$str .= "\n" if $addblank; $addblank = 1;
my $r = dewikify($wikitype, $returns);
my $retstr = "\\returns";
if ($r =~ s/\AReturn(s?) //) {
$retstr = "\\return$1";
}
my $whitespacelen = length($retstr) + 1;
my $whitespace = ' ' x $whitespacelen;
$r = wordwrap($r, -$whitespacelen);
my @desclines = split /\n/, $r;
my $firstline = shift @desclines;
$str .= "$retstr $firstline\n";
foreach (@desclines) {
$str .= "${whitespace}$_\n";
}
}
if (defined $version) {
# !!! FIXME: lots of code duplication in all of these.
$str .= "\n" if $addblank; $addblank = 1;
my $v = dewikify($wikitype, $version);
my $whitespacelen = length("\\since") + 1;
my $whitespace = ' ' x $whitespacelen;
$v = wordwrap($v, -$whitespacelen);
my @desclines = split /\n/, $v;
my $firstline = shift @desclines;
$str .= "\\since $firstline\n";
foreach (@desclines) {
$str .= "${whitespace}$_\n";
}
}
if (defined $related) {
# !!! FIXME: lots of code duplication in all of these.
$str .= "\n" if $addblank; $addblank = 1;
my $v = dewikify($wikitype, $related);
my @desclines = split /\n/, $v;
foreach (@desclines) {
s/\A(\:|\* )//;
s/\(\)\Z//; # Convert "SDL_Func()" to "SDL_Func"
$str .= "\\sa $_\n";
}
}
my $header = $headerfuncslocation{$fn};
my $contentsref = $headers{$header};
my $chunk = $headerfuncschunk{$fn};
my @lines = split /\n/, $str;
my $addnewline = (($chunk > 0) && ($$contentsref[$chunk-1] ne '')) ? "\n" : '';
my $output = "$addnewline/**\n";
foreach (@lines) {
chomp;
s/\s*\Z//;
if ($_ eq '') {
$output .= " *\n";
} else {
$output .= " * $_\n";
}
}
$output .= " */";
#print("$fn:\n$output\n\n");
$$contentsref[$chunk] = $output;
#$$contentsref[$chunk+1] = $headerdecls{$fn};
$changed_headers{$header} = 1;
}
foreach (keys %changed_headers) {
my $header = $_;
# this is kinda inefficient, but oh well.
my @removelines = ();
foreach (keys %headerfuncslocation) {
my $fn = $_;
next if $headerfuncshasdoxygen{$fn};
next if $headerfuncslocation{$fn} ne $header;
# the index of the blank line we put before the function declaration in case we needed to replace it with new content from the wiki.
push @removelines, $headerfuncschunk{$fn};
}
my $contentsref = $headers{$header};
foreach (@removelines) {
delete $$contentsref[$_]; # delete DOES NOT RENUMBER existing elements!
}
my $path = "$incpath/$header.tmp";
open(FH, '>', $path) or die("Can't open '$path': $!\n");
foreach (@$contentsref) {
print FH "$_\n" if defined $_;
}
close(FH);
rename($path, "$incpath/$header") or die("Can't rename '$path' to '$incpath/$header': $!\n");
}
} elsif ($copy_direction == -1) { # --copy-to-wiki
foreach (keys %headerfuncs) {
my $fn = $_;
next if not $headerfuncshasdoxygen{$fn};
my $wikitype = defined $wikitypes{$fn} ? $wikitypes{$fn} : 'mediawiki'; # default to MediaWiki for new stuff FOR NOW.
die("Unexpected wikitype '$wikitype'\n") if (($wikitype ne 'mediawiki') and ($wikitype ne 'md') and ($wikitype ne 'manpage'));
#print("$fn\n"); next;
$wordwrap_mode = $wikitype;
my $raw = $headerfuncs{$fn}; # raw doxygen text with comment characters stripped from start/end and start of each line.
next if not defined $raw;
$raw =~ s/\A\s*\\brief\s+//; # Technically we don't need \brief (please turn on JAVADOC_AUTOBRIEF if you use Doxygen), so just in case one is present, strip it.
my @doxygenlines = split /\n/, $raw;
my $brief = '';
while (@doxygenlines) {
last if $doxygenlines[0] =~ /\A\\/; # some sort of doxygen command, assume we're past the general remarks.
last if $doxygenlines[0] =~ /\A\s*\Z/; # blank line? End of paragraph, done.
my $l = shift @doxygenlines;
chomp($l);
$l =~ s/\A\s*//;
$l =~ s/\s*\Z//;
$brief .= "$l ";
}
$brief =~ s/\A(.*?\.) /$1\n\n/; # \brief should only be one sentence, delimited by a period+space. Split if necessary.
my @briefsplit = split /\n/, $brief;
$brief = wikify($wikitype, shift @briefsplit) . "\n";
@doxygenlines = (@briefsplit, @doxygenlines);
my $remarks = '';
# !!! FIXME: wordwrap and wikify might handle this, now.
while (@doxygenlines) {
last if $doxygenlines[0] =~ /\A\\/; # some sort of doxygen command, assume we're past the general remarks.
my $l = shift @doxygenlines;
if ($l =~ /\A\`\`\`/) { # syntax highlighting, don't reformat.
$remarks .= "$l\n";
while ((@doxygenlines) && (not $l =~ /\`\`\`\Z/)) {
$l = shift @doxygenlines;
$remarks .= "$l\n";
}
} else {
$l =~ s/\A\s*//;
$l =~ s/\s*\Z//;
$remarks .= "$l\n";
}
}
#print("REMARKS:\n\n $remarks\n\n");
$remarks = wordwrap(wikify($wikitype, $remarks));
$remarks =~ s/\A\s*//;
$remarks =~ s/\s*\Z//;
my $decl = $headerdecls{$fn};
#$decl =~ s/\*\s+SDLCALL/ *SDLCALL/; # Try to make "void * Function" become "void *Function"
#$decl =~ s/\A\s*extern\s+(SDL_DEPRECATED\s+|)DECLSPEC\s+(.*?)\s+(\*?)SDLCALL/$2$3/;
my $syntax = '';
if ($wikitype eq 'mediawiki') {
$syntax = "<syntaxhighlight lang='c'>\n$decl</syntaxhighlight>\n";
} elsif ($wikitype eq 'md') {
$syntax = "```c\n$decl\n```\n";
} else { die("Expected wikitype '$wikitype'\n"); }
my %sections = ();
$sections{'[Brief]'} = $brief; # include this section even if blank so we get a title line.
$sections{'Remarks'} = "$remarks\n" if $remarks ne '';
$sections{'Syntax'} = $syntax;
my @params = (); # have to parse these and build up the wiki tables after, since Markdown needs to know the length of the largest string. :/
while (@doxygenlines) {
my $l = shift @doxygenlines;
if ($l =~ /\A\\param\s+(.*?)\s+(.*)\Z/) {
my $arg = $1;
my $desc = $2;
while (@doxygenlines) {
my $subline = $doxygenlines[0];
$subline =~ s/\A\s*//;
last if $subline =~ /\A\\/; # some sort of doxygen command, assume we're past this thing.
shift @doxygenlines; # dump this line from the array; we're using it.
if ($subline eq '') { # empty line, make sure it keeps the newline char.
$desc .= "\n";
} else {
$desc .= " $subline";
}
}
$desc =~ s/[\s\n]+\Z//ms;
# We need to know the length of the longest string to make Markdown tables, so we just store these off until everything is parsed.
push @params, $arg;
push @params, $desc;
} elsif ($l =~ /\A\\r(eturns?)\s+(.*)\Z/) {
my $retstr = "R$1"; # "Return" or "Returns"
my $desc = $2;
while (@doxygenlines) {
my $subline = $doxygenlines[0];
$subline =~ s/\A\s*//;
last if $subline =~ /\A\\/; # some sort of doxygen command, assume we're past this thing.
shift @doxygenlines; # dump this line from the array; we're using it.
if ($subline eq '') { # empty line, make sure it keeps the newline char.
$desc .= "\n";
} else {
$desc .= " $subline";
}
}
$desc =~ s/[\s\n]+\Z//ms;
$sections{'Return Value'} = wordwrap("$retstr " . wikify($wikitype, $desc)) . "\n";
} elsif ($l =~ /\A\\deprecated\s+(.*)\Z/) {
my $desc = $1;
while (@doxygenlines) {
my $subline = $doxygenlines[0];
$subline =~ s/\A\s*//;
last if $subline =~ /\A\\/; # some sort of doxygen command, assume we're past this thing.
shift @doxygenlines; # dump this line from the array; we're using it.
if ($subline eq '') { # empty line, make sure it keeps the newline char.
$desc .= "\n";
} else {
$desc .= " $subline";
}
}
$desc =~ s/[\s\n]+\Z//ms;
$sections{'Deprecated'} = wordwrap(wikify($wikitype, $desc)) . "\n";
} elsif ($l =~ /\A\\since\s+(.*)\Z/) {
my $desc = $1;
while (@doxygenlines) {
my $subline = $doxygenlines[0];
$subline =~ s/\A\s*//;
last if $subline =~ /\A\\/; # some sort of doxygen command, assume we're past this thing.
shift @doxygenlines; # dump this line from the array; we're using it.
if ($subline eq '') { # empty line, make sure it keeps the newline char.
$desc .= "\n";
} else {
$desc .= " $subline";
}
}
$desc =~ s/[\s\n]+\Z//ms;
$sections{'Version'} = wordwrap(wikify($wikitype, $desc)) . "\n";
} elsif ($l =~ /\A\\sa\s+(.*)\Z/) {
my $sa = $1;
$sa =~ s/\(\)\Z//; # Convert "SDL_Func()" to "SDL_Func"
$sections{'Related Functions'} = '' if not defined $sections{'Related Functions'};
if ($wikitype eq 'mediawiki') {
$sections{'Related Functions'} .= ":[[$sa]]\n";
} elsif ($wikitype eq 'md') {
$sections{'Related Functions'} .= "* [$sa](/$sa)\n";
} else { die("Expected wikitype '$wikitype'\n"); }
}
}
# Make sure this ends with a double-newline.
$sections{'Related Functions'} .= "\n" if defined $sections{'Related Functions'};
# We can build the wiki table now that we have all the data.
if (scalar(@params) > 0) {
my $str = '';
if ($wikitype eq 'mediawiki') {
while (scalar(@params) > 0) {
my $arg = shift @params;
my $desc = wikify($wikitype, shift @params);
$str .= ($str eq '') ? "{|\n" : "|-\n";
$str .= "|'''$arg'''\n";
$str .= "|$desc\n";
}
$str .= "|}\n";
} elsif ($wikitype eq 'md') {
my $longest_arg = 0;
my $longest_desc = 0;
my $which = 0;
foreach (@params) {
if ($which == 0) {
my $len = length($_) + 4;
$longest_arg = $len if ($len > $longest_arg);
$which = 1;
} else {
my $len = length(wikify($wikitype, $_));
$longest_desc = $len if ($len > $longest_desc);
$which = 0;
}
}
# Markdown tables are sort of obnoxious.
$str .= '| ' . (' ' x ($longest_arg+4)) . ' | ' . (' ' x $longest_desc) . " |\n";
$str .= '| ' . ('-' x ($longest_arg+4)) . ' | ' . ('-' x $longest_desc) . " |\n";
while (@params) {
my $arg = shift @params;
my $desc = wikify($wikitype, shift @params);
$str .= "| **$arg** " . (' ' x ($longest_arg - length($arg))) . "| $desc" . (' ' x ($longest_desc - length($desc))) . " |\n";
}
} else {
die("Unexpected wikitype!\n"); # should have checked this elsewhere.
}
$sections{'Function Parameters'} = $str;
}
my $path = "$wikipath/$_.${wikitype}.tmp";
open(FH, '>', $path) or die("Can't open '$path': $!\n");
my $sectionsref = $wikifuncs{$fn};
foreach (@standard_wiki_sections) {
# drop sections we either replaced or removed from the original wiki's contents.
if (not defined $only_wiki_sections{$_}) {
delete($$sectionsref{$_});
}
}
my $wikisectionorderref = $wikisectionorder{$fn};
# Make sure there's a footer in the wiki that puts this function in CategoryAPI...
if (not $$sectionsref{'[footer]'}) {
$$sectionsref{'[footer]'} = '';
push @$wikisectionorderref, '[footer]';
}
# !!! FIXME: This won't be CategoryAPI if we eventually handle things other than functions.
my $footer = $$sectionsref{'[footer]'};
if ($wikitype eq 'mediawiki') {
$footer =~ s/\[\[CategoryAPI\]\],?\s*//g;
$footer = '[[CategoryAPI]]' . (($footer eq '') ? "\n" : ", $footer");
} elsif ($wikitype eq 'md') {
$footer =~ s/\[CategoryAPI\]\(CategoryAPI\),?\s*//g;
$footer = '[CategoryAPI](CategoryAPI)' . (($footer eq '') ? '' : ', ') . $footer;
} else { die("Unexpected wikitype '$wikitype'\n"); }
$$sectionsref{'[footer]'} = $footer;
my $prevsectstr = '';
my @ordered_sections = (@standard_wiki_sections, defined $wikisectionorderref ? @$wikisectionorderref : ()); # this copies the arrays into one.
foreach (@ordered_sections) {
my $sect = $_;
next if $sect eq '[start]';
next if (not defined $sections{$sect} and not defined $$sectionsref{$sect});
my $section = defined $sections{$sect} ? $sections{$sect} : $$sectionsref{$sect};
if ($sect eq '[footer]') {
# Make sure previous section ends with two newlines.
if (substr($prevsectstr, -1) ne "\n") {
print FH "\n\n";
} elsif (substr($prevsectstr, -2) ne "\n\n") {
print FH "\n";
}
print FH "----\n"; # It's the same in Markdown and MediaWiki.
} elsif ($sect eq '[Brief]') {
if ($wikitype eq 'mediawiki') {
print FH "= $fn =\n\n";
} elsif ($wikitype eq 'md') {
print FH "# $fn\n\n";
} else { die("Unexpected wikitype '$wikitype'\n"); }
} else {
if ($wikitype eq 'mediawiki') {
print FH "\n== $sect ==\n\n";
} elsif ($wikitype eq 'md') {
print FH "\n## $sect\n\n";
} else { die("Unexpected wikitype '$wikitype'\n"); }
}
my $sectstr = defined $sections{$sect} ? $sections{$sect} : $$sectionsref{$sect};
print FH $sectstr;
$prevsectstr = $sectstr;
# make sure these don't show up twice.
delete($sections{$sect});
delete($$sectionsref{$sect});
}
print FH "\n\n";
close(FH);
rename($path, "$wikipath/$_.${wikitype}") or die("Can't rename '$path' to '$wikipath/$_.${wikitype}': $!\n");
}
} elsif ($copy_direction == -2) { # --copy-to-manpages
# This only takes from the wiki data, since it has sections we omit from the headers, like code examples.
my $manpath = "$srcpath/man";
mkdir($manpath);
$manpath .= "/man3";
mkdir($manpath);
$dewikify_mode = 'manpage';
$wordwrap_mode = 'manpage';
my $introtxt = '';
if (0) {
open(FH, '<', "$srcpath/LICENSE.txt") or die("Can't open '$srcpath/LICENSE.txt': $!\n");
while (<FH>) {
chomp;
$introtxt .= ".\\\" $_\n";
}
close(FH);
}
my $gitrev = `cd "$srcpath" ; git rev-list HEAD~..`;
chomp($gitrev);
open(FH, '<', "$srcpath/include/SDL_version.h") or die("Can't open '$srcpath/include/SDL_version.h': $!\n");
my $majorver = 0;
my $minorver = 0;
my $patchver = 0;
while (<FH>) {
chomp;
if (/\A\#define SDL_MAJOR_VERSION\s+(\d+)\Z/) {
$majorver = int($1);
} elsif (/\A\#define SDL_MINOR_VERSION\s+(\d+)\Z/) {
$minorver = int($1);
} elsif (/\A\#define SDL_PATCHLEVEL\s+(\d+)\Z/) {
$patchver = int($1);
}
}
close(FH);
my $sdlversion = "$majorver.$minorver.$patchver";
foreach (keys %headerfuncs) {
my $fn = $_;
next if not defined $wikifuncs{$fn}; # don't have a page for that function, skip it.
my $wikitype = $wikitypes{$fn};
my $sectionsref = $wikifuncs{$fn};
my $remarks = %$sectionsref{'Remarks'};
my $params = %$sectionsref{'Function Parameters'};
my $returns = %$sectionsref{'Return Value'};
my $version = %$sectionsref{'Version'};
my $related = %$sectionsref{'Related Functions'};
my $examples = %$sectionsref{'Code Examples'};
my $deprecated = %$sectionsref{'Deprecated'};
my $brief = %$sectionsref{'[Brief]'};
my $decl = $headerdecls{$fn};
my $str = '';
$brief = "$brief";
$brief =~ s/\A[\s\n]*\= .*? \=\s*?\n+//ms;
$brief =~ s/\A[\s\n]*\=\= .*? \=\=\s*?\n+//ms;
$brief =~ s/\A(.*?\.) /$1\n/; # \brief should only be one sentence, delimited by a period+space. Split if necessary.
my @briefsplit = split /\n/, $brief;
$brief = shift @briefsplit;
$brief = dewikify($wikitype, $brief);
if (defined $remarks) {
$remarks = dewikify($wikitype, join("\n", @briefsplit) . $remarks);
}
$str .= $introtxt;
$str .= ".\\\" This manpage content is licensed under Creative Commons\n";
$str .= ".\\\" Attribution 4.0 International (CC BY 4.0)\n";
$str .= ".\\\" https://creativecommons.org/licenses/by/4.0/\n";
$str .= ".\\\" This manpage was generated from SDL's wiki page for $fn:\n";
$str .= ".\\\" https://wiki.libsdl.org/$fn\n";
$str .= ".\\\" Generated with SDL/build-scripts/wikiheaders.pl\n";
$str .= ".\\\" revision $gitrev\n" if $gitrev ne '';
$str .= ".\\\" Please report issues in this manpage's content at:\n";
$str .= ".\\\" https://github.com/libsdl-org/sdlwiki/issues/new?title=Feedback%20on%20page%20$fn\n";
$str .= ".\\\" Please report issues in the generation of this manpage from the wiki at:\n";
$str .= ".\\\" https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20$fn\n";
$str .= ".\\\" SDL can be found at https://libsdl.org/\n";
$str .= ".TH $fn 3 \"SDL $sdlversion\" \"Simple Directmedia Layer\" \"SDL$majorver FUNCTIONS\"\n";
$str .= ".SH NAME\n";
$str .= "$fn";
$str .= " \\- $brief" if (defined $brief);
$str .= "\n";
$str .= ".SH SYNOPSIS\n";
$str .= ".nf\n";
$str .= ".B #include \\(dqSDL.h\\(dq\n";
$str .= ".PP\n";
my @decllines = split /\n/, $decl;
foreach (@decllines) {
$str .= ".BI \"$_\n";
}
$str .= ".fi\n";
if (defined $remarks) {
$str .= ".SH DESCRIPTION\n";
$str .= $remarks . "\n";
}
if (defined $deprecated) {
$str .= ".SH DEPRECATED\n";
$str .= dewikify($wikitype, $deprecated) . "\n";
}
if (defined $params) {
$str .= ".SH FUNCTION PARAMETERS\n";
my @lines = split /\n/, $params;
if ($wikitype eq 'mediawiki') {
die("Unexpected data parsing MediaWiki table") if (shift @lines ne '{|'); # Dump the '{|' start
while (scalar(@lines) >= 3) {
my $name = shift @lines;
my $desc = shift @lines;
my $terminator = shift @lines; # the '|-' or '|}' line.
last if ($terminator ne '|-') and ($terminator ne '|}'); # we seem to have run out of table.
$name =~ s/\A\|\s*//;
$name =~ s/\A\*\*(.*?)\*\*/$1/;
$name =~ s/\A\'\'\'(.*?)\'\'\'/$1/;
$desc =~ s/\A\|\s*//;
$desc = dewikify($wikitype, $desc);
#print STDERR "FN: $fn NAME: $name DESC: $desc TERM: $terminator\n";
$str .= ".TP\n";
$str .= ".I $name\n";
$str .= "$desc\n";
}
} else {
die("write me");
}
}
if (defined $returns) {
$str .= ".SH RETURN VALUE\n";
$str .= dewikify($wikitype, $returns) . "\n";
}
if (defined $examples) {
$str .= ".SH CODE EXAMPLES\n";
$dewikify_manpage_code_indent = 0;
$str .= dewikify($wikitype, $examples) . "\n";
$dewikify_manpage_code_indent = 1;
}
if (defined $version) {
$str .= ".SH AVAILABILITY\n";
$str .= dewikify($wikitype, $version) . "\n";
}
if (defined $related) {
$str .= ".SH SEE ALSO\n";
# !!! FIXME: lots of code duplication in all of these.
my $v = dewikify($wikitype, $related);
my @desclines = split /\n/, $v;
my $nextstr = '';
foreach (@desclines) {
s/\A(\:|\* )//;
s/\(\)\Z//; # Convert "SDL_Func()" to "SDL_Func"
s/\A\.BR\s+//; # dewikify added this, but we want to handle it.
s/\A\s+//;
s/\s+\Z//;
next if $_ eq '';
$str .= "$nextstr.BR $_ (3)";
$nextstr = ",\n";
}
$str .= "\n";
}
if (0) {
$str .= ".SH COPYRIGHT\n";
$str .= "This manpage is licensed under\n";
$str .= ".UR https://creativecommons.org/licenses/by/4.0/\n";
$str .= "Creative Commons Attribution 4.0 International (CC BY 4.0)\n";
$str .= ".UE\n";
$str .= ".PP\n";
$str .= "This manpage was generated from\n";
$str .= ".UR https://wiki.libsdl.org/$fn\n";
$str .= "SDL's wiki\n";
$str .= ".UE\n";
$str .= "using SDL/build-scripts/wikiheaders.pl";
$str .= " revision $gitrev" if $gitrev ne '';
$str .= ".\n";
$str .= "Please report issues in this manpage at\n";
$str .= ".UR https://github.com/libsdl-org/sdlwiki/issues/new\n";
$str .= "our bugtracker!\n";
$str .= ".UE\n";
}
my $path = "$manpath/$_.3.tmp";
open(FH, '>', $path) or die("Can't open '$path': $!\n");
print FH $str;
close(FH);
rename($path, "$manpath/$_.3") or die("Can't rename '$path' to '$manpath/$_.3': $!\n");
}
}
# end of wikiheaders.pl ...
@echo off
rem just a helper batch file for collecting up files and zipping them.
rem usage: windows-buildbot-zipper.bat <target> <slndir> <zipfilename>
rem must be run from root of SDL source tree.
IF EXIST %2\%1\Release GOTO okaydir
echo Please run from root of source tree after doing a Release build.
GOTO done
:okaydir
erase /q /f /s zipper
IF EXIST zipper GOTO zippermade
mkdir zipper
:zippermade
mkdir zipper\SDL
mkdir zipper\SDL\include
mkdir zipper\SDL\lib
copy include\*.h include\
copy %2\%1\Release\SDL2.dll zipper\SDL\lib\
copy %2\%1\Release\SDL2.lib zipper\SDL\lib\
copy %2\%1\Release\SDL2main.lib zipper\SDL\lib\
cd zipper
zip -9r ..\%3 SDL
cd ..
erase /q /f /s zipper
:done
@ECHO OFF
REM
REM winrtbuild.bat: a batch file to help launch the winrtbuild.ps1
REM Powershell script, either from Windows Explorer, or through Buildbot.
REM
SET ThisScriptsDirectory=%~dp0
SET PowerShellScriptPath=%ThisScriptsDirectory%winrtbuild.ps1
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& '%PowerShellScriptPath%'";
\ No newline at end of file
#
# winrtbuild.ps1 -- A Powershell script to build all SDL/WinRT variants,
# across all WinRT platforms, in all of their supported, CPU architectures.
#
# Initial version written by David Ludwig <dludwig@pobox.com>
#
# This script can be launched from Windows Explorer by double-clicking
# on winrtbuild.bat
#
# Output will be placed in the following subdirectories of the SDL source
# tree:
# * VisualC-WinRT\lib\ -- final .dll, .lib, and .pdb files
# * VisualC-WinRT\obj\ -- intermediate build files
#
# Recommended Dependencies:
# * Windows 8.1 or higher
# * Powershell 4.0 or higher (included as part of Windows 8.1)
# * Visual C++ 2012, for building Windows 8.0 and Windows Phone 8.0 binaries.
# * Visual C++ 2013, for building Windows 8.1 and Windows Phone 8.1 binaries
# * SDKs for Windows 8.0, Windows 8.1, Windows Phone 8.0, and
# Windows Phone 8.1, as needed
#
# Commom parameters/variables may include, but aren't strictly limited to:
# * PlatformToolset: the name of one of Visual Studio's build platforms.
# Different PlatformToolsets output different binaries. One
# PlatformToolset exists for each WinRT platform. Possible values
# may include:
# - "v110": Visual Studio 2012 build tools, plus the Windows 8.0 SDK
# - "v110_wp80": Visual Studio 2012 build tools, plus the Windows Phone 8.0 SDK
# - "v120": Visual Studio 2013 build tools, plus the Windows 8.1 SDK
# - "v120_wp81": Visual Studio 2013 build tools, plus the Windows Phone 8.1 SDK
# * VSProjectPath: the full path to a Visual Studio or Visual C++ project file
# * VSProjectName: the internal name of a Visual Studio or Visual C++ project
# file. Some of Visual Studio's own build tools use this name when
# calculating paths for build-output.
# * Platform: a Visual Studio platform name, which often maps to a CPU
# CPU architecture. Possible values may include: "Win32" (for 32-bit x86),
# "ARM", or "x64" (for 64-bit x86).
#
# Base version of SDL, used for packaging purposes
$SDLVersion = "2.0.20"
# Gets the .bat file that sets up an MSBuild environment, given one of
# Visual Studio's, "PlatformToolset"s.
function Get-MSBuild-Env-Launcher
{
param(
[Parameter(Mandatory=$true,Position=1)][string]$PlatformToolset
)
if ($PlatformToolset -eq "v110") { # Windows 8.0 (not Windows Phone), via VS 2012
return "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"
}
if ($PlatformToolset -eq "v110_wp80") { # Windows Phone 8.0, via VS 2012
return "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\WPSDK\WP80\vcvarsphoneall.bat"
}
if ($PlatformToolset -eq "v120") { # Windows 8.1 (not Windows Phone), via VS 2013
return "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
}
if ($PlatformToolset -eq "v120_wp81") { # Windows Phone 8.1, via VS 2013
return "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
}
if ($PlatformToolset -eq "v140") { # Windows 10, via VS 2015
return "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
}
return ""
}
# Gets a string that identifies the build-variant of SDL/WinRT that is specific
# to a particular Visual Studio PlatformToolset.
function Get-SDL-WinRT-Variant-Name
{
param(
[Parameter(Mandatory=$true,Position=1)][string]$PlatformToolset,
# If true, append a string to this function's output, identifying the
# build-variant's minimum-supported version of Visual Studio.
[switch]$IncludeVSSuffix = $false
)
if ($PlatformToolset -eq "v110") { # Windows 8.0 (not Windows Phone), via VS 2012 project files
if ($IncludeVSSuffix) {
return "WinRT80_VS2012"
} else {
return "WinRT80"
}
}
if ($PlatformToolset -eq "v110_wp80") { # Windows Phone 8.0, via VS 2012 project files
if ($IncludeVSSuffix) {
return "WinPhone80_VS2012"
} else {
return "WinPhone80"
}
}
if ($PlatformToolset -eq "v120") { # Windows 8.1 (not Windows Phone), via VS 2013 project files
if ($IncludeVSSuffix) {
return "WinRT81_VS2013"
} else {
return "WinRT81"
}
}
if ($PlatformToolset -eq "v120_wp81") { # Windows Phone 8.1, via VS 2013 project files
if ($IncludeVSSuffix) {
return "WinPhone81_VS2013"
} else {
return "WinPhone81"
}
}
if ($PlatformToolset -eq "v140") { # Windows 10, via VS 2015 project files
if ($IncludeVSSuffix) {
return "UWP_VS2015"
} else {
return "UWP"
}
}
return ""
}
# Returns the internal name of a Visual Studio Project.
#
# The internal name of a VS Project is encoded inside the project file
# itself, inside a set of <ProjectName></ProjectName> XML tags.
function Get-VS-ProjectName
{
param(
[Parameter(Mandatory=$true,Position=1)]$VSProjectPath
)
# For now, just do a regex for the project name:
$matches = (Get-Content $VSProjectPath | Select-String -Pattern ".*<ProjectName>([^<]+)<.*").Matches
foreach ($match in $matches) {
if ($match.Groups.Count -ge 1) {
return $match.Groups[1].Value
}
}
return $null
}
# Build a specific variant of SDL/WinRT
function Build-SDL-WinRT-Variant
{
#
# Read in arguments:
#
param (
# name of an SDL project file, minus extensions and
# platform-identifying suffixes
[Parameter(Mandatory=$true,Position=1)][string]$SDLProjectName,
[Parameter(Mandatory=$true,Position=2)][string]$PlatformToolset,
[Parameter(Mandatory=$true,Position=3)][string]$Platform
)
#
# Derive other properties from read-in arguments:
#
# The .bat file to setup a platform-appropriate MSBuild environment:
$BatchFileForMSBuildEnv = Get-MSBuild-Env-Launcher $PlatformToolset
# The full path to the VS Project that'll be built:
$VSProjectPath = "$PSScriptRoot\..\VisualC-WinRT\$(Get-SDL-WinRT-Variant-Name $PlatformToolset -IncludeVSSuffix)\$SDLProjectName-$(Get-SDL-WinRT-Variant-Name $PlatformToolset).vcxproj"
# The internal name of the VS Project, used in some post-build steps:
$VSProjectName = Get-VS-ProjectName $VSProjectPath
# Where to place output binaries (.dll, .lib, and .pdb files):
$OutDir = "$PSScriptRoot\..\VisualC-WinRT\lib\$(Get-SDL-WinRT-Variant-Name $PlatformToolset)\$Platform"
# Where to place intermediate build files:
$IntermediateDir = "$PSScriptRoot\..\VisualC-WinRT\obj\$SDLProjectName-$(Get-SDL-WinRT-Variant-Name $PlatformToolset)\$Platform"
#
# Build the VS Project:
#
cmd.exe /c " ""$BatchFileForMSBuildEnv"" x86 & msbuild ""$VSProjectPath"" /p:Configuration=Release /p:Platform=$Platform /p:OutDir=""$OutDir\\"" /p:IntDir=""$IntermediateDir\\""" | Out-Host
$BuildResult = $?
#
# Move .dll files into place. This fixes a problem whereby MSBuild may
# put output files into a sub-directory of $OutDir, rather than $OutDir
# itself.
#
if (Test-Path "$OutDir\$VSProjectName\") {
Move-Item -Force "$OutDir\$VSProjectName\*" "$OutDir"
}
#
# Clean up unneeded files in $OutDir:
#
if (Test-Path "$OutDir\$VSProjectName\") {
Remove-Item -Recurse "$OutDir\$VSProjectName"
}
Remove-Item "$OutDir\*.exp"
Remove-Item "$OutDir\*.ilk"
Remove-Item "$OutDir\*.pri"
#
# All done. Indicate success, or failure, to the caller:
#
#echo "RESULT: $BuildResult" | Out-Host
return $BuildResult
}
#
# Build each variant, with corresponding .dll, .lib, and .pdb files:
#
$DidAnyDLLBuildFail = $false
$DidAnyNugetBuildFail = $false
# Ryan disabled WP8.0, because it doesn't appear to have mmdeviceapi.h that SDL_wasapi needs.
# My assumption is that no one will miss this, but send patches otherwise! --ryan.
# Build for Windows Phone 8.0, via VC++ 2012:
#if ( ! (Build-SDL-WinRT-Variant "SDL" "v110_wp80" "ARM")) { $DidAnyDLLBuildFail = $true }
#if ( ! (Build-SDL-WinRT-Variant "SDL" "v110_wp80" "Win32")) { $DidAnyDLLBuildFail = $true }
# Build for Windows Phone 8.1, via VC++ 2013:
if ( ! (Build-SDL-WinRT-Variant "SDL" "v120_wp81" "ARM")) { $DidAnyDLLBuildFail = $true }
if ( ! (Build-SDL-WinRT-Variant "SDL" "v120_wp81" "Win32")) { $DidAnyDLLBuildFail = $true }
# Build for Windows 8.0 and Windows RT 8.0, via VC++ 2012:
#
# Win 8.0 auto-building was disabled on 2017-Feb-25, by David Ludwig <dludwig@pobox.com>.
# Steam's OS-usage surveys indicate that Windows 8.0 use is pretty much nil, plus
# Microsoft hasn't supported Windows 8.0 development for a few years now.
# The commented-out lines below may still work on some systems, though.
#
#if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "ARM")) { $DidAnyDLLBuildFail = $true }
#if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "Win32")) { $DidAnyDLLBuildFail = $true }
#if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "x64")) { $DidAnyDLLBuildFail = $true }
# Build for Windows 8.1 and Windows RT 8.1, via VC++ 2013:
if ( ! (Build-SDL-WinRT-Variant "SDL" "v120" "ARM")) { $DidAnyDLLBuildFail = $true }
if ( ! (Build-SDL-WinRT-Variant "SDL" "v120" "Win32")) { $DidAnyDLLBuildFail = $true }
if ( ! (Build-SDL-WinRT-Variant "SDL" "v120" "x64")) { $DidAnyDLLBuildFail = $true }
# Build for Windows 10, via VC++ 2015
if ( ! (Build-SDL-WinRT-Variant "SDL" "v140" "ARM")) { $DidAnyDLLBuildFail = $true }
if ( ! (Build-SDL-WinRT-Variant "SDL" "v140" "Win32")) { $DidAnyDLLBuildFail = $true }
if ( ! (Build-SDL-WinRT-Variant "SDL" "v140" "x64")) { $DidAnyDLLBuildFail = $true }
# Build NuGet packages, if possible
if ($DidAnyDLLBuildFail -eq $true) {
Write-Warning -Message "Unable to build all variants. NuGet packages will not be built."
$DidAnyNugetBuildFail = $true
} else {
$NugetPath = (Get-Command -CommandType Application nuget.exe | %{$_.Path}) 2> $null
if ("$NugetPath" -eq "") {
Write-Warning -Message "Unable to find nuget.exe. NuGet packages will not be built."
$DidAnyNugetBuildFail = $true
} else {
Write-Host -ForegroundColor Cyan "Building SDL2 NuGet packages..."
Write-Host -ForegroundColor Cyan "... via NuGet install: $NugetPath"
$NugetOutputDir = "$PSScriptRoot\..\VisualC-WinRT\lib\nuget"
Write-Host -ForegroundColor Cyan "... output directory: $NugetOutputDir"
$SDLHGRevision = $($(hg log -l 1 --repository "$PSScriptRoot\.." | select-string "changeset") -Replace "changeset:\W*(\d+).*",'$1') 2>$null
Write-Host -ForegroundColor Cyan "... HG Revision: $SDLHGRevision"
# Base options to nuget.exe
$NugetOptions = @("pack", "PACKAGE_NAME_WILL_GO_HERE", "-Output", "$NugetOutputDir")
# Try attaching hg revision to NuGet package:
$NugetOptions += "-Version"
if ("$SDLHGRevision" -eq "") {
Write-Warning -Message "Unable to find the Mercurial revision (maybe hg.exe can't be found?). NuGet packages will not have this attached to their name."
$NugetOptions += "$SDLVersion-Unofficial"
} else {
$NugetOptions += "$SDLVersion.$SDLHGRevision-Unofficial"
}
# Create NuGet output dir, if not yet created:
if ($(Test-Path "$NugetOutputDir") -eq $false) {
New-Item "$NugetOutputDir" -type directory
}
# Package SDL2:
$NugetOptions[1] = "$PSScriptRoot\..\VisualC-WinRT\SDL2-WinRT.nuspec"
&"$NugetPath" $NugetOptions -Symbols
if ( ! $? ) { $DidAnyNugetBuildFail = $true }
# Package SDL2main:
$NugetOptions[1] = "$PSScriptRoot\..\VisualC-WinRT\SDL2main-WinRT-NonXAML.nuspec"
&"$NugetPath" $NugetOptions
if ( ! $? ) { $DidAnyNugetBuildFail = $true }
}
}
# Let the script's caller know whether or not any errors occurred.
# Exit codes compatible with Buildbot are used (1 for error, 0 for success).
if ($DidAnyDLLBuildFail -eq $true) {
Write-Error -Message "Unable to build all known variants of SDL2 for WinRT"
exit 1
} elseif ($DidAnyNugetBuildFail -eq $true) {
Write-Warning -Message "Unable to build NuGet packages"
exit 0 # Should NuGet package build failure lead to a non-failing result code instead?
} else {
exit 0
}
build/SDL.lo: /home/aalbiez/sokoban-projet/SDL2/src/SDL.c \
/home/aalbiez/sokoban-projet/SDL2/src/./SDL_internal.h \
/home/aalbiez/sokoban-projet/SDL2/src/./dynapi/SDL_dynapi.h \
/home/aalbiez/sokoban-projet/SDL2/src/./dynapi/SDL_dynapi_overrides.h \
include/SDL_config.h include/SDL_platform.h include/begin_code.h \
include/close_code.h include/SDL_assert.h include/SDL_config.h \
include/SDL_log.h include/SDL_stdinc.h \
/home/aalbiez/sokoban-projet/SDL2/src/core/linux/SDL_dbus.h \
/home/aalbiez/sokoban-projet/SDL2/src/core/linux/../../SDL_internal.h \
include/SDL.h include/SDL_main.h include/SDL_assert.h \
include/SDL_atomic.h include/SDL_audio.h include/SDL_error.h \
include/SDL_endian.h include/SDL_mutex.h include/SDL_thread.h \
include/SDL_rwops.h include/SDL_clipboard.h include/SDL_cpuinfo.h \
include/SDL_events.h include/SDL_video.h include/SDL_pixels.h \
include/SDL_rect.h include/SDL_surface.h include/SDL_blendmode.h \
include/SDL_keyboard.h include/SDL_keycode.h include/SDL_scancode.h \
include/SDL_mouse.h include/SDL_joystick.h include/SDL_gamecontroller.h \
include/SDL_sensor.h include/SDL_quit.h include/SDL_gesture.h \
include/SDL_touch.h include/SDL_filesystem.h include/SDL_haptic.h \
include/SDL_hidapi.h include/SDL_hints.h include/SDL_loadso.h \
include/SDL_log.h include/SDL_messagebox.h include/SDL_metal.h \
include/SDL_power.h include/SDL_render.h include/SDL_shape.h \
include/SDL_system.h include/SDL_timer.h include/SDL_version.h \
include/SDL_locale.h include/SDL_misc.h include/SDL_bits.h \
include/SDL_revision.h \
/home/aalbiez/sokoban-projet/SDL2/src/SDL_assert_c.h \
/home/aalbiez/sokoban-projet/SDL2/src/events/SDL_events_c.h \
/home/aalbiez/sokoban-projet/SDL2/src/events/../SDL_internal.h \
include/SDL_events.h include/SDL_thread.h \
/home/aalbiez/sokoban-projet/SDL2/src/events/../video/SDL_sysvideo.h \
/home/aalbiez/sokoban-projet/SDL2/src/events/../video/../SDL_internal.h \
include/SDL_messagebox.h include/SDL_shape.h include/SDL_metal.h \
/home/aalbiez/sokoban-projet/SDL2/src/events/../video/SDL_vulkan_internal.h \
include/SDL_stdinc.h \
/home/aalbiez/sokoban-projet/SDL2/src/events/../video/./khronos/vulkan/vulkan.h \
/home/aalbiez/sokoban-projet/SDL2/src/events/../video/./khronos/vulkan/vk_platform.h \
/home/aalbiez/sokoban-projet/SDL2/src/events/../video/./khronos/vulkan/vulkan_core.h \
/home/aalbiez/sokoban-projet/SDL2/src/events/../video/./khronos/vulkan/vulkan_xcb.h \
/home/aalbiez/sokoban-projet/SDL2/src/events/../video/./khronos/vulkan/vulkan_xlib.h \
include/SDL_vulkan.h \
/home/aalbiez/sokoban-projet/SDL2/src/events/SDL_clipboardevents_c.h \
/home/aalbiez/sokoban-projet/SDL2/src/events/SDL_displayevents_c.h \
/home/aalbiez/sokoban-projet/SDL2/src/events/SDL_dropevents_c.h \
/home/aalbiez/sokoban-projet/SDL2/src/events/SDL_gesture_c.h \
/home/aalbiez/sokoban-projet/SDL2/src/events/SDL_keyboard_c.h \
include/SDL_keycode.h \
/home/aalbiez/sokoban-projet/SDL2/src/events/SDL_mouse_c.h \
include/SDL_mouse.h \
/home/aalbiez/sokoban-projet/SDL2/src/events/SDL_touch_c.h \
/home/aalbiez/sokoban-projet/SDL2/src/events/../../include/SDL_touch.h \
/home/aalbiez/sokoban-projet/SDL2/src/events/SDL_windowevents_c.h \
/home/aalbiez/sokoban-projet/SDL2/src/haptic/SDL_haptic_c.h \
/home/aalbiez/sokoban-projet/SDL2/src/joystick/SDL_joystick_c.h \
/home/aalbiez/sokoban-projet/SDL2/src/joystick/../SDL_internal.h \
include/SDL_gamecontroller.h include/SDL_joystick.h \
/home/aalbiez/sokoban-projet/SDL2/src/sensor/SDL_sensor_c.h \
include/SDL_sensor.h \
/home/aalbiez/sokoban-projet/SDL2/src/timer/SDL_timer_c.h \
/home/aalbiez/sokoban-projet/SDL2/src/timer/../SDL_internal.h \
include/SDL_timer.h
build/SDL_RLEaccel.lo: \
/home/aalbiez/sokoban-projet/SDL2/src/video/SDL_RLEaccel.c \
/home/aalbiez/sokoban-projet/SDL2/src/video/../SDL_internal.h \
/home/aalbiez/sokoban-projet/SDL2/src/video/../dynapi/SDL_dynapi.h \
/home/aalbiez/sokoban-projet/SDL2/src/video/../dynapi/SDL_dynapi_overrides.h \
include/SDL_config.h include/SDL_platform.h include/begin_code.h \
include/close_code.h include/SDL_assert.h include/SDL_config.h \
include/SDL_log.h include/SDL_stdinc.h include/SDL_video.h \
include/SDL_pixels.h include/SDL_endian.h include/SDL_rect.h \
include/SDL_error.h include/SDL_rwops.h include/SDL_surface.h \
include/SDL_blendmode.h \
/home/aalbiez/sokoban-projet/SDL2/src/video/SDL_sysvideo.h \
include/SDL_messagebox.h include/SDL_video.h include/SDL_shape.h \
include/SDL_thread.h include/SDL_atomic.h include/SDL_mutex.h \
include/SDL_metal.h \
/home/aalbiez/sokoban-projet/SDL2/src/video/SDL_vulkan_internal.h \
include/SDL_stdinc.h \
/home/aalbiez/sokoban-projet/SDL2/src/video/./khronos/vulkan/vulkan.h \
/home/aalbiez/sokoban-projet/SDL2/src/video/./khronos/vulkan/vk_platform.h \
/home/aalbiez/sokoban-projet/SDL2/src/video/./khronos/vulkan/vulkan_core.h \
/home/aalbiez/sokoban-projet/SDL2/src/video/./khronos/vulkan/vulkan_xcb.h \
/home/aalbiez/sokoban-projet/SDL2/src/video/./khronos/vulkan/vulkan_xlib.h \
include/SDL_vulkan.h \
/home/aalbiez/sokoban-projet/SDL2/src/video/SDL_blit.h \
include/SDL_cpuinfo.h include/SDL_endian.h include/SDL_surface.h \
/home/aalbiez/sokoban-projet/SDL2/src/video/SDL_RLEaccel_c.h
build/SDL_assert.lo: /home/aalbiez/sokoban-projet/SDL2/src/SDL_assert.c \
/home/aalbiez/sokoban-projet/SDL2/src/./SDL_internal.h \
/home/aalbiez/sokoban-projet/SDL2/src/./dynapi/SDL_dynapi.h \
/home/aalbiez/sokoban-projet/SDL2/src/./dynapi/SDL_dynapi_overrides.h \
include/SDL_config.h include/SDL_platform.h include/begin_code.h \
include/close_code.h include/SDL_assert.h include/SDL_config.h \
include/SDL_log.h include/SDL_stdinc.h include/SDL.h include/SDL_main.h \
include/SDL_assert.h include/SDL_atomic.h include/SDL_audio.h \
include/SDL_error.h include/SDL_endian.h include/SDL_mutex.h \
include/SDL_thread.h include/SDL_rwops.h include/SDL_clipboard.h \
include/SDL_cpuinfo.h include/SDL_events.h include/SDL_video.h \
include/SDL_pixels.h include/SDL_rect.h include/SDL_surface.h \
include/SDL_blendmode.h include/SDL_keyboard.h include/SDL_keycode.h \
include/SDL_scancode.h include/SDL_mouse.h include/SDL_joystick.h \
include/SDL_gamecontroller.h include/SDL_sensor.h include/SDL_quit.h \
include/SDL_gesture.h include/SDL_touch.h include/SDL_filesystem.h \
include/SDL_haptic.h include/SDL_hidapi.h include/SDL_hints.h \
include/SDL_loadso.h include/SDL_log.h include/SDL_messagebox.h \
include/SDL_metal.h include/SDL_power.h include/SDL_render.h \
include/SDL_shape.h include/SDL_system.h include/SDL_timer.h \
include/SDL_version.h include/SDL_locale.h include/SDL_misc.h \
include/SDL_atomic.h include/SDL_messagebox.h include/SDL_video.h \
/home/aalbiez/sokoban-projet/SDL2/src/SDL_assert_c.h \
/home/aalbiez/sokoban-projet/SDL2/src/video/SDL_sysvideo.h \
/home/aalbiez/sokoban-projet/SDL2/src/video/../SDL_internal.h \
include/SDL_shape.h include/SDL_thread.h include/SDL_metal.h \
/home/aalbiez/sokoban-projet/SDL2/src/video/SDL_vulkan_internal.h \
include/SDL_stdinc.h \
/home/aalbiez/sokoban-projet/SDL2/src/video/./khronos/vulkan/vulkan.h \
/home/aalbiez/sokoban-projet/SDL2/src/video/./khronos/vulkan/vk_platform.h \
/home/aalbiez/sokoban-projet/SDL2/src/video/./khronos/vulkan/vulkan_core.h \
/home/aalbiez/sokoban-projet/SDL2/src/video/./khronos/vulkan/vulkan_xcb.h \
/home/aalbiez/sokoban-projet/SDL2/src/video/./khronos/vulkan/vulkan_xlib.h \
include/SDL_vulkan.h
build/SDL_atomic.lo: \
/home/aalbiez/sokoban-projet/SDL2/src/atomic/SDL_atomic.c \
/home/aalbiez/sokoban-projet/SDL2/src/atomic/../SDL_internal.h \
/home/aalbiez/sokoban-projet/SDL2/src/atomic/../dynapi/SDL_dynapi.h \
/home/aalbiez/sokoban-projet/SDL2/src/atomic/../dynapi/SDL_dynapi_overrides.h \
include/SDL_config.h include/SDL_platform.h include/begin_code.h \
include/close_code.h include/SDL_assert.h include/SDL_config.h \
include/SDL_log.h include/SDL_stdinc.h include/SDL_atomic.h
build/SDL_audio.lo: \
/home/aalbiez/sokoban-projet/SDL2/src/audio/SDL_audio.c \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../SDL_internal.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../dynapi/SDL_dynapi.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../dynapi/SDL_dynapi_overrides.h \
include/SDL_config.h include/SDL_platform.h include/begin_code.h \
include/close_code.h include/SDL_assert.h include/SDL_config.h \
include/SDL_log.h include/SDL_stdinc.h include/SDL.h include/SDL_main.h \
include/SDL_assert.h include/SDL_atomic.h include/SDL_audio.h \
include/SDL_error.h include/SDL_endian.h include/SDL_mutex.h \
include/SDL_thread.h include/SDL_rwops.h include/SDL_clipboard.h \
include/SDL_cpuinfo.h include/SDL_events.h include/SDL_video.h \
include/SDL_pixels.h include/SDL_rect.h include/SDL_surface.h \
include/SDL_blendmode.h include/SDL_keyboard.h include/SDL_keycode.h \
include/SDL_scancode.h include/SDL_mouse.h include/SDL_joystick.h \
include/SDL_gamecontroller.h include/SDL_sensor.h include/SDL_quit.h \
include/SDL_gesture.h include/SDL_touch.h include/SDL_filesystem.h \
include/SDL_haptic.h include/SDL_hidapi.h include/SDL_hints.h \
include/SDL_loadso.h include/SDL_log.h include/SDL_messagebox.h \
include/SDL_metal.h include/SDL_power.h include/SDL_render.h \
include/SDL_shape.h include/SDL_system.h include/SDL_timer.h \
include/SDL_version.h include/SDL_locale.h include/SDL_misc.h \
include/SDL_audio.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/SDL_audio_c.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/SDL_sysaudio.h \
include/SDL_mutex.h include/SDL_thread.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../SDL_dataqueue.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/./SDL_audio_c.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../thread/SDL_systhread.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../thread/../SDL_internal.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../thread/SDL_thread_c.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../thread/pthread/SDL_systhread_c.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../thread/pthread/../../SDL_internal.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../thread/../SDL_error_c.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../thread/.././SDL_internal.h
build/SDL_audiocvt.lo: \
/home/aalbiez/sokoban-projet/SDL2/src/audio/SDL_audiocvt.c \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../SDL_internal.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../dynapi/SDL_dynapi.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../dynapi/SDL_dynapi_overrides.h \
include/SDL_config.h include/SDL_platform.h include/begin_code.h \
include/close_code.h include/SDL_assert.h include/SDL_config.h \
include/SDL_log.h include/SDL_stdinc.h include/SDL.h include/SDL_main.h \
include/SDL_assert.h include/SDL_atomic.h include/SDL_audio.h \
include/SDL_error.h include/SDL_endian.h include/SDL_mutex.h \
include/SDL_thread.h include/SDL_rwops.h include/SDL_clipboard.h \
include/SDL_cpuinfo.h include/SDL_events.h include/SDL_video.h \
include/SDL_pixels.h include/SDL_rect.h include/SDL_surface.h \
include/SDL_blendmode.h include/SDL_keyboard.h include/SDL_keycode.h \
include/SDL_scancode.h include/SDL_mouse.h include/SDL_joystick.h \
include/SDL_gamecontroller.h include/SDL_sensor.h include/SDL_quit.h \
include/SDL_gesture.h include/SDL_touch.h include/SDL_filesystem.h \
include/SDL_haptic.h include/SDL_hidapi.h include/SDL_hints.h \
include/SDL_loadso.h include/SDL_log.h include/SDL_messagebox.h \
include/SDL_metal.h include/SDL_power.h include/SDL_render.h \
include/SDL_shape.h include/SDL_system.h include/SDL_timer.h \
include/SDL_version.h include/SDL_locale.h include/SDL_misc.h \
include/SDL_audio.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/SDL_audio_c.h \
include/SDL_loadso.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../SDL_dataqueue.h \
include/SDL_cpuinfo.h
build/SDL_audiodev.lo: \
/home/aalbiez/sokoban-projet/SDL2/src/audio/SDL_audiodev.c \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../SDL_internal.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../dynapi/SDL_dynapi.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../dynapi/SDL_dynapi_overrides.h \
include/SDL_config.h include/SDL_platform.h include/begin_code.h \
include/close_code.h include/SDL_assert.h include/SDL_config.h \
include/SDL_log.h include/SDL_stdinc.h include/SDL_stdinc.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/SDL_audiodev_c.h \
include/SDL.h include/SDL_main.h include/SDL_assert.h \
include/SDL_atomic.h include/SDL_audio.h include/SDL_error.h \
include/SDL_endian.h include/SDL_mutex.h include/SDL_thread.h \
include/SDL_rwops.h include/SDL_clipboard.h include/SDL_cpuinfo.h \
include/SDL_events.h include/SDL_video.h include/SDL_pixels.h \
include/SDL_rect.h include/SDL_surface.h include/SDL_blendmode.h \
include/SDL_keyboard.h include/SDL_keycode.h include/SDL_scancode.h \
include/SDL_mouse.h include/SDL_joystick.h include/SDL_gamecontroller.h \
include/SDL_sensor.h include/SDL_quit.h include/SDL_gesture.h \
include/SDL_touch.h include/SDL_filesystem.h include/SDL_haptic.h \
include/SDL_hidapi.h include/SDL_hints.h include/SDL_loadso.h \
include/SDL_log.h include/SDL_messagebox.h include/SDL_metal.h \
include/SDL_power.h include/SDL_render.h include/SDL_shape.h \
include/SDL_system.h include/SDL_timer.h include/SDL_version.h \
include/SDL_locale.h include/SDL_misc.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/SDL_sysaudio.h \
include/SDL_mutex.h include/SDL_thread.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../SDL_dataqueue.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/./SDL_audio_c.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/./../SDL_internal.h
build/SDL_audiotypecvt.lo: \
/home/aalbiez/sokoban-projet/SDL2/src/audio/SDL_audiotypecvt.c \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../SDL_internal.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../dynapi/SDL_dynapi.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/../dynapi/SDL_dynapi_overrides.h \
include/SDL_config.h include/SDL_platform.h include/begin_code.h \
include/close_code.h include/SDL_assert.h include/SDL_config.h \
include/SDL_log.h include/SDL_stdinc.h include/SDL_audio.h \
include/SDL_error.h include/SDL_endian.h include/SDL_mutex.h \
include/SDL_thread.h include/SDL_atomic.h include/SDL_rwops.h \
/home/aalbiez/sokoban-projet/SDL2/src/audio/SDL_audio_c.h \
include/SDL_cpuinfo.h
build/SDL_blendfillrect.lo: \
/home/aalbiez/sokoban-projet/SDL2/src/render/software/SDL_blendfillrect.c \
/home/aalbiez/sokoban-projet/SDL2/src/render/software/../../SDL_internal.h \
/home/aalbiez/sokoban-projet/SDL2/src/render/software/../../dynapi/SDL_dynapi.h \
/home/aalbiez/sokoban-projet/SDL2/src/render/software/../../dynapi/SDL_dynapi_overrides.h \
include/SDL_config.h include/SDL_platform.h include/begin_code.h \
include/close_code.h include/SDL_assert.h include/SDL_config.h \
include/SDL_log.h include/SDL_stdinc.h \
/home/aalbiez/sokoban-projet/SDL2/src/render/software/SDL_draw.h \
/home/aalbiez/sokoban-projet/SDL2/src/render/software/../../video/SDL_blit.h \
/home/aalbiez/sokoban-projet/SDL2/src/render/software/../../video/../SDL_internal.h \
include/SDL_cpuinfo.h include/SDL_endian.h include/SDL_surface.h \
include/SDL_pixels.h include/SDL_endian.h include/SDL_rect.h \
include/SDL_error.h include/SDL_rwops.h include/SDL_blendmode.h \
/home/aalbiez/sokoban-projet/SDL2/src/render/software/SDL_blendfillrect.h