@@ -59,6 +59,7 @@ push @incs, '.', 'libsass/include';
59
59
60
60
# query version of libsass dep
61
61
my $libsass_version = ' [na]' ;
62
+ my $sassc_version = ' [na]' ;
62
63
63
64
sub help
64
65
{
@@ -237,7 +238,6 @@ if (-d ".git" && !$skip_git)
237
238
open $manifest , " >:encoding(UTF-8)" , " MANIFEST" ;
238
239
die " could not create MANIFEST: $! " unless $manifest ;
239
240
print $manifest " MANIFEST\n " ;
240
- print $manifest " libsass/VERSION\n " ;
241
241
while (my $module = shift @modules )
242
242
{
243
243
my $cwd = Cwd::getcwd;
@@ -249,7 +249,7 @@ if (-d ".git" && !$skip_git)
249
249
}
250
250
my @items = split (/ \n +/ , $files );
251
251
my @files = grep { ! -d } @items ;
252
- print $manifest grep { ! /\" / }
252
+ print $manifest grep { ! /\" / } # "
253
253
map { tr / \\/ \// ; $_ . " \n " }
254
254
map { File::Spec-> abs2rel($_ , $base ) } @files ;
255
255
push @modules ,
@@ -272,7 +272,8 @@ if (-d ".git" && !$skip_git)
272
272
foreach my $submodule (@submodules )
273
273
{
274
274
if (-e " $submodule /.git" && !$skip_version ) {
275
- next unless $submodule eq " libsass" ; # skip all others for now
275
+ next unless $submodule eq " libsass" || $submodule eq " plugins/sassc" ;
276
+ print $manifest " $submodule /VERSION\n " ;
276
277
system " git -C \" $submodule \" describe --abbrev=8 --dirty --always --tags > \" $submodule /VERSION\" " ;
277
278
}
278
279
}
@@ -288,11 +289,28 @@ if (-f "libsass/VERSION") {
288
289
$libsass_version = <$fh > if (defined $fh );
289
290
chomp ($libsass_version );
290
291
print " Detected libsass $libsass_version \n " ;
292
+ # create compile flags to include the libsass version
293
+ push @defs , qq( LIBSASS_VERSION=\\ "$libsass_version \\ ") ;
291
294
} else {
292
295
# give a warning if the version could not be determined (probably not generated yet)
293
296
warn " Could not get version for libsass (" , $libsass_version , " )\n " ;
294
297
}
295
298
299
+ if ($install_sassc ) {
300
+ # read version from version file
301
+ if (-f " plugins/sassc/VERSION" ) {
302
+ open (my $fh , " <" , " plugins/sassc/VERSION" );
303
+ $sassc_version = <$fh > if (defined $fh );
304
+ chomp ($sassc_version );
305
+ print " Detected sassc $sassc_version \n " ;
306
+ # create compile flags to include the libsass version
307
+ push @defs , qq( SASSC_VERSION=\\ "$sassc_version \\ ") ;
308
+ } else {
309
+ # give a warning if the version could not be determined (probably not generated yet)
310
+ warn " Could not get version for sassc (" , $sassc_version , " )\n " ;
311
+ }
312
+ }
313
+
296
314
# ###############################################################################
297
315
# compiler configurations
298
316
# ###############################################################################
@@ -358,9 +376,6 @@ push @flags, '-o $*.o' if ($guess->is_gcc);
358
376
# this fixes some clang issues (is detected as gcc)
359
377
# push @flags, '-stdlib=libstdc++' if ($guess->is_gcc);
360
378
361
- # create compile flags to include the libsass version
362
- push @defs , qq( LIBSASS_VERSION=\\ "$libsass_version \\ ") ;
363
-
364
379
# enable code profiling via gcov
365
380
$optimize = ' -O1' if $profiling ;
366
381
push @libs , ' -lgcov' if $profiling ;
0 commit comments