# Stuff needed for glossaries.
# Taken from https://tex.stackexchange.com/questions/1226/how-to-make-latexmk-use-makeglossaries

add_cus_dep( 'acn', 'acr', 0, 'makeglossaries' );
add_cus_dep( 'glo', 'gls', 0, 'makeglossaries' );
$clean_ext .= " acr acn alg glo gls glg";
sub makeglossaries {
  my ($base_name, $path) = fileparse( $_[0] );
  pushd $path;
  my $return = system "makeglossaries", $base_name;
  popd;
  return $return;
}

# Stuff needed to run axodraw2 - taken from the manual.
add_cus_dep( "ax1", "ax2", 0, "axohelp" );
sub axohelp { return system "axohelp \"$_[0]\""; }
$clean_ext .= " %R.ax1 %R.ax2";
