Fix Issue #195 - need to sort extensions by name, rather than path

This commit is contained in:
Nigel Stewart 2018-10-10 16:12:24 +10:00
parent bc3c5d4992
commit 14e212406c
3 changed files with 6 additions and 4 deletions

View File

@ -193,7 +193,7 @@ $(S.DEST)/glew.c: $(EXT)/.dummy
$(BIN)/make_def_var.pl GL $(GL_EXT_SPEC) >> $@
echo -e "\nstatic const char * _glewExtensionLookup[] = {" >> $@;
$(BIN)/make_index.pl $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
echo -e " NULL\n};\n" >> $@;
echo -e " NULL\n};\n\n" >> $@;
$(BIN)/make_enable_index.pl $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
$(BIN)/make_initd.pl GL $(GL_CORE_SPEC) >> $@
$(BIN)/make_initd.pl GL $(GL_EXT_SPEC) >> $@

View File

@ -9,6 +9,7 @@
use strict;
use warnings;
use File::Basename;
use lib '.';
do 'bin/make.pl';
@ -29,7 +30,7 @@ if (@ARGV)
print "/* Detected via extension string or experimental mode */\n";
print "static GLboolean* _glewExtensionEnabled[] = {\n";;
foreach my $ext (sort @extlist)
foreach my $ext (sort { basename($a) cmp basename($b) } @extlist)
{
my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) =
parse_ext($ext);
@ -42,5 +43,5 @@ if (@ARGV)
print "#endif\n";
}
print " NULL\n};\n";
print " NULL\n};\n\n";
}

View File

@ -9,6 +9,7 @@
use strict;
use warnings;
use File::Basename;
use lib '.';
do 'bin/make.pl';
@ -27,7 +28,7 @@ if (@ARGV)
{
@extlist = @ARGV;
foreach my $ext (sort @extlist)
foreach my $ext (sort { basename($a) cmp basename($b) } @extlist)
{
my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) =
parse_ext($ext);