home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / PJ8_3.ZIP / LIBRARY.PRM < prev    next >
Text File  |  1990-04-10  |  936b  |  44 lines

  1. # LIBRARY.PRM
  2. #    Updates a library file of ASM routines
  3.  
  4. define(libname, "LIBRARY")    
  5.  
  6. # 1. Make list1, a list of all source files
  7. #    in the current directory   
  8. #    whose object files must be refreshed in the library
  9.  
  10. define(list1, "")
  11. automake((*.ASM),         
  12.     (),
  13.     [libname].LIB,
  14.     append(list1, "[dne] "))
  15.  
  16. # 2. Make list2, a list of all source files
  17. #    out of those present in list1 (if any)
  18. #    whose object files must be recreated
  19.  
  20. define(list2, "")
  21. automake(([list1]),
  22.     (),            
  23.         [rn].OBJ,
  24.         append(list2,"[dne] "))
  25.  
  26. # 3. Recreate object files from source files in list2
  27.  
  28. repeat(([list2]),
  29.     detach("MASM /Mx[rne];"))
  30. wait()    
  31. exit(1)
  32.  
  33. # 4. Refresh object files in the library
  34.  
  35. repeat((*.OBJ),
  36.     run("LIB[libname].LIB -+ [rne];")
  37.     exit(1))          
  38.  
  39. # 5. Update library listing and cleanup
  40.  
  41. make([libname].LIB,
  42.     [libname].LST,
  43.     run("LIB [dne], [tne]")
  44.