home *** CD-ROM | disk | FTP | other *** search
/ Amiga Times / AmigaTimes.iso / demos / programme / AmigaWriter-Demo / StormScreenManager / source / join_catcomp.srx < prev    next >
Encoding:
Text File  |  1998-10-06  |  1.4 KB  |  53 lines

  1. /* 
  2.     catcomp.srx
  3.     
  4.     Join 2 catalog description files and compile the result to a
  5.     C header file.
  6.         
  7.     © 1998 HAAGE & PARTNER GmbH
  8.     
  9.     Warning: this make script depends on some filename conventions:
  10.     
  11.     { <xxx>.cd, <xxx>App.cd } -> <xxx>All.cd -> <xxx>All.h
  12.     
  13.     $VER join_catcomp.srx 2.0 (9.3.98)
  14.     
  15.     Warning: The function "GetString()" which will be generated by catcomp and
  16.     used by setting "#define CATCOMP_CODE" ever uses the global symbol
  17.     _LocaleBase for calling the function "GetCatalogStr()" from locale.library
  18.     and not the expression li->li_LocaleBase.
  19.     
  20. */
  21.  
  22. /* Don't forget the point '.' at the end      \/        */
  23. PARSE ARG '"' filename '"' '"' projectname '"' .
  24.  
  25. /* Replace suffix ".cd" by ".h" */
  26. objectname = LEFT(filename,LASTPOS('.cd',filename)-1)||".h"
  27.  
  28. /* Calulate the 2 catalog file names */
  29. filename1 = LEFT(filename,LASTPOS("All.cd",filename)-1)||".cd"
  30. filename2 = Left(filename,LASTPOS("All.cd",filename)-1)||"App.cd"
  31.  
  32. SAY ""
  33. SAY "Catcomp Script ©1998 HAAGE & PARTNER GmbH"
  34.  
  35. SAY "Join" filename1 "and" filename2 "to" filename||"."
  36. ADDRESS COMMAND "join" filename1 filename2 "TO" filename
  37.  
  38. SAY "Compile "||filename||" to header "||objectname||"."
  39.  
  40. /* set object file of catalog file */
  41. OBJECTS filename objectname
  42.  
  43. /* compile */
  44. ADDRESS COMMAND "catcomp "||filename||" CFILE "||objectname
  45.  
  46. /* add object file to project */
  47. ADDFILE objectname QUIET
  48.  
  49. /* set dependencies */
  50. DEPENDENCIES filename filename1 filename2
  51.  
  52. SAY "Done."
  53.