#include <assert.h>
#include <locale.h>
#include "proto.hh"
+#include "dimensions.hh"
#include "plist.hh"
#include "getopt-long.hh"
#include "misc.hh"
#include "config.hh"
#include "file-results.hh"
#include "debug.hh"
+#include "ps-def.hh"
+#include "tex-def.hh"
+#include "ps-lookup.hh"
+#include "tex-lookup.hh"
#if HAVE_GETTEXT
#include <libintl.h>
int default_count_global;
File_path global_path;
+Ps_lookup ps_lookup;
+Tex_lookup tex_lookup;
+Lookup* global_lookup_l = &tex_lookup;
+
+Ps_def ps_def;
+Tex_def tex_def;
+Paper_def* global_paper_l = &tex_def;
bool experimental_features_global_b = false;
bool dependency_global_b = false;
int
main (int argc, char **argv)
{
+ // facilitate binary distributions
+ char const *env_lily = getenv ("LILYPONDPREFIX");
+ String prefix_directory;
+ if (env_lily)
+ prefix_directory = env_lily;
#if HAVE_GETTEXT
- setlocale (LC_ALL, "");
-// setlocale (LC_MESSAGES, "");
+ setlocale (LC_ALL, ""); /* enable locales */
+ setlocale (LC_NUMERIC, "C"); /* musn't have comma's in TeX output... */
+ String lily_locale_dir;
String name (PACKAGE);
name.to_lower ();
- bindtextdomain (name.ch_C (), DIR_LOCALEDIR);
+ if (!prefix_directory.empty_b())
+ {
+ lily_locale_dir = prefix_directory + "/share/locale";
+ bindtextdomain (name.ch_C (), lily_locale_dir.ch_C());
+ }
+ else
+ bindtextdomain (name.ch_C (), DIR_LOCALEDIR);
textdomain (name.ch_C ());
#endif
if (env_sz)
global_path.parse_path (env_sz);
+ if (!prefix_directory.empty_b())
+ {
+ global_path.add (prefix_directory + "/share/lilypond/init/");
+ global_path.add (prefix_directory + "/share/lilypond");
+ }
+
global_path.add (String (DIR_DATADIR) + "/init/");
global_path.push (DIR_DATADIR);
{
case 't':
experimental_features_global_b = true;
+ global_lookup_l = &ps_lookup;
+ global_paper_l = &ps_def;
break;
case 'o':
outname_str = oparser.optional_argument_ch_C_;
/*
urg: make input file name:
+
input: file name
+
output: file name with added default extension. "" is stdin.
- in reference argument: the extention. ".ly" if none
+ in reference argument: the extension. ".ly" if none
*/
-
String
distill_inname_str (String name_str, String& ext_r)
{