/** provides the targets in the given Makefile content, sorted alphabetically */ export function makefileTargets ( text ) { return text . split ( "\n" ) . filter ( ( line ) => ! line . startsWith ( "\t" ) ) . filter ( ( line ) => ! line . startsWith ( "." ) ) . filter ( ( line ) => line . includes ( ":" ) ) . map ( ( line ) => line . split ( ":" ) [ 0 ] ) . map ( ( line ) => line . trim ( ) ) . filter ( ( line ) => line . length > 0 ) . sort ( ) ; }