home *** CD-ROM | disk | FTP | other *** search
- /*
- catcomp.srx
-
- Join 2 catalog description files and compile the result to a
- C header file.
-
- © 1998 HAAGE & PARTNER GmbH
-
- Warning: this make script depends on some filename conventions:
-
- { <xxx>.cd, <xxx>App.cd } -> <xxx>All.cd -> <xxx>All.h
-
- $VER join_catcomp.srx 2.0 (9.3.98)
-
- Warning: The function "GetString()" which will be generated by catcomp and
- used by setting "#define CATCOMP_CODE" ever uses the global symbol
- _LocaleBase for calling the function "GetCatalogStr()" from locale.library
- and not the expression li->li_LocaleBase.
-
- */
-
- /* Don't forget the point '.' at the end \/ */
- PARSE ARG '"' filename '"' '"' projectname '"' .
-
- /* Replace suffix ".cd" by ".h" */
- objectname = LEFT(filename,LASTPOS('.cd',filename)-1)||".h"
-
- /* Calulate the 2 catalog file names */
- filename1 = LEFT(filename,LASTPOS("All.cd",filename)-1)||".cd"
- filename2 = Left(filename,LASTPOS("All.cd",filename)-1)||"App.cd"
-
- SAY ""
- SAY "Catcomp Script ©1998 HAAGE & PARTNER GmbH"
-
- SAY "Join" filename1 "and" filename2 "to" filename||"."
- ADDRESS COMMAND "join" filename1 filename2 "TO" filename
-
- SAY "Compile "||filename||" to header "||objectname||"."
-
- /* set object file of catalog file */
- OBJECTS filename objectname
-
- /* compile */
- ADDRESS COMMAND "catcomp "||filename||" CFILE "||objectname
-
- /* add object file to project */
- ADDFILE objectname QUIET
-
- /* set dependencies */
- DEPENDENCIES filename filename1 filename2
-
- SAY "Done."
-