home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume15 / dmake-3.6 / patch01 < prev    next >
Text File  |  1990-12-16  |  40KB  |  926 lines

  1. Newsgroups: comp.sources.misc
  2. X-UNIX-From: dvadura@watdragon.waterloo.edu
  3. subject: v15i090: dmake version 3.6 patch 1 (part 01/5)
  4. from: Dennis Vadura <dvadura@watdragon.waterloo.edu>
  5. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  6.  
  7. Posting-number: Volume 15, Issue 90
  8. Submitted-by: Dennis Vadura <dvadura@watdragon.waterloo.edu>
  9. Archive-name: dmake-3.6/patch01
  10.  
  11. #!/bin/sh
  12. # shar:    Shell Archiver  (v1.22)
  13. #
  14. # This is part 1 of a multipart archive                                    
  15. # do not concatenate these parts, unpack them in order with /bin/sh        
  16. #
  17. #    Run the following text with /bin/sh to create:
  18. #      dm36.p1
  19. #
  20. if test -r s2_seq_.tmp
  21. then echo "Must unpack archives in sequence!"
  22.      next=`cat s2_seq_.tmp`; echo "Please unpack part $next next"
  23.      exit 1; fi
  24. sed 's/^X//' << 'SHAR_EOF' > dm36.p1 &&
  25. X#!/bin/sh
  26. X# dodiff:  Directory tree maintainer (v1.1)
  27. X#
  28. X# DMAKE Version 3.6, patch #1
  29. X# ---------------------------
  30. X# 
  31. X# Severity: Medium
  32. X# 
  33. X# Nature:   Minor teething problems with UNIX, and major problems with MSC
  34. X#           6.0, and TCC 2.0 swapping versions fixed.
  35. X# 
  36. X# Format:   Shar containing new versions of affected files.  With appropriate
  37. X#           patches.  (run the patch file through sh in the source distribution
  38. X#           directory and it will do the rest)
  39. X# 
  40. X#           Also available as pub/src/dmake-3.6-patch1 on watmsg.uwaterloo.edu
  41. X#           (129.97.129.9)
  42. X# 
  43. X#           Archived source on watmsg incorporates this patch.
  44. X# 
  45. X# Prerequisites: dmake version 3.6, patchlevel 1 source distribution
  46. X# 
  47. X# 
  48. X# Description of Fixes:
  49. X# ---------------------
  50. X# 1. Compilation problems with Microsoft compilers, and swapping versions of
  51. X#    dmake.  To the best of my knowledge versions 4.0, 5.0, 5.1 and 6.0 of MSC
  52. X#    now fully compile and generate running binaries both for swapping and non
  53. X#    swapping versions of dmake.
  54. X# 
  55. X# 2. Other fixes include a hack to allow parsing of makefiles shipped over from
  56. X#    DOS that contain cr-lf combinations.  This doesn't seem to impact processing
  57. X#    of normal UNIX makefiles at all.
  58. X# 
  59. X# 3. Changed DOS versions of tempnam.c to use _psp to generate temporary file
  60. X#    names instead of the current time as supplied by time().  The reason for
  61. X#    this is too bizzare to go into here.
  62. X# 
  63. X# 4. Xenix is now a supported make target, as is Atari-ST TOS using GCC.
  64. X# 
  65. X# 5. A number of small tweaks here and there, not serious but might make
  66. X#    compiles on a number of systems cleaner.
  67. X# 
  68. X# 6. Clarification of the documentation in several spots.
  69. X# 
  70. X# 7. Patch to dmake.tf to remove ^G control characters.  NOTE:  This patch
  71. X#    may fail if you never received the ^G characters in the first place.  If
  72. X#    so then please apply the patch by hand.
  73. X# 
  74. X# 8. inferred targets that infer recipes from rules having a .SETDIR attribute
  75. X#    now have the .SETDIR applied prior to making the prerequisites and the
  76. X#    target.
  77. X# 
  78. X# Many thanks to all those that helped find and identify and in some cases
  79. X# provided fixes and/or new code for the above enhancements.
  80. X# 
  81. X# -dennis
  82. X#
  83. X# Remove Obsolete files from distribution
  84. Xrm -f msdos/mscdos/obj60swp.rsp
  85. Xrm -f msdos/mscdos/obj60.rsp
  86. Xrm -f msdos/mscdos/mkswp.bat
  87. Xrm -f msdos/mscdos/mk.bat
  88. Xrm -f msdos/mscdos/lib60swp.rsp
  89. Xrm -f msdos/mscdos/lib60.rsp
  90. X
  91. X# Now use a shar archive to add any new files to the distribution
  92. X# shar:    Shell Archiver  (v1.22)
  93. X#
  94. X#    Run the following text with /bin/sh to create:
  95. X#      msdos/mscdos/mk40.bat
  96. X#      msdos/mscdos/mk40swp.bat
  97. X#      msdos/mscdos/mk50.bat
  98. X#      msdos/mscdos/mk50swp.bat
  99. X#      msdos/mscdos/mk51.bat
  100. X#      msdos/mscdos/mk51swp.bat
  101. X#      msdos/mscdos/optoff.h
  102. X#      readme/atari.tos
  103. X#      readme/patch1
  104. X#      tos
  105. X#      tos/arlib.c
  106. X#      tos/config.h
  107. X#      tos/config.mk
  108. X#      tos/dirbrk.c
  109. X#      tos/make.sh
  110. X#      tos/rmprq.c
  111. X#      tos/ruletab.c
  112. X#      tos/runargv.c
  113. X#      tos/startup.h
  114. X#      tos/startup.mk
  115. X#      tos/sysintf.h
  116. X#
  117. Xsed 's/^X//' << 'SHAR_EOF' > msdos/mscdos/mk40.bat &&
  118. XXmkdir objects
  119. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  infer.c
  120. XXmv infer.obj objects
  121. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  make.c
  122. XXmv make.obj objects
  123. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  stat.c
  124. XXmv stat.obj objects
  125. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  expand.c
  126. XXmv expand.obj objects
  127. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  string.c
  128. XXmv string.obj objects
  129. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  hash.c
  130. XXmv hash.obj objects
  131. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  dag.c
  132. XXmv dag.obj objects
  133. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  dmake.c
  134. XXmv dmake.obj objects
  135. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  path.c
  136. XXmv path.obj objects
  137. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  imacs.c
  138. XXmv imacs.obj objects
  139. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  sysintf.c
  140. XXmv sysintf.obj objects
  141. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  parse.c
  142. XXmv parse.obj objects
  143. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  getinp.c
  144. XXmv getinp.obj objects
  145. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  quit.c
  146. XXmv quit.obj objects
  147. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  basename.c
  148. XXmv basename.obj objects
  149. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  dump.c
  150. XXmv dump.obj objects
  151. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  macparse.c
  152. XXmv macparse.obj objects
  153. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  rulparse.c
  154. XXmv rulparse.obj objects
  155. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  percent.c
  156. XXmv percent.obj objects
  157. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  function.c
  158. XXmv function.obj objects
  159. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\ruletab.c
  160. XXmv ruletab.obj objects
  161. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\dirbrk.c
  162. XXmv dirbrk.obj objects
  163. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\runargv.c
  164. XXmv runargv.obj objects
  165. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\arlib.c
  166. XXmv arlib.obj objects
  167. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\_chdir.c
  168. XXmv _chdir.obj objects
  169. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\switchar.c
  170. XXmv switchar.obj objects
  171. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\rmprq.c
  172. XXmv rmprq.obj objects
  173. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\mscdos\tempnam.c
  174. XXmv tempnam.obj objects
  175. XXlink @msdos\mscdos\obj.rsp,dmake.exe,NUL.MAP;
  176. XSHAR_EOF
  177. Xchmod 0640 msdos/mscdos/mk40.bat || echo "restore of msdos/mscdos/mk40.bat fails"
  178. Xset `wc -c msdos/mscdos/mk40.bat`;Sum=$1
  179. Xif test "$Sum" != "3127"
  180. Xthen echo original size 3127, current size $Sum;fi
  181. Xsed 's/^X//' << 'SHAR_EOF' > msdos/mscdos/mk40swp.bat &&
  182. XXmkdir objects
  183. XXmasm -t -mx -Dmcompact msdos\exec.asm;
  184. XXmv exec.obj objects
  185. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  infer.c
  186. XXmv infer.obj objects
  187. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  make.c
  188. XXmv make.obj objects
  189. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  stat.c
  190. XXmv stat.obj objects
  191. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  expand.c
  192. XXmv expand.obj objects
  193. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  string.c
  194. XXmv string.obj objects
  195. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  hash.c
  196. XXmv hash.obj objects
  197. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  dag.c
  198. XXmv dag.obj objects
  199. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  dmake.c
  200. XXmv dmake.obj objects
  201. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  path.c
  202. XXmv path.obj objects
  203. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  imacs.c
  204. XXmv imacs.obj objects
  205. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  sysintf.c
  206. XXmv sysintf.obj objects
  207. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  parse.c
  208. XXmv parse.obj objects
  209. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  getinp.c
  210. XXmv getinp.obj objects
  211. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  quit.c
  212. XXmv quit.obj objects
  213. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  basename.c
  214. XXmv basename.obj objects
  215. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  dump.c
  216. XXmv dump.obj objects
  217. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  macparse.c
  218. XXmv macparse.obj objects
  219. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  rulparse.c
  220. XXmv rulparse.obj objects
  221. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  percent.c
  222. XXmv percent.obj objects
  223. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  function.c
  224. XXmv function.obj objects
  225. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\ruletab.c
  226. XXmv ruletab.obj objects
  227. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\dirbrk.c
  228. XXmv dirbrk.obj objects
  229. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\runargv.c
  230. XXmv runargv.obj objects
  231. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\arlib.c
  232. XXmv arlib.obj objects
  233. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\_chdir.c
  234. XXmv _chdir.obj objects
  235. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\switchar.c
  236. XXmv switchar.obj objects
  237. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\rmprq.c
  238. XXmv rmprq.obj objects
  239. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\find.c
  240. XXmv find.obj objects
  241. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\spawn.c
  242. XXmv spawn.obj objects
  243. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\mscdos\tempnam.c
  244. XXmv tempnam.obj objects
  245. XXlink @msdos\mscdos\objswp.rsp,dmake.exe,NUL.MAP;
  246. XSHAR_EOF
  247. Xchmod 0640 msdos/mscdos/mk40swp.bat || echo "restore of msdos/mscdos/mk40swp.bat fails"
  248. Xset `wc -c msdos/mscdos/mk40swp.bat`;Sum=$1
  249. Xif test "$Sum" != "3411"
  250. Xthen echo original size 3411, current size $Sum;fi
  251. Xsed 's/^X//' << 'SHAR_EOF' > msdos/mscdos/mk50.bat &&
  252. XXmkdir objects
  253. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs infer.c
  254. XXmv infer.obj objects
  255. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs make.c
  256. XXmv make.obj objects
  257. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs stat.c
  258. XXmv stat.obj objects
  259. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs expand.c
  260. XXmv expand.obj objects
  261. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs string.c
  262. XXmv string.obj objects
  263. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs hash.c
  264. XXmv hash.obj objects
  265. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs dag.c
  266. XXmv dag.obj objects
  267. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs dmake.c
  268. XXmv dmake.obj objects
  269. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs path.c
  270. XXmv path.obj objects
  271. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs imacs.c
  272. XXmv imacs.obj objects
  273. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs sysintf.c
  274. XXmv sysintf.obj objects
  275. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs parse.c
  276. XXmv parse.obj objects
  277. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs getinp.c
  278. XXmv getinp.obj objects
  279. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs quit.c
  280. XXmv quit.obj objects
  281. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs basename.c
  282. XXmv basename.obj objects
  283. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs dump.c
  284. XXmv dump.obj objects
  285. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs macparse.c
  286. XXmv macparse.obj objects
  287. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs rulparse.c
  288. XXmv rulparse.obj objects
  289. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs percent.c
  290. XXmv percent.obj objects
  291. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs function.c
  292. XXmv function.obj objects
  293. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\ruletab.c
  294. XXmv ruletab.obj objects
  295. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\dirbrk.c
  296. XXmv dirbrk.obj objects
  297. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\runargv.c
  298. XXmv runargv.obj objects
  299. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\arlib.c
  300. XXmv arlib.obj objects
  301. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\_chdir.c
  302. XXmv _chdir.obj objects
  303. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\switchar.c
  304. XXmv switchar.obj objects
  305. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\rmprq.c
  306. XXmv rmprq.obj objects
  307. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\mscdos\tempnam.c
  308. XXmv tempnam.obj objects
  309. XXlink @msdos\mscdos\obj.rsp,dmake.exe,NUL.MAP;
  310. XSHAR_EOF
  311. Xchmod 0640 msdos/mscdos/mk50.bat || echo "restore of msdos/mscdos/mk50.bat fails"
  312. Xset `wc -c msdos/mscdos/mk50.bat`;Sum=$1
  313. Xif test "$Sum" != "3155"
  314. Xthen echo original size 3155, current size $Sum;fi
  315. Xsed 's/^X//' << 'SHAR_EOF' > msdos/mscdos/mk50swp.bat &&
  316. XXmkdir objects
  317. XXmasm -t -mx -Dmcompact msdos\exec.asm;
  318. XXmv exec.obj objects
  319. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs infer.c
  320. XXmv infer.obj objects
  321. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs make.c
  322. XXmv make.obj objects
  323. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs stat.c
  324. XXmv stat.obj objects
  325. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs expand.c
  326. XXmv expand.obj objects
  327. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs string.c
  328. XXmv string.obj objects
  329. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs hash.c
  330. XXmv hash.obj objects
  331. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs dag.c
  332. XXmv dag.obj objects
  333. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs dmake.c
  334. XXmv dmake.obj objects
  335. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs path.c
  336. XXmv path.obj objects
  337. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs imacs.c
  338. XXmv imacs.obj objects
  339. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs sysintf.c
  340. XXmv sysintf.obj objects
  341. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs parse.c
  342. XXmv parse.obj objects
  343. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs getinp.c
  344. XXmv getinp.obj objects
  345. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs quit.c
  346. XXmv quit.obj objects
  347. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs basename.c
  348. XXmv basename.obj objects
  349. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs dump.c
  350. XXmv dump.obj objects
  351. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs macparse.c
  352. XXmv macparse.obj objects
  353. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs rulparse.c
  354. XXmv rulparse.obj objects
  355. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs percent.c
  356. XXmv percent.obj objects
  357. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs function.c
  358. XXmv function.obj objects
  359. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\ruletab.c
  360. XXmv ruletab.obj objects
  361. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\dirbrk.c
  362. XXmv dirbrk.obj objects
  363. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\runargv.c
  364. XXmv runargv.obj objects
  365. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\arlib.c
  366. XXmv arlib.obj objects
  367. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\_chdir.c
  368. XXmv _chdir.obj objects
  369. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\switchar.c
  370. XXmv switchar.obj objects
  371. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\rmprq.c
  372. XXmv rmprq.obj objects
  373. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\find.c
  374. XXmv find.obj objects
  375. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\spawn.c
  376. XXmv spawn.obj objects
  377. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\mscdos\tempnam.c
  378. XXmv tempnam.obj objects
  379. XXlink @msdos\mscdos\objswp.rsp,dmake.exe,NUL.MAP;
  380. XSHAR_EOF
  381. Xchmod 0640 msdos/mscdos/mk50swp.bat || echo "restore of msdos/mscdos/mk50swp.bat fails"
  382. Xset `wc -c msdos/mscdos/mk50swp.bat`;Sum=$1
  383. Xif test "$Sum" != "3441"
  384. Xthen echo original size 3441, current size $Sum;fi
  385. Xsed 's/^X//' << 'SHAR_EOF' > msdos/mscdos/mk51.bat &&
  386. XXmkdir objects
  387. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs infer.c
  388. XXmv infer.obj objects
  389. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs make.c
  390. XXmv make.obj objects
  391. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs stat.c
  392. XXmv stat.obj objects
  393. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs expand.c
  394. XXmv expand.obj objects
  395. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs string.c
  396. XXmv string.obj objects
  397. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs hash.c
  398. XXmv hash.obj objects
  399. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs dag.c
  400. XXmv dag.obj objects
  401. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs dmake.c
  402. XXmv dmake.obj objects
  403. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs path.c
  404. XXmv path.obj objects
  405. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs imacs.c
  406. XXmv imacs.obj objects
  407. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs sysintf.c
  408. XXmv sysintf.obj objects
  409. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs parse.c
  410. XXmv parse.obj objects
  411. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs getinp.c
  412. XXmv getinp.obj objects
  413. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs quit.c
  414. XXmv quit.obj objects
  415. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs basename.c
  416. XXmv basename.obj objects
  417. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs dump.c
  418. XXmv dump.obj objects
  419. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs macparse.c
  420. XXmv macparse.obj objects
  421. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs rulparse.c
  422. XXmv rulparse.obj objects
  423. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs percent.c
  424. XXmv percent.obj objects
  425. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs function.c
  426. XXmv function.obj objects
  427. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\ruletab.c
  428. XXmv ruletab.obj objects
  429. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\dirbrk.c
  430. XXmv dirbrk.obj objects
  431. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\runargv.c
  432. XXmv runargv.obj objects
  433. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\arlib.c
  434. XXmv arlib.obj objects
  435. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\_chdir.c
  436. XXmv _chdir.obj objects
  437. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\switchar.c
  438. XXmv switchar.obj objects
  439. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\rmprq.c
  440. XXmv rmprq.obj objects
  441. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\mscdos\tempnam.c
  442. XXmv tempnam.obj objects
  443. XXlink @msdos\mscdos\obj.rsp,dmake.exe,NUL.MAP;
  444. XSHAR_EOF
  445. Xchmod 0640 msdos/mscdos/mk51.bat || echo "restore of msdos/mscdos/mk51.bat fails"
  446. Xset `wc -c msdos/mscdos/mk51.bat`;Sum=$1
  447. Xif test "$Sum" != "3155"
  448. Xthen echo original size 3155, current size $Sum;fi
  449. Xsed 's/^X//' << 'SHAR_EOF' > msdos/mscdos/mk51swp.bat &&
  450. XXmkdir objects
  451. XXmasm -t -mx -Dmcompact msdos\exec.asm;
  452. XXmv exec.obj objects
  453. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs infer.c
  454. XXmv infer.obj objects
  455. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs make.c
  456. XXmv make.obj objects
  457. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs stat.c
  458. XXmv stat.obj objects
  459. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs expand.c
  460. XXmv expand.obj objects
  461. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs string.c
  462. XXmv string.obj objects
  463. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs hash.c
  464. XXmv hash.obj objects
  465. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs dag.c
  466. XXmv dag.obj objects
  467. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs dmake.c
  468. XXmv dmake.obj objects
  469. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs path.c
  470. XXmv path.obj objects
  471. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs imacs.c
  472. XXmv imacs.obj objects
  473. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs sysintf.c
  474. XXmv sysintf.obj objects
  475. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs parse.c
  476. XXmv parse.obj objects
  477. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs getinp.c
  478. XXmv getinp.obj objects
  479. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs quit.c
  480. XXmv quit.obj objects
  481. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs basename.c
  482. XXmv basename.obj objects
  483. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs dump.c
  484. XXmv dump.obj objects
  485. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs macparse.c
  486. XXmv macparse.obj objects
  487. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs rulparse.c
  488. XXmv rulparse.obj objects
  489. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs percent.c
  490. XXmv percent.obj objects
  491. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs function.c
  492. XXmv function.obj objects
  493. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\ruletab.c
  494. XXmv ruletab.obj objects
  495. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\dirbrk.c
  496. XXmv dirbrk.obj objects
  497. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\runargv.c
  498. XXmv runargv.obj objects
  499. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\arlib.c
  500. XXmv arlib.obj objects
  501. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\_chdir.c
  502. XXmv _chdir.obj objects
  503. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\switchar.c
  504. XXmv switchar.obj objects
  505. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\rmprq.c
  506. XXmv rmprq.obj objects
  507. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\find.c
  508. XXmv find.obj objects
  509. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\spawn.c
  510. XXmv spawn.obj objects
  511. XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\mscdos\tempnam.c
  512. XXmv tempnam.obj objects
  513. XXlink @msdos\mscdos\objswp.rsp,dmake.exe,NUL.MAP;
  514. XSHAR_EOF
  515. Xchmod 0640 msdos/mscdos/mk51swp.bat || echo "restore of msdos/mscdos/mk51swp.bat fails"
  516. Xset `wc -c msdos/mscdos/mk51swp.bat`;Sum=$1
  517. Xif test "$Sum" != "3441"
  518. Xthen echo original size 3441, current size $Sum;fi
  519. Xsed 's/^X//' << 'SHAR_EOF' > msdos/mscdos/optoff.h &&
  520. XX#if _MSC_VER < 600
  521. XX# pragma loop_opt(off)
  522. XX#endif
  523. XSHAR_EOF
  524. Xchmod 0640 msdos/mscdos/optoff.h || echo "restore of msdos/mscdos/optoff.h fails"
  525. Xset `wc -c msdos/mscdos/optoff.h`;Sum=$1
  526. Xif test "$Sum" != "49"
  527. Xthen echo original size 49, current size $Sum;fi
  528. Xsed 's/^X//' << 'SHAR_EOF' > readme/atari.tos &&
  529. XXThis file describes the Atari-tos distribution of dmake.
  530. XX
  531. XXThe code to compile on an Atari-ST using GCC was supplied by Edgar Roeder
  532. XX(roeder@cs.uni-sb.de).  I do not have an ST to verify the distribution sources
  533. XXon but I have no reason to believe them to not work.  If there are any
  534. XXproblems please let Edgar or myself know.
  535. XX
  536. XXI know of no bugs or limitation to the the Atari-ST implementation.  Note that
  537. XXit is similar to the DOS version but it does not swap itself out.  This does
  538. XXnot appear to be as much of a problem on the Atari as it is on MSDOS boxes.
  539. XX
  540. XX-dennis
  541. XSHAR_EOF
  542. Xchmod 0640 readme/atari.tos || echo "restore of readme/atari.tos fails"
  543. Xset `wc -c readme/atari.tos`;Sum=$1
  544. Xif test "$Sum" != "566"
  545. Xthen echo original size 566, current size $Sum;fi
  546. Xsed 's/^X//' << 'SHAR_EOF' > readme/patch1 &&
  547. XXDMAKE Version 3.6, patch #1
  548. XX---------------------------
  549. XX
  550. XXSeverity: Medium
  551. XX
  552. XXNature:   Minor teething problems with UNIX, and major problems with MSC
  553. XX      6.0, and TCC 2.0 swapping versions fixed.
  554. XX
  555. XXFormat:   Shar containing new versions of affected files.  With appropriate
  556. XX          patches.  (run the patch file through sh in the source distribution
  557. XX          directory and it will do the rest)
  558. XX
  559. XX          Also available as pub/src/dmake-3.6-patch1 on watmsg.uwaterloo.edu
  560. XX          (129.97.129.9)
  561. XX
  562. XX          Archived source on watmsg incorporates this patch.
  563. XX
  564. XXPrerequisites: dmake version 3.6, patchlevel 1 source distribution
  565. XX
  566. XX
  567. XXDescription of Fixes:
  568. XX---------------------
  569. XX1. Compilation problems with Microsoft compilers, and swapping versions of
  570. XX   dmake.  To the best of my knowledge versions 4.0, 5.0, 5.1 and 6.0 of MSC
  571. XX   now fully compile and generate running binaries both for swapping and non
  572. XX   swapping versions of dmake.
  573. XX
  574. XX2. Other fixes include a hack to allow parsing of makefiles shipped over from
  575. XX   DOS that contain cr-lf combinations.  This doesn't seem to impact processing
  576. XX   of normal UNIX makefiles at all.
  577. XX
  578. XX3. Changed DOS versions of tempnam.c to use _psp to generate temporary file
  579. XX   names instead of the current time as supplied by time().  The reason for
  580. XX   this is too bizzare to go into here.
  581. XX
  582. XX4. Xenix is now a supported make target, as is Atari-ST TOS using GCC.
  583. XX
  584. XX5. A number of small tweaks here and there, not serious but might make
  585. XX   compiles on a number of systems cleaner.
  586. XX
  587. XX6. Clarification of the documentation in several spots.
  588. XX
  589. XX7. Patch to dmake.tf to remove ^G control characters.  NOTE:  This patch
  590. XX   may fail if you never received the ^G characters in the first place.  If
  591. XX   so then please apply the patch by hand.
  592. XX
  593. XX8. inferred targets that infer recipes from rules having a .SETDIR attribute
  594. XX   now have the .SETDIR applied prior to making the prerequisites and the
  595. XX   target.
  596. XX
  597. XXMany thanks to all those that helped find and identify and in some cases
  598. XXprovided fixes and/or new code for the above enhancements.
  599. XX
  600. XX-dennis
  601. XSHAR_EOF
  602. Xchmod 0640 readme/patch1 || echo "restore of readme/patch1 fails"
  603. Xset `wc -c readme/patch1`;Sum=$1
  604. Xif test "$Sum" != "2063"
  605. Xthen echo original size 2063, current size $Sum;fi
  606. Xecho mkdir - tos
  607. Xmkdir tos
  608. Xsed 's/^X//' << 'SHAR_EOF' > tos/arlib.c &&
  609. XX/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/unix/RCS/arlib.c,v 1.1 90/10/06 12:06:53 dvadura Exp $
  610. XX-- SYNOPSIS -- Unix archive manipulation code.
  611. XX-- 
  612. XX-- DESCRIPTION
  613. XX--     Originally this code was provided by Eric Gisin of MKS.  I took
  614. XX--    his code and completely rewrote it adding cacheing of lib members
  615. XX--    and other various optimizations.  I kept the overal functional
  616. XX--    idea of the library routines as they are similar to those in GNU
  617. XX--    make and felt it advantageous to maintain a similar interface.
  618. XX--
  619. XX-- AUTHOR
  620. XX--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  621. XX--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  622. XX--
  623. XX-- COPYRIGHT
  624. XX--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  625. XX-- 
  626. XX--      This program is free software; you can redistribute it and/or
  627. XX--      modify it under the terms of the GNU General Public License
  628. XX--      (version 1), as published by the Free Software Foundation, and
  629. XX--      found in the file 'LICENSE' included with this distribution.
  630. XX-- 
  631. XX--      This program is distributed in the hope that it will be useful,
  632. XX--      but WITHOUT ANY WARRANTY; without even the implied warrant of
  633. XX--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  634. XX--      GNU General Public License for more details.
  635. XX-- 
  636. XX--      You should have received a copy of the GNU General Public License
  637. XX--      along with this program;  if not, write to the Free Software
  638. XX--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  639. XX--
  640. XX-- LOG
  641. XX--     $Log:    arlib.c,v $
  642. XX * Revision 1.1  90/10/06  12:06:53  dvadura
  643. XX * dmake Release, Version 3.6
  644. XX * 
  645. XX*/
  646. XX
  647. XX#include "extern.h"
  648. XX#include "sysintf.h"
  649. XX#include <ar.h>
  650. XX#include <stdio.h>
  651. XX
  652. XX/* By defining the defines below it is possible to configure the library
  653. XX * code for library cacheing/non-cacheing, ASCII archive headers, and a full
  654. XX * decode of the ar_hdr fields in the scan_ar function. */
  655. XX
  656. XX#define ASCARCH            1    /* ASCII time stored in archive    */
  657. XX#define LC            1    /* Turn on library cacheing    */
  658. XX#define DECODE_ALL_AR_FIELDS    0    /* decode only fields make needs*/
  659. XX
  660. XX#if LC
  661. XX#  define FOUND_MEMBER    FALSE
  662. XX#else
  663. XX#  define FOUND_MEMBER    TRUE
  664. XX#  define _cache_member(a, b, c)
  665. XX#  define _check_cache(a, b, c, d)    FALSE
  666. XX#endif
  667. XX
  668. XX#define    MAXFNAME    32    /* Longest file name in archive    */
  669. XX#define    MAXMNAME    8    /* Max module name < MAXFNAME    */
  670. XX
  671. XX
  672. XX/* This struct is used to pass the library and member information about the
  673. XX * routines that perform the library seeking/cacheing */
  674. XXstruct ar_args {
  675. XX   char   *lib;
  676. XX   char   *member;
  677. XX   time_t time;
  678. XX};
  679. XX
  680. XX
  681. XXtypedef struct AR {
  682. XX   char    ar_name[MAXFNAME+1];      /* File name */
  683. XX   long    ar_size;                  /* Size in bytes */
  684. XX   time_t  ar_time;                  /* Modification time */
  685. XX
  686. XX#ifdef DOS
  687. XX   char    ar_modname[MAXMNAME+1];   /* DOS module name */
  688. XX#endif
  689. XX
  690. XX#if DECODE_ALL_AR_FIELDS
  691. XX   uint16  ar_mode;                  /* File mode */
  692. XX   uint16  ar_uid;                     /* File owner */
  693. XX   uint16  ar_gid;                   /* File group owner */
  694. XX#endif
  695. XX} AR, *ARPTR;
  696. XX
  697. XX
  698. XXstatic int ar_scan  ANSI((FILE *,
  699. XX              int (*) ANSI((FILE *, struct AR *, struct ar_args *)),
  700. XX              struct ar_args *));
  701. XXstatic int ar_touch ANSI(( FILE *, time_t ));
  702. XXstatic int time_function  ANSI(( FILE *, struct AR *, struct ar_args * ));
  703. XXstatic int touch_function ANSI(( FILE *, struct AR *, struct ar_args * ));
  704. XX
  705. XX#if LC
  706. XXstatic int _cache_member ANSI((char *, char *, time_t));
  707. XXstatic int _check_cache  ANSI((char *, char *, time_t *, int));
  708. XX#endif
  709. XX
  710. XX/* decoded archive header */
  711. XXstatic AR _ar;
  712. XX
  713. XX
  714. XXtime_t
  715. XXseek_arch(name, lib)/*
  716. XX======================
  717. XX   Look for module 'name' inside 'lib'.  If compiled with cacheing then first
  718. XX   check to see if the specified lib is cached.  If so then return that time
  719. XX   stamp instead of looking into the library. */
  720. XXchar    *name;
  721. XXchar     *lib;
  722. XX{
  723. XX   FILE   *f;
  724. XX   int    rv;
  725. XX   time_t mtime;
  726. XX   struct ar_args args;
  727. XX
  728. XX   /* Check the cache first (if there is a cache) */
  729. XX   if( _check_cache(name, lib, &mtime, FALSE) )  return( mtime );
  730. XX
  731. XX   /* Open the lib file and perform the scan of the members, looking
  732. XX    * for our particular member.  If cacheing is enabled it will be
  733. XX    * taken care of automatically during the scan. */
  734. XX
  735. XX   args.lib    = lib;
  736. XX   args.member = name;
  737. XX   args.time   = (time_t)0L;
  738. XX
  739. XX   if( (f = fopen(lib, "rb")) == NIL(FILE) ) return( (time_t)0L );
  740. XX   rv = ar_scan(f, time_function, &args );
  741. XX   fclose( f );
  742. XX
  743. XX   if( rv < 0 ) Fatal("(%s): Invalid library format", lib);
  744. XX
  745. XX   return( args.time );
  746. XX}
  747. XX
  748. XX
  749. XXint
  750. XXtouch_arch(name, lib)/*
  751. XX=======================
  752. XX   Look for module 'name' inside 'lib'.  If compiled with cacheing then first
  753. XX   check to see if the specified lib is cached.  If so then set that time
  754. XX   stamp and write it into the library.  Returns 0 on success, non-zero
  755. XX   on failure. */
  756. XXchar   *name;
  757. XXchar   *lib;
  758. XX{
  759. XX   FILE   *f;
  760. XX   int    rv;
  761. XX   struct ar_args args;
  762. XX
  763. XX   /* Open the lib file and perform the scan of the members, looking
  764. XX    * for our particular member.  If cacheing is enabled it will be
  765. XX    * taken care of automatically during the scan. */
  766. XX
  767. XX   args.lib    = lib;
  768. XX   args.member = name;
  769. XX   args.time   = (time_t)0L;
  770. XX
  771. XX   if( (f = fopen(lib, "rb+")) == NIL(FILE) ) return( (time_t)1L );
  772. XX   rv = ar_scan(f, touch_function, &args );
  773. XX   fclose( f );
  774. XX
  775. XX   if( rv < 0 ) Fatal("(%s): Invalid library format", lib);
  776. XX
  777. XX   return( 0 );
  778. XX}
  779. XX
  780. XX
  781. XX
  782. XXstatic int
  783. XXtime_function(f, arp, argp)/*
  784. XX=============================
  785. XX   get library member's time, if it matches than return it in argp, if
  786. XX   cacheing is enabled than cache the library members also. */
  787. XXFILE           *f;      /* library file          */
  788. XXstruct AR      *arp;    /* library member header */
  789. XXstruct ar_args *argp;
  790. XX{
  791. XX   int rv = _cache_member( arp->ar_name, argp->lib, arp->ar_time );
  792. XX
  793. XX   if( strcmp(argp->member, arp->ar_name) == 0 ) {
  794. XX      argp->time = arp->ar_time;
  795. XX
  796. XX      if( arp->ar_time == 0 && !(Glob_attr & A_SILENT) )
  797. XX         Warning( "(%s): Can't extract library member timestamp; using EPOCH",
  798. XX              argp->member);
  799. XX
  800. XX      return( rv );  /* 1 => no cacheing, 0 => cacheing */
  801. XX   }
  802. XX
  803. XX   return( FALSE ); /* continue scan */
  804. XX}
  805. XX
  806. XX
  807. XX
  808. XXstatic int
  809. XXtouch_function(f, arp, argp)/*
  810. XX==============================
  811. XX   Update library member's time stamp, and write new time value into cache
  812. XX   if required. */
  813. XXFILE           *f;      /* library file */
  814. XXstruct AR      *arp;    /* library member header */
  815. XXstruct ar_args *argp;
  816. XX{
  817. XX   extern time_t time ANSI(( time_t * ));
  818. XX   time_t now = time((time_t*) NULL);  /* Current time.          */
  819. XX
  820. XX   if( strcmp(argp->member, arp->ar_name) == 0 ) {
  821. XX      _check_cache( argp->member, argp->lib, &now, TRUE );
  822. XX      ar_touch(f, now );
  823. XX
  824. XX      return( TRUE );
  825. XX   }
  826. XX
  827. XX   return( FALSE ); /* continue scan */
  828. XX}
  829. XX
  830. XX
  831. XX
  832. XX
  833. XXstatic int
  834. XXar_scan(f, function, arg)/*
  835. XX===========================
  836. XX   Scan the opened archive, and call the given function for each member found.
  837. XX   The function will be called with the file positioned at the beginning of
  838. XX   the member and it can read up to arp->ar_size bytes of the archive member.
  839. XX   If the function returns 1, we stop and return 1.  We return 0 at the end
  840. XX   of the archive, or -1 if the archive has invalid format.  This interface
  841. XX   is more general than required by "make", but it can be used by other
  842. XX   utilities.  */
  843. XXregister FILE *f;
  844. XXint      (*function) ANSI((FILE *, struct AR *, struct ar_args *));
  845. XXstruct ar_args *arg;
  846. XX{
  847. XX   extern long atol ANSI((char *));
  848. XX   register char *p;
  849. XX   struct ar_hdr arhdr;   /* external archive header */
  850. XX   off_t         offset;  /* member seek offset      */
  851. XX
  852. XX#if ASCARCH
  853. XX   char magic[SARMAG];
  854. XX#else
  855. XX   unsigned short word;
  856. XX#endif
  857. XX
  858. XX   fseek( f, 0L, 0 );    /* Start at the beginning of the archive file */
  859. XX
  860. XX#if ASCARCH
  861. XX   fread( magic, sizeof(magic), 1, f );
  862. XX   if( strncmp(magic, ARMAG, SARMAG) != 0 ) return( -1 );
  863. XX#else
  864. XX   fread( (char*)&word, sizeof(word), 1, f );
  865. XX   if( word != ARMAG ) return( -1 );
  866. XX#endif
  867. XX
  868. XX   /* scan the library, calling `function' for each member
  869. XX    */
  870. XX   while( 1 ) {
  871. XX      if( fread((char*) &arhdr, sizeof(arhdr), 1, f) != 1 ) break;
  872. XX      offset = ftell(f);
  873. XX      strncpy(_ar.ar_name, arhdr.ar_name, sizeof(arhdr.ar_name));
  874. XX
  875. XX      for( p = &_ar.ar_name[sizeof(arhdr.ar_name)];
  876. XX           --p >= _ar.ar_name && *p == ' ';);
  877. XX
  878. XX      p[1] = '\0';
  879. XX      if( *p == '/' ) *p = 0;     /* Only SysV has trailing '/' */
  880. XX
  881. XX#if ASCARCH
  882. XX      if( strncmp(arhdr.ar_fmag, ARFMAG, sizeof(arhdr.ar_fmag)) != 0 )
  883. XX         return( -1 );
  884. XX      _ar.ar_time = atol(arhdr.ar_date);
  885. XX      _ar.ar_size = atol(arhdr.ar_size);
  886. XX#else
  887. XX      _ar.ar_time = arhdr.ar_date;
  888. XX      _ar.ar_size = arhdr.ar_size;
  889. XX#endif
  890. XX
  891. XX
  892. XX#if DECODE_ALL_AR_FIELDS
  893. XX#if ASCARCH
  894. XX      _ar.ar_mode = atoi(arhdr.ar_mode);
  895. XX      _ar.ar_uid  = atoi(arhdr.ar_uid);
  896. XX      _ar.ar_gid  = atoi(arhdr.ar_gid);
  897. XX#else
  898. XX      _ar.ar_mode = arhdr.ar_mode;
  899. XX      _ar.ar_size = arhdr.ar_size;
  900. XX      _ar.ar_uid = arhdr.ar_uid;
  901. XX      _ar.ar_gid = arhdr.ar_gid;
  902. XX#endif
  903. XX#endif
  904. XX
  905. XX      if( (*function)(f, &_ar, arg) ) return( 1 );
  906. XX      fseek( f, offset + (_ar.ar_size+1 & ~1L), 0 );
  907. XX   }
  908. XX
  909. XX   if( !feof(f) ) return( -1 );
  910. XX   return 0;
  911. XX}
  912. XX
  913. XX
  914. XX
  915. XXstatic int
  916. XXar_touch( f, now )/*
  917. XX====================
  918. XX   touch module header timestamp. */
  919. XXFILE   *f;
  920. XXtime_t now;
  921. SHAR_EOF
  922. echo "End of part 1, continue with part 2"
  923. echo "2" > s2_seq_.tmp
  924. exit 0
  925.  
  926.