forked from aufflick/smc_mirror
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
283 lines (268 loc) · 8.69 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy
# of the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an
# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is State Machine Compiler (SMC).
#
# The Initial Developer of the Original Code is Charles W. Rapp.
# Portions created by Charles W. Rapp are
# Copyright (C) 2000 - 2004. Charles W. Rapp.
# All Rights Reserved.
#
# Port to Python by Francois Perrad, [email protected]
# Copyright 2004, Francois Perrad.
# All Rights Reserved.
#
# Contributor(s):
# Eitan Suez contributed examples/Ant.
# (Name withheld) contributed the C# code generation and
# examples/C#.
# Francois Perrad contributed the Python code generator and
# examples/Python.
# Chris Liscio contributed Objective-C code generation and
# examples/ObjC.
#
# RCS ID
# Id: Makefile,v 1.15 2009/12/18 15:51:33 cwrapp Exp
#
# CHANGE LOG
# (See the bottom of this file.)
#
#################################################################
# Macros.
#
# Include the official macros.
include ./smc.mk
TAR_FILE= ./smc_$(VERSION).tar
TAR_GZ_FILE= $(TAR_FILE:.tar=.tar.gz)
GZIP_FILE= $(TAR_FILE:.tar=.tgz)
ZIP_FILE= ./smc_$(VERSION).zip
SRC_TAR_FILE= ./staging/Releases/SmcSrc_$(VERSION).tar
SRC_TAR_GZ_FILE= $(SRC_TAR_FILE:.tar=.tar.gz)
SRC_GZIP_FILE= $(SRC_TAR_FILE:.tar=.tgz)
SRC_ZIP_FILE= ./staging/Releases/SmcSrc_$(VERSION).zip
SRC_TAR_LIST= ./smc/tar_list.txt
SRC_ZIP_LIST= ./smc/zip_list.txt
#################################################################
# Rules.
#
# Compile the Java documentation.
javadocs :
$(JAVADOC) $(JAVADOC_FLAGS) @$(DOC_SOURCES)
# Copy all products to the staging directory.
install : $(SMC_STAGING_DIR)
-$(RM_RF) $(SMC_STAGING_DIR)/*
$(MAKE) -C lib install
$(MAKE) -C net/sf/smc install
$(CP_RFP) ./docs $(SMC_STAGING_DIR)
$(CP_RFP) ./examples $(SMC_STAGING_DIR)
$(CP_RFP) ./tools $(SMC_STAGING_DIR)
-find $(SMC_STAGING_DIR) -name CVS -type d -exec rm -fr {} \; -prune
-find $(SMC_STAGING_DIR) -name .DS_Store -exec rm -fr {} \;
$(MAKE) -C misc install
$(CP_F) LICENSE.txt $(SMC_STAGING_DIR)
$(CP_F) README.txt $(SMC_STAGING_DIR)
$(CHMOD) 444 $(SMC_STAGING_DIR)/bin/Smc.jar
uninstall :
$(MAKE) -C lib uninstall
$(MAKE) -C net/sf/smc uninstall
$(MAKE) -C misc uninstall
$(RM_RF) $(SMC_STAGING_DIR)/examples
-$(RM_F) $(SMC_STAGING_DIR)/LICENSE.txt
-$(RM_F) $(SMC_STAGING_DIR)/README.txt
clean :
$(MAKE) -C lib clean
$(MAKE) -C ./net/sf/smc clean
smc_dist : $(SMC_STAGING_DIR)
-(cd $(RELEASE_DIR); \
$(RM_F) $(TAR_FILE) \
$(TAR_GZ_FILE) \
$(GZIP_FILE) \
$(ZIP_FILE))
-$(RM_RF) $(SMC_RELEASE_DIR)
$(MV) $(SMC_STAGING_DIR) $(SMC_RELEASE_DIR)
(cd $(STAGING_DIR); \
tar cvf $(TAR_FILE) ./smc_$(VERSION); \
gzip $(TAR_FILE); \
$(MV) $(TAR_GZ_FILE) $(GZIP_FILE))
(cd $(STAGING_DIR); \
zip -b . -r $(ZIP_FILE) ./smc_$(VERSION))
src_dist : $(SMC_RELEASE_DIR)
$(CP_F) lib/C++/statemap.h $(SMC_RELEASE_DIR)/lib
$(CP_F) lib/Java/statemap.jar $(SMC_RELEASE_DIR)/lib
(cd ..; \
$(RM_F) $(SRC_TAR_FILE) \
$(SRC_TAR_GZ_FILE) \
$(SRC_GZIP_FILE) \
$(SRC_ZIP_FILE); \
tar cvmpfT $(SRC_TAR_FILE) $(SRC_TAR_LIST); \
gzip $(SRC_TAR_FILE); \
$(MV) $(SRC_TAR_GZ_FILE) $(SRC_GZIP_FILE); \
zip -b . -r $(SRC_ZIP_FILE) ./smc -i@$(SRC_ZIP_LIST))
dist : install smc_dist src_dist
distclean :
-(cd $(RELEASE_DIR); \
$(RM_F) $(TAR_FILE) \
$(TAR_GZ_FILE) \
$(GZIP_FILE) \
$(ZIP_FILE))
-$(RM_RF) $(SMC_RELEASE_DIR)
-(cd ..; \
$(RM_FR) $(SRC_TAR_FILE) \
$(SRC_TAR_GZ_FILE) \
$(SRC_GZIP_FILE) \
$(SRC_ZIP_FILE))
realclean :
$(MAKE) -C lib realclean
$(MAKE) -C ./net/sf/smc realclean
#
# CHANGE LOG
# Log: Makefile,v
# Revision 1.15 2009/12/18 15:51:33 cwrapp
# Created separate tar and zip file lists.
#
# Revision 1.14 2009/03/27 09:41:44 cwrapp
# Added F. Perrad changes back in.
#
# Revision 1.13 2009/03/01 18:20:36 cwrapp
# Preliminary v. 6.0.0 commit.
#
# Revision 1.12 2008/05/20 18:31:06 cwrapp
# ----------------------------------------------------------------------
#
# Committing release 5.1.0.
#
# Modified Files:
# Makefile README.txt smc.mk tar_list.txt bin/Smc.jar
# examples/Ant/EX1/build.xml examples/Ant/EX2/build.xml
# examples/Ant/EX3/build.xml examples/Ant/EX4/build.xml
# examples/Ant/EX5/build.xml examples/Ant/EX6/build.xml
# examples/Ant/EX7/build.xml examples/Ant/EX7/src/Telephone.java
# examples/Java/EX1/Makefile examples/Java/EX4/Makefile
# examples/Java/EX5/Makefile examples/Java/EX6/Makefile
# examples/Java/EX7/Makefile examples/Ruby/EX1/Makefile
# lib/statemap.jar lib/C++/statemap.h lib/Java/Makefile
# lib/Php/statemap.php lib/Scala/Makefile
# lib/Scala/statemap.scala net/sf/smc/CODE_README.txt
# net/sf/smc/README.txt net/sf/smc/Smc.java
# ----------------------------------------------------------------------
#
# Revision 1.11 2007/01/15 00:23:46 cwrapp
# Release 4.4.0 initial commit.
#
# Revision 1.10 2005/11/07 19:34:53 cwrapp
# Changes in release 4.3.0:
# New features:
#
# + Added -reflect option for Java, C#, VB.Net and Tcl code
# generation. When used, allows applications to query a state
# about its supported transitions. Returns a list of transition
# names. This feature is useful to GUI developers who want to
# enable/disable features based on the current state. See
# Programmer's Manual section 11: On Reflection for more
# information.
#
# + Updated LICENSE.txt with a missing final paragraph which allows
# MPL 1.1 covered code to work with the GNU GPL.
#
# + Added a Maven plug-in and an ant task to a new tools directory.
# Added Eiten Suez's SMC tutorial (in PDF) to a new docs
# directory.
#
# Fixed the following bugs:
#
# + (GraphViz) DOT file generation did not properly escape
# double quotes appearing in transition guards. This has been
# corrected.
#
# + A note: the SMC FAQ incorrectly stated that C/C++ generated
# code is thread safe. This is wrong. C/C++ generated is
# certainly *not* thread safe. Multi-threaded C/C++ applications
# are required to synchronize access to the FSM to allow for
# correct performance.
#
# + (Java) The generated getState() method is now public.
#
# Revision 1.9 2005/09/11 15:28:47 cwrapp
# Changes in release 4.2.0:
# New features:
#
# + Added C, Perl and Ruby language generation.
#
# + Added method valueOf(int stateId) to Java, C# and VB.Net to
# allow developers to hand-serialize and deserialize state
# machines.
#
# Fixed the following bugs:
#
# + (C#) Removed extraneous "bool loopbackFlag = false" line
# from Default state transitions.
#
# + (C#) Added "Trace.Listeners.Add(myWriter)" line when generating
# debug code. By not having this line it prevented debug output
# from being outuput.
#
# + Corrected parser abend when a transition was missing an
# endstate.
#
# Revision 1.8 2005/06/18 18:28:36 cwrapp
# SMC v. 4.0.1
#
# New Features:
#
# (No new features.)
#
# Bug Fixes:
#
# + (C++) When the .sm is in a subdirectory the forward- or
# backslashes in the file name are kept in the "#ifndef" in the
# generated header file. This is syntactically wrong. SMC now
# replaces the slashes with underscores.
#
# + (Java) If %package is specified in the .sm file, then the
# generated *Context.java class will have package-level access.
#
# + The Programmer's Manual had incorrect HTML which prevented the
# pages from rendering correctly on Internet Explorer.
#
# + Rewrote the Programmer's Manual section 1 to make it more
# useful.
#
# Revision 1.7 2005/06/08 11:08:58 cwrapp
# + Updated Python code generator to place "pass" in methods with empty
# bodies.
# + Corrected FSM errors in Python example 7.
# + Removed unnecessary includes from C++ examples.
# + Corrected errors in top-level makefile's distribution build.
#
# Revision 1.6 2005/05/28 19:41:44 cwrapp
# Update for SMC v. 4.0.0.
#
# Revision 1.6 2004/10/30 15:34:17 charlesr
# Corrected dist rule and associated macros.
#
# Revision 1.5 2004/10/08 18:44:07 charlesr
# Changed version to 3.1.2.
#
# Revision 1.4 2004/10/02 19:59:18 charlesr
# Changed version to 3.1.1.
#
# Revision 1.3 2004/09/06 15:03:12 charlesr
# Updated for SMC v. 3.1.0.
#
# Revision 1.2 2004/05/31 15:18:29 charlesr
# Added rule for generating source distribution.
#
# Revision 1.1 2004/05/30 21:37:06 charlesr
# Changed version to 3.0.0.
#
# Revision 1.0 2003/12/14 21:07:53 charlesr
# Initial revision
#