home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
- ADEPT COMPUTER CONSULTANTS
-
- PRESENTS
-
- ------------------
- --- SMART MAKE ---
- -- VERSION 1.55 --
- ------------------
-
- OVERVIEW
-
-
- SMARTMAKE is a software system consisting of two files.
- SMAKE.BAT and SMAKEMCM.EXE. The batch file prepares a
- directory listing and the executable then processes that
- listing to determine which files need to be recompiled.
-
-
- Who should use SMARTMAKE? Anyone that programs in a language
- that can be operated from the command line can benefit from
- SMARTMAKE. The programmers that will gain the most are the
- ones who work with large software systems, consisting of many
- source files.
-
-
- How do you use SMARTMAKE? This program requires the user to
- create two supplemental files for each software system that
- he works with. These files should reside in the directory
- with the source files. The files are generally created one
- time and left alone. A database file (.dbs extension) and a
- link response file (.lnk) are required.
-
-
-
-
- THE DATABASE FILE
-
-
- This file is required so that SMAKE can determine source file
- dependencies. For example, suppose that a software system
- consisted of three files: MAIN.FOR, SUB1.FOR, UTIL.FOR. If
- the system is 'up to date', then the MAIN.OBJ is newer than
- MAIN.FOR, SUB1.OBJ is newer than SUB1.FOR, and UTIL.OBJ is
- newer than UTIL.FOR. Furthermore, the MAIN.EXE file is newer
- than all of the object files.
-
- So, if the system is up to date, and the user modifies
- SUB1.FOR, then SUB1.FOR is newer than SUB1.OBJ. When the
- user issues the SMAKE command, then SMARTMAKE determines that
- SUB1.FOR needs to be recompiled, and the system needs to be
- relinked.
-
- The DATABASE file also contains the information needed to
- initialize a compile, compile, the linker name, all source
- and object file names, and the information to reset the
- system to 'normal' after the compile.
-
- The format for the DATABASE file is as follows:
-
- EXECUTABLE FILE NAME
- LINKER NAME
- BATCH FILE TO START UP ANY PATHS ETC
- BATCH FILE TO RESET SYSTEM AFTER COMPILATION
- SOURCE FILE 1
- OBJECT FILE 1
- COMPILER NAME
- COMPILER FLAGS OR OPTIONS
- SOURCE FILE 2
- OBJECT FILE 2
- COMPILER NAME
- COMPILER FLAGS OR OPTIONS
- ...
- SOURCE FILE N
- OBJECT FILE N
- COMPILER NAME
- COMPILER FLAGS OR OPTIONS
- BLANK LINE
-
- For example, suppose you are using the Ryan-McFarland FORTRAN
- compiler and the Pocket Soft RTLINK linker. Then the
- contents of MAIN.DBS which compiles the MAIN system of
- MAIN.FOR, SUB1.FOR and UTIL.FOR would be:
-
- RTLINK
- 'blank, no setup
- 'blank, no reset
- MAIN.EXE
- MAIN.FOR
- MAIN.OBJ
- RMFORT
- /LINE
- SUB1.FOR
- SUB1.OBJ
- RMFORT
- /LINE
- UTIL.FOR
- UTIL.OBJ
- RMFORT
- /LINE
- 'blank line to end.
-
-
- To update this system, the user would issue the command from
- the DOS command line:
-
- SMAKE MAIN
-
- SMARTMAKE would then determine if any files need to be
- recompiled, and if so, would recompile them and relink. If
- for some reason a .obj file is newer than the executable,
- then the system will be re-linked. If you wish to force a
- link, specify L on the command line when you SMAKE it.
-
- SMAKE MAIN L
-
-
- In a similar vein, if you are concerned that some object file
- integrity has been compromised, then you can issue a command
- to recompile all of the files and relink the executable.
- This is accomplished by issuing the command:
-
- SMAKE MAIN C
-
- You might want to do this when you change an include file,
- since (as of this time) includes are not checked for
- modification since last compile.
-
-
- THE LINK RESPONSE FILE
- This file depends solely upon the linker that the user is
- employing. It has the format that is required by the linker.
- Specifically, it is a file that one could link '@' to form
- the executable. Again, this file will vary from linker to
- linker. For example, suppose that we are using the RTLINK
- linker. If so, then the link response file for the MAIN
- software system might be:
-
- VERBOSE
- PRFILE OBJ
- FILE MAIN
- FILE SUB1
- FILE UTIL
- LIBRARY C:\RMFORT2\NP_LIB\RMFORT.LIB
- LIBRARY SUP1
- OUTPUT MAIN.EXE
-
- It just so happens that this link response file is compatible
- with Phoenix's PLINK86 linker (with exception of the PRFILE
- command, which Phoenix does not support).
-
-
-
- KNOWN DEFICIENCIES
-
- There is a known but repairable bug that might possibly
- occur at 12:59-1:00 in the morning. In which case, one
- might simply have to re-issue the SMAKE command, or touch the
- source file involved. It has to do with the algorithm used
- to calculate which file is 'newer'. The error causes a file
- not to be compiled when it should be.
-
- The SMARTMAKE system, while very useful under a broad range
- of applications, is not omniscient. If the source files
- include files, then if the include file is modified, SMAKE
- has no way of knowing to recompile the source file. There is
- no easy way around this. Even UNIX's MAKEFILE doesn't handle
- this well. The solution is not good. Each of the source
- files would have to be parsed to determine all external
- dependencies. Since every language has a different format
- for including files, this is kind of difficult. As a last
- resort, if you are modifying include files, issue the
- SMAKE DBSFILE C command, which forces all files to be
- recompiled.
-
- Again, if the .DBS file is changed, (any command line
- parameters to the compiler, ...) then all files should be
- recompiled with the C option.
-
-
- THE FINE PRINT
-
- I am not responsible if this program causes thermonuclear
- reactions, acts of God, or hard disk thrashing. I'll feel
- real bad, but don't expect any money from me about it! So,
- use it at your own risk.
-
- Hey, this is shareware, so you know the rules. Use it for a
- while. If it doesn't make your programming tasks any easier,
- dump it off of your disk and go about your business. If you
- find that you just can't get along without it, send me some
- money. I spent a long time writing this program (mostly
- FORTRAN, with the DOS file date routine in Assembler), so I
- deserve some credit, huh? Mail me a 10 spot and we'll call
- it even. Hey, if 10 bucks is too much money, then you need
- to charge more for YOUR services. If you do register it,
- I might even help you set up the .DBS file. (You are on your
- own with the .LNK file)
-
- On closing:
- The reason I wrote this program in the first place was
- because I had been using Unix's MAKEFILE, which I thought was
- clever. I then looked at some aftermarket products, but all
- of the makefile syntax was so crazy, it was like learning a
- new language. If you can get filenames and options on the
- correct line, then you are set. If you can't, then you
- probably wouldn't have much better luck with any other make
- system.
-
-
- ADEPT COMPUTER CONSULTANTS
- Rich Rector
- 2141 South Sandusky Ave.
- Tulsa, OK 74114-2133
- (918) 747-8405
-
-
-
-
-
-
-
-
-
-