home *** CD-ROM | disk | FTP | other *** search
/ Encyclopedia of Graphics File Formats Companion / GFF_CD.ISO / software / unix / libtiff / lbtif3_3.tar / contrib / vms / tools / makevms.com
Text File  |  1993-01-28  |  4KB  |  142 lines

  1. $!========================================================================
  2. $!
  3. $! Name      : MAKEVMS
  4. $!
  5. $! Purpose   : Compile TIFF library
  6. $!
  7. $! Arguments : 
  8. $!
  9. $! Created   6-DEC-1991   Karsten Spang
  10. $!
  11. $!========================================================================
  12. $   CURRENT_DIR=F$ENVIRONMENT("DEFAULT")
  13. $   ON CONTROL_Y THEN GOTO EXIT
  14. $   ON ERROR THEN GOTO EXIT
  15. $!
  16. $! Get hold on definitions
  17. $!
  18. $   DEFINE SYS SYS$LIBRARY
  19. $   THIS_FILE=F$ENVIRONMENT("PROCEDURE")
  20. $   PROC_NAME=F$PARSE(THIS_FILE,,,"NAME","SYNTAX_ONLY")
  21. $   THIS_DIR=F$PARSE(THIS_FILE,,,"DEVICE","SYNTAX_ONLY")+ -
  22.         F$PARSE(THIS_FILE,,,"DIRECTORY","SYNTAX_ONLY")
  23. $   SET DEFAULT 'THIS_DIR'
  24. $   LIB_DIR=F$PARSE("[-.LIBTIFF]")
  25. $   LIB_DIR=F$PARSE(LIB_DIR,,,"DEVICE","SYNTAX_ONLY")+ -
  26.         F$PARSE(LIB_DIR,,,"DIRECTORY","SYNTAX_ONLY")
  27. $   DEFINE TIFFSHR 'LIB_DIR'TIFFSHR
  28. $   CONF_LIBRARY="USE_VARARGS=0,USE_PROTOTYPES=1,USE_CONST=1,"+ -
  29.     "BSDTYPES,MMAP_SUPPORT"
  30. $   DEFINES="/DEFINE=("+CONF_LIBRARY+")"
  31. $   INCLUDES="/INCLUDE="+LIB_DIR
  32. $   IF P1.EQS."DEBUG"
  33. $   THEN
  34. $       DEBUG_OPTIONS="/DEBUG/NOOPTIMIZE"
  35. $       LINK_OPTIONS="/DEBUG"
  36. $   ELSE
  37. $       DEBUG_OPTIONS=""
  38. $       LINK_OPTIONS=""
  39. $   ENDIF
  40. $   C_COMPILE="CC"+DEBUG_OPTIONS+DEFINES+INCLUDES
  41. $!
  42. $   SOURCES="TIFFINFO,TIFFCMP,TIFFCP,TIFFMEDIAN,"+ -
  43.         "TIFF2BW,TIFFDITHER,TIFF2PS,FAX2TIFF,PAL2RGB,"+ -
  44.         "GIF2TIFF,PPM2TIFF,RAS2TIFF,TIFFSPLIT,RGB2YCBCR"
  45. $!
  46. $! Special case: tiffdump does not use the TIFF library
  47. $!
  48. $   FILE="TIFFDUMP"
  49. $   C_FILE=F$PARSE(FILE,".C",,,"SYNTAX_ONLY")
  50. $   C_FILE=F$SEARCH(C_FILE)
  51. $   IF C_FILE.EQS.""
  52. $   THEN
  53. $       WRITE SYS$OUTPUT "Source file "+FILE+" not found"
  54. $       GOTO EXIT
  55. $   ENDIF
  56. $   C_DATE=F$CVTIME(F$FILE_ATTRIBUTES(C_FILE,"RDT"))
  57. $   EXE_FILE=F$PARSE("",".EXE",C_FILE,,"SYNTAX_ONLY")
  58. $   EXE_FILE=F$EXTRACT(0,F$LOCATE(";",EXE_FILE),EXE_FILE)
  59. $   FOUND_EXE_FILE=F$SEARCH(EXE_FILE)
  60. $   IF FOUND_EXE_FILE.EQS.""
  61. $   THEN
  62. $       EXE_DATE=""
  63. $   ELSE
  64. $       EXE_DATE=F$CVTIME(F$FILE_ATTRIBUTES(FOUND_EXE_FILE,"CDT"))
  65. $   ENDIF
  66. $   IF EXE_DATE.LTS.C_DATE
  67. $   THEN
  68. $       WRITE SYS$OUTPUT "Compiling "+FILE
  69. $       C_COMPILE 'FILE'
  70. $       LINK 'FILE',SYS$INPUT:/OPTIONS
  71. SYS$SHARE:VAXCRTL/SHARE
  72. $       DELETE 'FILE'.OBJ;*
  73. $       PURGE 'EXE_FILE'
  74. $   ENDIF
  75. $!
  76. $! The other programs need GETOPT.OBJ
  77. $!
  78. $   FILE="GETOPT"
  79. $   C_FILE=F$PARSE(FILE,".C",,,"SYNTAX_ONLY")
  80. $   C_FILE=F$SEARCH(C_FILE)
  81. $   IF C_FILE.EQS.""
  82. $   THEN
  83. $       WRITE SYS$OUTPUT "Source file "+FILE+" not found"
  84. $       GOTO EXIT
  85. $   ENDIF
  86. $   C_DATE=F$CVTIME(F$FILE_ATTRIBUTES(C_FILE,"RDT"))
  87. $   OBJ_FILE=F$PARSE("",".OBJ",C_FILE,,"SYNTAX_ONLY")
  88. $   OBJ_FILE=F$EXTRACT(0,F$LOCATE(";",OBJ_FILE),OBJ_FILE)
  89. $   FOUND_OBJ_FILE=F$SEARCH(OBJ_FILE)
  90. $   IF FOUND_OBJ_FILE.EQS.""
  91. $   THEN
  92. $       OBJ_DATE=""
  93. $   ELSE
  94. $       OBJ_DATE=F$CVTIME(F$FILE_ATTRIBUTES(FOUND_OBJ_FILE,"CDT"))
  95. $   ENDIF
  96. $   IF OBJ_DATE.LTS.C_DATE
  97. $   THEN
  98. $       WRITE SYS$OUTPUT "Compiling "+FILE
  99. $       C_COMPILE 'FILE'
  100. $       PURGE 'OBJ_FILE'
  101. $   ENDIF
  102. $!
  103. $! Loop over programs
  104. $!
  105. $   NUMBER=0
  106. $COMPILE_LOOP:
  107. $       FILE=F$ELEMENT(NUMBER,",",SOURCES)
  108. $       IF FILE.EQS."," THEN GOTO END_COMPILE
  109. $       C_FILE=F$PARSE(FILE,".C",,,"SYNTAX_ONLY")
  110. $       C_FILE=F$SEARCH(C_FILE)
  111. $       IF C_FILE.EQS.""
  112. $       THEN
  113. $           WRITE SYS$OUTPUT "Source file "+FILE+" not found"
  114. $           GOTO EXIT
  115. $       ENDIF
  116. $       C_DATE=F$CVTIME(F$FILE_ATTRIBUTES(C_FILE,"RDT"))
  117. $       EXE_FILE=F$PARSE("",".EXE",C_FILE,,"SYNTAX_ONLY")
  118. $       EXE_FILE=F$EXTRACT(0,F$LOCATE(";",EXE_FILE),EXE_FILE)
  119. $       FOUND_EXE_FILE=F$SEARCH(EXE_FILE)
  120. $       IF FOUND_EXE_FILE.EQS.""
  121. $       THEN
  122. $           EXE_DATE=""
  123. $       ELSE
  124. $           EXE_DATE=F$CVTIME(F$FILE_ATTRIBUTES(FOUND_EXE_FILE,"CDT"))
  125. $       ENDIF
  126. $       IF EXE_DATE.LTS.C_DATE
  127. $       THEN
  128. $           WRITE SYS$OUTPUT "Compiling "+FILE
  129. $           C_COMPILE 'FILE'
  130. $           LINK'LINK_OPTIONS' 'FILE',GETOPT,'LIB_DIR'TIFF/OPTIONS, -
  131.                 SYS$INPUT:/OPTIONS
  132. SYS$SHARE:VAXCRTL/SHAREABLE
  133. $           DELETE 'FILE'.OBJ;*
  134. $           PURGE 'EXE_FILE'
  135. $       ENDIF
  136. $       NUMBER=NUMBER+1
  137. $   GOTO COMPILE_LOOP
  138. $END_COMPILE:
  139. $EXIT:
  140. $   SET DEFAULT 'CURRENT_DIR'
  141. $   EXIT
  142.