grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / prefs / Editor / mkpref
blobb53ee5f958305ec63a67a21933c928c25871cade
1 .key exename/a
2 .bra {
3 .ket }
5 set CPU    "68000"
6 set CFLAGS "Optimize IDir=/ Define JANOPREF Ignore 100"
7 set EXE    "SYS:Prefs/JanoPrefs"
8 set CATDIR "//Catalogs/"
10 If "{exename}" eq "help"
11    echo "Usage: MkPref <file> : compile preference tool, with good arguments"
12    echo "* 'MakePref all' recompile whole project"
13    echo "* 'MakePref exe' make linkage of all objects"
14    echo "* 'MakePref cat' rebuild catalogs files"
15 Else
16         If "{exename}" eq "all"
17                 ; Do not use generated objects
18                 copy /prefs.c "" QUIET
19                 sc NoLink #?.c Prefs.c $CFLAGS CPU $CPU
20                 sc Link #?.o ProgramName $EXE
21         Else
22                 If "{exename}" eq "exe"
23                         ; Use previous generated objects
24                         sc Link #?.o ProgramName $EXE
25                 Else
26                         If "{exename}" eq "cat"
27                                 ; Build strings header
28                                 CatComp Catalogs/JanoPrefs.cd CFILE Prefs_Strings.h NOARRAY NOBLOCK NOCODE
30                                 ; Build translated catalog
31                                 ; Why this fucking command is badly expanded ????
32                                 ; CatComp Catalogs/JanoPrefs.cd Catalogs/français.ct CATALOG ${CATDIR}français/JanoPrefs.catalog
33                                 CatComp Catalogs/JanoPrefs.cd Catalogs/français.ct CATALOG //Catalogs/français/JanoPrefs.catalog
34                                 CatComp Catalogs/JanoPrefs.cd Catalogs/deutsch.ct  CATALOG //Catalogs/deutsch/JanoPrefs.catalog
35                                 CatComp Catalogs/JanoPrefs.cd Catalogs/russian.ct  CATALOG //Catalogs/russian/JanoPrefs.catalog
36                         Else
37                                 If EXISTS {exename}
38                                         If "{exename}" eq "prefs.c"
39                                                 copy /prefs.c "" quiet
40                                         EndIf
41                                         ; Source file in the same directory
42                                         sc $CFLAGS NoLink CPU $CPU {exename}
43                                 Else
44                                         ; Source file share code with Jano
45                                         sc $CFLAGS NoLink CPU $CPU /{exename}
46                                 EndIf
47                         EndIf
48                 EndIf
49         EndIf
50 EndIf