source: trunk/warpin/makefile @ 699

Last change on this file since 699 was 699, checked in by John Small, 13 years ago
  • Apparently WMAKE considers '#', even within double quotes, to be

a comment. So the search strings used by SED to insert files and
macro values into FM2.WIS were changed so that '#' were no longer
used as delimiters of these strings.

File size: 2.8 KB
Line 
1# warpin\makefile - build the FM/2 Warpin installation file: FM2.WIS
2# $Id: $
3
4# 28 Apr 07 SHL Add clean target
5# 13 May 07 SHL Tweak macro handling to work as documented
6# 13 May 07 SHL Correct clean target
7# 08 Jun 07 JBS Corrected BUILD_FM2UTILS code so that it is actually
8#               possible to disable the build of the FM2UTILS*.WPI file
9
10# Environment:
11
12# DEBUG  0 = release build, 1 = debug build
13
14# If BUILD_FM2UTILS defined, build FM2UTILS*.wpi and FM2*.wpi
15# Otherwise build just FM2*.wpi
16!ifndef BUILD_FM2UTILS
17BUILD_FM2UTILS=1
18!endif
19
20# FM2_VER defines fm/2 WPI file name suffix
21# e.g. FM2_VER=-3-5-9 results in FM2-3-5-9.wpi being built
22# If FM2_VER is empty, then FM2.wpi is built
23# NOTE: Start the variable with '-'
24
25!ifndef FM2_VER
26FM2_VER=-3-5-9
27!endif
28
29# FM2UTILS_VER defines the fm2utils WPI file name suffix.
30# e.g. FM2UTILS_VER=-1-0 results in FM2Utils-1.0.wpi being built
31# If FM2UTILS_VER is empty, then FM2UTILS.wpi is built
32# NOTE: Start the variable with '-'
33
34!ifndef FM2UTILS_VER
35FM2UTILS_VER=-1-0-1
36!endif
37
38all: wpi .symbolic
39
40!if $(BUILD_FM2UTILS) == 0
41wpi: checkfiles fm2$(FM2_VER).wpi .symbolic
42!else
43wpi: checkfiles fm2$(FM2_VER).wpi fm2utils$(FM2UTILS_VER).wpi .symbolic
44!endif
45
46
47checkfiles: .symbolic
48   @echo Checking to see if files have been changed...
49    ckfiles fm2$(FM2_VER).wpi
50
51fm2.wis: fm2.wis.in fm2utils\fm2utils.doc fm2utils\license.txt
52#  sed -e "s/@@@FM2UTILS_VER@@@/$(FM2UTILS_VER)/" -e "/@@@include fm2utils.doc@@@/r fm2utils\fm2utils.doc" -e "s/@@@include fm2utils.doc@@@//g" -e "/@@@include license.txt@@@/r fm2utils\license.txt" -e "s/@@@include license.txt@@@//g" fm2.wis.in >fm2.wis
53   sed -e "s/@@@FM2UTILS_VER@@@/$(FM2UTILS_VER)/" -e "/@@@include fm2utils.doc@@@/r fm2utils\fm2utils.doc" -e "s/@@@include fm2utils.doc@@@//" -e "/@@@include license.txt@@@/r fm2utils\license.txt" -e "s/@@@include license.txt@@@//" fm2.wis.in >fm2.wis
54
55fm2$(FM2_VER).wpi:: bld_fm2_wpidirs.in
56   @echo Staging files for WPI file...
57   bld_fm2_wpidirs
58   @echo Creating/updating the WPI file
59   bld_fm2_wpi fm2$(FM2_VER).wpi
60
61fm2$(FM2_VER).wpi:: fm2.wis
62   @echo Inserting the new Warpin script into the WPI file...
63   bld_fm2_wpi fm2$(FM2_VER).wpi /SCRIPT
64
65fm2utils$(FM2UTILS_VER).wpi: bld_fm2utils_wpi.cmd fm2utils.wis fm2utils\fm2utils.doc fm2utils\license.txt ..\shdwmgr.cmd
66   @echo Building FM2Utils
67   bld_fm2utils_wpi fm2utils$(FM2UTILS_VER).wpi
68
69clean: .symbolic
70  -if exist fm2$(FM2_VER).wpi del fm2$(FM2_VER).wpi
71  -if exist fm2utils$(FM2UTILS_VER).wpi del fm2utils$(FM2UTILS_VER).wpi
72  -if exist bld_fm2_wpidirs.in del bld_fm2_wpidirs.in
73  clean_wpidirs
74
75# fixme to decide if these should be cleaned and not distcleaned
76distclean: clean .symbolic
77  -if exist fm2.wis del fm2.wis
78
79# The end
80
81
Note: See TracBrowser for help on using the repository browser.