forked from aufflick/smc_mirror
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsmc.mk
333 lines (318 loc) · 9.68 KB
/
smc.mk
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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
#
# 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 - 2008. 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 Perrord contributed the Python code generator and
# examples/Python.
# Chris Liscio contributed Objective-C code generation and
# examples/ObjC.
#
# RCS ID
# $Id$
#
# CHANGE LOG
# (See the bottom of this file.)
#
#################################################################
# Macros.
#
VERSION= 6_6_0
STAGING_DIR= ../staging
SMC_STAGING_DIR=$(STAGING_DIR)/smc
SMC_RELEASE_DIR=$(STAGING_DIR)/smc_$(VERSION)
RELEASE_DIR= $(STAGING_DIR)/releases
PACKAGE_NAME= statemap
CP_F= cp -f
CP_RFP= cp -R -f -p
CHMOD= chmod
MKDIR= mkdir -p
MV= mv
RM_F= rm -f
RM_RF= rm -rf
JAVA_HOME ?= /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home
JAVA_BIN= $(JAVA_HOME)/bin/
JAVAC= $(JAVA_BIN)javac
JAR= $(JAVA_BIN)jar
JAVADOC= javadoc
DOC_VERSION= $(VERSION)
DOC_DIR= ./docs/javadocs
DOC_SOURCES= ./doc_sources.txt
WINDOW_TITLE= 'SMC v. $(DOC_VERSION) API Specification'
DOC_TITLE= 'SMC v. $(DOC_VERSION) API Specification'
HEADER= '<b>SMC</b><br><font size="-1">$(DOC_VERSION)</font>'
FOOTER= '<font size=-1>Copyright © 2015. Charles W. Rapp. All Rights Reserved. Use is subject to <a href=\"\">license terms</a>.</font>'
OVERVIEW= ./overview.html
JAVADOC_FLAGS= -protected \
-d $(DOC_DIR) \
-sourcepath . \
-use \
-classpath ./lib/statemap.jar \
-overview $(OVERVIEW) \
-windowtitle $(WINDOW_TITLE) \
-doctitle $(DOC_TITLE) \
-header $(HEADER) \
-bottom $(FOOTER)
# Alternate version based on Perl (compatible Windows / *nix)
#CP= perl -MExtUtils::Command -e cp
#CHMOD= perl -MExtUtils::Command -e ExtUtils::Command::chmod
#MKDIR= perl -MExtUtils::Command -e mkpath
#RM_F= perl -MExtUtils::Command -e rm_f
#RM_RF= perl -MExtUtils::Command -e rm_rf
#################################################################
# Rules.
#
# Create the staging directories if needed
$(STAGING_DIR) :
$(MKDIR) $(STAGING_DIR)
$(SMC_STAGING_DIR) : $(STAGING_DIR)
-$(RM_RF) $(SMC_STAGING_DIR)
$(MKDIR) $(SMC_STAGING_DIR)
#
# CHANGE LOG
# $Log$
# Revision 1.26 2015/08/02 19:44:31 cwrapp
# Release 6.6.0 commit.
#
# Revision 1.25 2015/02/16 21:43:01 cwrapp
# SMC v. 6.5.0
#
# SMC - The State Machine Compiler v. 6.5.0
#
# Major changes:
#
# (Java)
# Added a new "-java7" target language. This version represents
# the FSM as a transition table. The transition table maps the
# current state and the transition to a
# java.lang.invoke.MethodHandle. The transition is executed by
# calling MethodHandle.invokeExact, which is only slightly
# slower than a compiled method call.
#
# The -java7 generated code is compatible with -java generated
# code. This allows developers to switch between the two
# without changing application code.
#
# NOTE: -java7 requires Java 1.7 or latter to run.
#
#
# Minor changes:
#
# (None.)
#
#
# Bug Fixes:
#
# (Objective-C)
# Incorrect initWithOwner body generated. Same fundamental
# problem as SF bug 200. See below.
# (SF bug 198)
#
# (Website)
# Corrected broken link in FAQ page.
# (SF bug 199)
#
# (C++)
# Corrected the invalid generated FSM class name.
# (SF bug 200)
#
# (C)
# EXIT_STATE() #define macro not generated.
# (SF bug 201)
#
# (Manual)
# Corrected examples which showed %fsmclass and %map set to the
# same name. This is invalid for most target languages since
# that would mean the nested map class would have the same name
# as the containing FSM class.
#
#
#
# ++++++++++++++++++++++++++++++++++++++++
#
# If you have any questions or bugs, please surf
# over to http://smc.sourceforge.net and check out
# the discussion and bug forums. Note: you must be
# a SourceForge member to add articles or bugs. You
# do not have to be a member to read posted
# articles or bugs.
#
# Revision 1.24 2014/09/28 15:41:15 cwrapp
# SMC 6.4.0 release.
#
# Revision 1.23 2013/09/02 14:45:52 cwrapp
# SMC 6.3.0 commit.
#
# Revision 1.22 2013/07/14 14:32:34 cwrapp
# check in for release 6.2.0
#
# Revision 1.21 2011/11/20 14:58:32 cwrapp
# Check in for SMC v. 6.1.0
#
# Revision 1.20 2009/09/05 15:39:16 cwrapp
# Checking in fixes for 1944542, 1983929, 2731415, 2803547 and feature 2797126.
#
# Revision 1.19 2009/03/27 09:41:44 cwrapp
# Added F. Perrad changes back in.
#
# Revision 1.18 2009/03/01 18:20:36 cwrapp
# Preliminary v. 6.0.0 commit.
#
# Revision 1.17 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.16 2008/02/04 10:39:48 fperrad
# + common variables
#
# Revision 1.15 2008/01/14 19:59:18 cwrapp
# Release 5.0.2 check-in.
#
# Revision 1.14 2007/08/05 12:57:18 cwrapp
# Version 5.0.1 check-in. See net/sf/smc/CODE_README.txt for more information.
#
# Revision 1.13 2007/03/31 13:48:22 cwrapp
# Version 5.0.0 check-in.
#
# Revision 1.12 2007/01/15 00:23:46 cwrapp
# Release 4.4.0 initial commit.
#
# Revision 1.11 2006/09/16 15:04:27 cwrapp
# Initial v. 4.3.3 check-in.
#
# Revision 1.10 2006/07/11 18:33:20 cwrapp
# Updated version.
#
# Revision 1.9 2006/04/22 12:45:22 cwrapp
# Version 4.3.1
#
# Revision 1.8 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.7 2005/09/19 15:20:01 cwrapp
# Changes in release 4.2.2:
# New features:
#
# None.
#
# Fixed the following bugs:
#
# + (C#) -csharp not generating finally block closing brace.
#
# Revision 1.6 2005/09/14 01:51:33 cwrapp
# Changes in release 4.2.0:
# New features:
#
# None.
#
# Fixed the following bugs:
#
# + (Java) -java broken due to an untested minor change.
#
# Revision 1.5 2005/08/26 15:21:33 cwrapp
# Final commit for release 4.2.0. See README.txt for more information.
#
# Revision 1.4 2005/06/30 10:44:02 cwrapp
# Added %access keyword which allows developers to set the generate Context
# class' accessibility level in Java and C#.
#
# Revision 1.3 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.2 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.1 2005/05/28 19:41:44 cwrapp
# Update for SMC v. 4.0.0.
#