Tcl Extension Architecture (TEA) Sample Extension

Check-in [e2ca4bafe0]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Use macros and targets from reworked rules.vc
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | vc-reform
Files: files | file ages | folders
SHA1: e2ca4bafe0844205f12d2847fc78e267f6708584
User & Date: ashok 2017-10-04 13:36:18.696
Context
2017-10-05
17:07
Moved pkgindex to rules and cleaned up check-in: f5f3d48f4e user: ashok tags: vc-reform
2017-10-04
13:36
Use macros and targets from reworked rules.vc check-in: e2ca4bafe0 user: ashok tags: vc-reform
2017-10-03
13:40
Begin work on reformed nmake builds check-in: 85e6acba66 user: ashok tags: vc-reform
Changes
Unified Diff Ignore Whitespace Patch
Changes to win/makefile.vc.
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

PROJECT = sample

# Uncomment the following line if this is a Tk extension.
#PROJECT_REQUIRES_TK=1
!include "rules-ext.vc"

DLLOBJS = \
	$(TMP_DIR)\tclsample.obj \
	$(TMP_DIR)\sample.obj \
!if !$(STATIC_BUILD)
	$(TMP_DIR)\sample.res
!endif

#-------------------------------------------------------------------------
# Target names and paths ( shouldn't need changing )
#-------------------------------------------------------------------------

BINROOT		= $(MAKEDIR)
ROOT            = $(MAKEDIR)\..

PRJIMPLIB	= $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
PRJLIBNAME	= $(PROJECT)$(VERSION)$(SUFX).$(EXT)
PRJLIB		= $(OUT_DIR)\$(PRJLIBNAME)

PRJSTUBLIBNAME	= $(STUBPREFIX)$(VERSION).lib
PRJSTUBLIB	= $(OUT_DIR)\$(PRJSTUBLIBNAME)

PRJ_DEFINES = -DMODULE_SCOPE=extern \
	      -DPACKAGE_NAME="\"$(PROJECT)\"" \
              -DPACKAGE_VERSION="\"$(DOTVERSION)\"" \
              -D_CRT_SECURE_NO_WARNINGS


#---------------------------------------------------------------------
# TclTest flags
#---------------------------------------------------------------------

!if "$(TESTPAT)" != ""
TESTFLAGS = $(TESTFLAGS) -file $(TESTPAT)
!endif

#---------------------------------------------------------------------
# Project specific targets (EDIT)
#---------------------------------------------------------------------

all:	    setup $(PROJECT)
$(PROJECT): setup pkgIndex $(PRJLIB)




install:    install-binaries install-libraries install-docs
pkgIndex:   $(OUT_DIR)\pkgIndex.tcl

test: setup $(PROJECT)
	@set TCL_LIBRARY=$(TCL_LIBRARY:\=/)
	@set TCLLIBPATH=$(OUT_DIR_PATH:\=/)
!if $(TCLINSTALL)
	@set PATH=$(_TCLDIR)\bin;$(PATH)







|






<
<
<
|
<
<
<
<
<
<
<
<
<
<


















|
|
>
>
>
>
|







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

PROJECT = sample

# Uncomment the following line if this is a Tk extension.
#PROJECT_REQUIRES_TK=1
!include "rules-ext.vc"

PRJ_OBJS = \
	$(TMP_DIR)\tclsample.obj \
	$(TMP_DIR)\sample.obj \
!if !$(STATIC_BUILD)
	$(TMP_DIR)\sample.res
!endif




# Additional compiler defines needed for this project










PRJ_DEFINES = -DMODULE_SCOPE=extern \
	      -DPACKAGE_NAME="\"$(PROJECT)\"" \
              -DPACKAGE_VERSION="\"$(DOTVERSION)\"" \
              -D_CRT_SECURE_NO_WARNINGS


#---------------------------------------------------------------------
# TclTest flags
#---------------------------------------------------------------------

!if "$(TESTPAT)" != ""
TESTFLAGS = $(TESTFLAGS) -file $(TESTPAT)
!endif

#---------------------------------------------------------------------
# Project specific targets (EDIT)
#---------------------------------------------------------------------

all:	    setup pkgIndex $(PRJLIB)

$(PRJLIB): $(PRJ_OBJS)
       $(MAKEBINCMD) $**
       $(_VC_MANIFEST_EMBED_DLL)
       -@del $*.exp

pkgIndex:   $(OUT_DIR)\pkgIndex.tcl

test: setup $(PROJECT)
	@set TCL_LIBRARY=$(TCL_LIBRARY:\=/)
	@set TCLLIBPATH=$(OUT_DIR_PATH:\=/)
