head     1.1;
branch   1.1.1;
access   ;
symbols  gfxboot25:1.1.1.1 morphix:1.1.1;
locks    ; strict;
comment  @# @;


1.1
date     2005.10.17.17.11.57;  author tcheun;  state Exp;
branches 1.1.1.1;
next     ;

1.1.1.1
date     2005.10.17.17.11.57;  author tcheun;  state Exp;
branches ;
next     ;


desc
@@



1.1
log
@Initial revision
@
text
@#! /usr/bin/perl

# make some include files for linuxrc

map { s/^(.*\/)?([^\/]+)\.po/$2/ } @@ARGV;

open W, ">text_inc.h";
print W "/*\n * This file is generated automatically. Editing it is pointless.\n */\n\n";
for (@@ARGV) {
  print W "#ifdef TRANS_$_\n#include \"po/$_.h\"\n#endif\n\n"
}
close W;

open W, ">text_array.h";
print W "/*\n * This file is generated automatically. Editing it is pointless.\n */\n\n";
print W "static alltexts_t alltexts_arm [] = {\n";
@@list = ( "en", grep { $_ ne en} @@ARGV);

for ($i = 0 ; $i < @@list; $i++) {
  print W "#ifdef TRANS_$list[$i]\n";
  print W "  { lang_$list[$i], LANG_ENTRY(txt_$list[$i]_atm) },\n";
  print W "#endif\n"
}
print W "};\n";
close W;

open W, ">text_langids.h";
print W "/*\n * This file is generated automatically. Editing it is pointless.\n */\n\n";
print W "/* lang_undef _must_ be 0 */\n\n";
print W "enum langid_t {\n";

@@list = ( "undef", @@ARGV );
for ($i = 0 ; $i < @@list; $i++) {
  print W "  lang_$list[$i]";
  print W $i + 1 == @@list ? "\n" : ",\n";
}
print W "};\n";
close W;

@


1.1.1.1
log
@morhhix
@
text
@@
