home *** CD-ROM | disk | FTP | other *** search
- PWRMAKE Version 1.4
- Copyright (c) 1991-1992 Clifford Wiebe [CIS ID: 73670,1377]
-
- HISTORY
- ───────
-
- Tue 07-14-1992 v1.4
-
- My sincere apologies. Version 1.3 was uploaded with two support
- functions missing: DEFAULT (UDC from Rick Spence's book) and
- StripPath(), which strips a path from a filename. Include files
- commands.ch and string.ch are no longer necessary nor referenced.
-
- Sun 07-05-1992 v1.3
-
-
- INTRODUCTION
- ────────────
-
- Pwrmake that will create a series of files to assist the developer in
- maintaining Clipper 5.1 project. It creates a make file, utilizing the
- clipper environment variables for the object, header, lib and compiler
- directives. Two batch files are also created, BACKUP.BAT and
- RESTORE.BAT. These two files allow automated backup and restore of the
- project. These batch files use a program, CHECKVOL.EXE, which is
- included, to verify the volume label on the diskette.
-
- Powermake came about while trying to explain make files to other
- developers in our shop. Most of them were using Summer 87 and had
- never used the make utility included with Clipper. Most often they
- created a batch file which compiled the whole system, a task that's
- worth getting a coffee even if you're using a 386.
-
- Why should I use make files?
-
- 1. Faster recompiling of projects. Only the programs that were
- modified will be compiled.
-
- 2. Built-in project documentation. By looking at the .RMK file, the
- developer can see all source files needed to recreate the project.
-
- 3. Less documentation required for a project. Have you ever had to
- make a change to someone else's code when he/she is on holidays?
- It takes time just to figure out which programs should be
- included. Using Pwrmake, the same command is used to make any
- system, COMPILE.BAT.
-
- USING PWRMAKE
- ─────────────
-
- Syntax PwrMake /nproject [switches]
-
- where: /n<project> = project name
-
- switches: /a<name> = author's name
- /b<dir> = backup directory, defaults to c:\zip
- /c<compiler>= compiler name, defaults to CLIPPER.EXE
- /o = overwrite existing files without prompting
- /d<dir> = dbf file directory, defaults to current directory
- /? = displays help screen
- /m<MainPrg> = Main (.prg) file for project. This file
- will not be overlayed by BLINKER.
- Defaults to <project> if omitted.
-
- Files Created:
- compile.bat runs RMAKE with <project>.rmk
- backup.bat Backs up complete system to zipfile and
- diskette. /DATA will backup dbf/ntx files
- restore.bat Restores system from diskette saved with
- Backup.bat. /DATA restores dbf/ntx files.
- <project>.RMK Make file
- <project>.LNK Link file
- <project>.LST File list for pkzip
-
- Compiling PwrMake
- ─────────────────
-
- I know that Pwrmake doesn't follow the normal rules of modular
- programming. This was done for simplicities sake, I just didn't
- think it was worth it. The executable program is not included
- in this archive, you must compile and link Pwrmake before you
- can use it.
-
- To create Pwrmake.exe:
-
- Compile with Clipper 5.01
- CLIPPER pwrmake /n no implicit startup procedure
-
- BLINKER FI pwrmake assumes environment LIB is set.
-
-
- USING PWRMAKE
- ─────────────
-
- 1. Change to the directory where the make files are to built.
-
- 2. Key in the Pwrmake command line
-
- Pwrmake /nBigProj /aClifford Wiebe /o /bc:\backup /dc:\data
- /cCLIPWARN /mPwrMake
-
- 3. That's it. All the required files are created and you are returned
- to DOS.
-
- Explanation of Files
- ────────────────────
-
- The examples given here are the actual files created when you run
- Pwrmake in a separate directory with Pwrmake.prg using the command
- line above.
-
- COMPILE.BAT batch file to invoke rmake
-
- Syntax: COMPILE
-
- COMPILE assumes rmake is on your path. It is a simple batch file
- that calls RMAKE with the rmake file.
-
- *----------------------------------------------------------------
-
- BIGPROJ.RMK RMAKE compatible make file
-
-
- Example make file:
-
- // Make File....: BIGPROJ
- // Date Created.: 07/04/92
- // Author.......: Clifford Wiebe
- // Comments.....: Created by Pwrmake
- //
-
- // Make File macros
- COMPILER = CLIPWARN // Compiler Name
- CLIPPERCMD = /v /w /m // Default Compiler Directives
- LINKERNAME = BLINKER // Linker name
- CLIPDEBUG = /v /w /m /b // Debug Compiler Directives
-
- // makepath macros
- makepath[.obj] = .;C:\CLIPPER5\OBJ
- makepath[.ch] = C:\CLIPPER5\INCLUDE
- makepath[.lib] = C:\CLLIPPER5\LIB
- makepath[.pll] = C:\CLIPPER5\PLL
-
- // Inference rules
- .PRG.OBJ:
- $(COMPILER) $* (CLIPPERCMD)
-
- PWRMAKE.OBJ : PWRMAKE.PRG
-
- BIGPROJ.EXE :
- $(LINKERNAME) @BIGPROJ.LNK
-
- *----------------------------------------------------------------
-
- BIGPROJ.LNK Link File
-
- # Link File....: BIGPROJ
- # Date Created.: 07/04/92
- # Author.......: Clifford Wiebe
-
- BLINKER OVERLAY FIXED
- BLINKER OVERLAY UMB ON
- BLINKER OVERLAY PAGEFRAME ON
- BLINKER ENVIRONMENT NAME BIGPROJ
- BLINKER INCREMENTAL ON
- OUTPUT pwrmake.exe
- FILE pwrmake
- #Force commonly used routines resident
- #module -*-*-* place common routine here
- BEGINAREA
- FILE pwrmake
- ENDAREA
- # Overlayed Library files, could be replaced with
- # one of various (.std) files available
- BEGINAREA
- allocate nanfor
- allocate extend
- ENDAREA
- SEARCH CLIPPER
- SEARCH DBFNTX
- SEARCH TERMINAL
-
- If you use a profiler to determine which modules would benefit
- from staying resident, replace the module line including those
- functions.
-
- ie: .
- .
- .
- module setcursor, qout in clipper
- .
- .
- .
- *----------------------------------------------------------------
-
- BACKUP.BAT used to backup project in current directory
-
- Syntax: BACKUP [ A: / B:]
-
- This file can be used to move projects from one computer to another,
- or to keep a backup to restore if your idea wasn't as good as you
- thought it was. The diskette drive letter must be specified on the
- BACKUP command line. The CheckVol utility is used to verify the label
- on the diskette in the drive. You can put a label on a diskette with
- DOS's LABEL or Norton's VL command. This ensures you have the correct
- diskette in the drive. BACKUP.BAT zips all the files listed in
- BIGPROJ.LST in the directory specified with the /b parameter. The
- zipfile is then copied to the diskette in the drive specified on
- the command line.
-
-
- @Echo Off
- REM Backup Batch File created by PwrMake on 07/04/92
- if (%1)==() goto nodrive
-
- REM Next section uses CheckVol to verify the disk is correct
- REM You can use the DOS Label or Nortons VL command to put
- REM a volume label on a disk
- REM Checkvol is a utility written in C
- :checkdisk
- checkvol %1BIGPROJ
- if errorlevel 1 goto wrong
- goto continue
- :wrong
- Echo BIGPROJ disk not found in Drive %1
- pause
- goto checkdisk
-
- :continue
- Echo Backing up BIGPROJ system to Drive %1 using BIGPROJ.LST
- if not exist c:\backup\NUL echo Creating c:\backup\ directory
- if not exist c:\backup\*.* if not exist c:\backup\NUL md c:\backup
- pkzip -u c:\backup\BIGPROJ @BIGPROJ.lst
- echo Copying ZipFile to Diskette in Drive %1
- copy c:\backup\BIGPROJ.zip %1 > NUL
-
- REM Check if data should be backed up
- if (%2)==() goto end
- if (%2)==(/DATA) goto data
- if (%2)==(/data) goto data
- goto end
-
- :DATA
- Echo Backing up DBF/NTX files
- pkzip -u c:\backup\BIGPROJD c:\data\*.dbf c:\data\*.ntx
- Echo Ready to move BIGPROJD.zip to Drive %1, any key
- pause > nul
- copy c:\backup\BIGPROJD.zip %1 > NUL
- goto end
-
- :noDrive
- echo Drive not specified
- echo Backup [a:/b:] [/DATA]
- :end
-
- *----------------------------------------------------------------
-
- RESTORE.BAT used to restore project to current directory
-
- IMPORTANT: I've had some problems using PKUNZIP when including
- pathnames on the files to extract. You may want to
- change this batch file to change to the data directory
- before calling PKUNZIP, and changing back to your
- project directory.
-
- Syntax: RESTORE [A: / B:]
-
- @Echo Off
- REM Restore Batch File created by PwrMake on 07/04/92
- if (%1)==() goto nodrive
-
- REM Next section uses CheckVol to verify the disk is correct
- REM You can use the DOS Label or Nortons VL command to put
- REM a volume label on a disk
- :checkdisk
- checkvol %1BIGPROJ
- if errorlevel 1 goto wrong
- goto continue
- :wrong
- Echo BIGPROJ disk not found in Drive %1
- pause
- goto checkdisk
-
- :continue
- if not exist c:\backup\NUL echo Creating c:\backup\ directory
- if not exist c:\backup\*.* if not exist c:\backup\NUL md c:\backup
- if not exist %1BIGPROJ.zip goto nofile
- Echo Restoring BIGPROJ system from Drive %1
- copy %1BIGPROJ.zip c:\backup\BIGPROJ
- Echo Only files newer than existing files will be restored
- pkunzip -n c:\backup\BIGPROJ
-
- REM Check if data should be backed up
- if (%2)==() goto end
- if (%2)==(/DATA) goto data
- if (%2)==(/data) goto data
- goto end
-
- :DATA
- Echo Restoring DBF/NTX files
- :CheckData
- if not exist %1BIGPROJD.zip goto NoData
- copy %1BIGPROJD.zip c:\backup\BIGPROJD.zip > nul
- pkunzip -n c:\backup\BIGPROJD c:\data\*.dbf c:\data\*.ntx
- goto end
-
- :NoData
- echo Data File %1BIGPROJD.zip not found
- echo Insert Data Disk and press a key
- pause > nul
- goto CheckData
-
- :nofile
- echo BIGPROJ.zip not found on Drive %1
- goto end
-
- :noDrive
- echo Drive not specified
- :end
-
- RESTRICTIONS
- ────────────
-
- - Currently only supports the BLINKER linker. I could have
- written the RTLINK file instead with an '/l' switch, but
- I got tired of typing.
-
- - Cannot maintain (.rmk) and (.lnk) files. It would be nice
- any customization to Pwrmake'd files wouldn't be lost. I
- use my own development library which I have to add into
- the allocate section of the link file.
-
- - Assumes all needed (.exe) files are in the path.
-
- SUMMARY
- ───────
-
- This software is an original work by Clifford Wiebe and is released
- into the public domain without restrictions. It cannot be sold for
- any purpose, but it can be given away freely. The software is
- supplied as is without any explicit or implied warranty of any kind.
- All risks associated with using this software are yours.
-
- Clifford Wiebe will not be liable for any special, incidental,
- consequential, indirect or similar damages due to the loss of
- data, loss of business profits, business interruption or any other
- reason, even if Clifford Wiebe has been advised of the possibility
- of such damages.
-
- That's about it. The program was trivial to write, mostly a typing
- excercise, but I've found it has saved me some time. It is especially
- useful to create the support files for projects that don't currently
- use rmake. I
-
-