!if $(TCLINSTALL)
	@set PATH=$(_TCLDIR)\bin;$(PATH)
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
!if $(TCLINSTALL)
	@set PATH=$(_TCLDIR)\bin;$(PATH)
!else
	@set PATH=$(_TCLDIR)\win\$(BUILDDIRTOP);$(PATH)
!endif
	$(DEBUGGER) $(TCLSH) $(SCRIPT)

# See <tcl>/win/coffbase.txt for extension base addresses.
$(PRJLIB): $(DLLOBJS)
	$(MAKEBINCMD) $**
	$(_VC_MANIFEST_EMBED_DLL)
	-@del $*.exp

#---------------------------------------------------------------------
# Implicit rules
#---------------------------------------------------------------------

{$(WINDIR)}.rc{$(TMP_DIR)}.res:
	$(MAKERESCMD)


#-------------------------------------------------------------------------
# Explicit dependency rules
#
#-------------------------------------------------------------------------

$(OUT_DIR)\pkgIndex.tcl: $(ROOT)\pkgIndex.tcl.in







<
<
<
<
<
<
<
<
<
<
<
<
<







219
220
221
222
223
224
225













226
227
228
229
230
231
232
!if $(TCLINSTALL)
	@set PATH=$(_TCLDIR)\bin;$(PATH)
!else
	@set PATH=$(_TCLDIR)\win\$(BUILDDIRTOP);$(PATH)
!endif
	$(DEBUGGER) $(TCLSH) $(SCRIPT)















#-------------------------------------------------------------------------
# Explicit dependency rules
#
#-------------------------------------------------------------------------

$(OUT_DIR)\pkgIndex.tcl: $(ROOT)\pkgIndex.tcl.in
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
# Installation. (EDIT)
#
# You may need to modify this section to reflect the final distribution
# of your files and possibly to generate documentation.
#
#---------------------------------------------------------------------

install-binaries:
	@echo Installing binaries to '$(SCRIPT_INSTALL_DIR)'
	@if not exist "$(SCRIPT_INSTALL_DIR)" mkdir "$(SCRIPT_INSTALL_DIR)"
	@$(CPY) $(PRJLIB) "$(SCRIPT_INSTALL_DIR)" >NUL

install-libraries: $(OUT_DIR)\pkgIndex.tcl
	@echo Installing libraries to '$(SCRIPT_INSTALL_DIR)'
	@if exist $(LIBDIR) $(CPY) $(LIBDIR)\*.tcl "$(SCRIPT_INSTALL_DIR)"
	@echo Installing package index in '$(SCRIPT_INSTALL_DIR)'
	@$(CPY) $(OUT_DIR)\pkgIndex.tcl $(SCRIPT_INSTALL_DIR)

install-docs:
	@echo Installing documentation files to '$(DOC_INSTALL_DIR)'
	@if exist $(DOCDIR) $(CPY) $(DOCDIR)\*.n "$(DOC_INSTALL_DIR)"

#---------------------------------------------------------------------
# Clean up
#---------------------------------------------------------------------

clean:
	@if exist $(TMP_DIR)\nul $(RMDIR) $(TMP_DIR)
	@if exist $(WINDIR)\version.vc del $(WINDIR)\version.vc
	@if exist $(WINDIR)\versions.vc del $(WINDIR)\versions.vc
	@if exist $(WINDIR)\vercl.i del $(WINDIR)\vercl.i
	@if exist $(WINDIR)\vercl.x del $(WINDIR)\vercl.x
	@if exist $(WINDIR)\_junk.pch del $(WINDIR)\_junk.pch

realclean: clean
	@if exist $(OUT_DIR)\nul $(RMDIR) $(OUT_DIR)

distclean: realclean
	@if exist $(WINDIR)\nmakehlp.exe del $(WINDIR)\nmakehlp.exe
	@if exist $(WINDIR)\nmakehlp.obj del $(WINDIR)\nmakehlp.obj







|
<
<
<
<
<
<
<
<
<





<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
242
243
244
245
246
247
248
249









250
251
252
253
254



255














# Installation. (EDIT)
#
# You may need to modify this section to reflect the final distribution
# of your files and possibly to generate documentation.
#
#---------------------------------------------------------------------

install: install-docs










install-docs:
	@echo Installing documentation files to '$(DOC_INSTALL_DIR)'
	@if exist $(DOCDIR) $(CPY) $(DOCDIR)\*.n "$(DOC_INSTALL_DIR)"