Revision 03418fed

b/gnuradio-core/src/lib/swig/Makefile.swig.gen
82 82
## .h file is sometimes built, but not always ... so that one has to
83 83
## be added manually by the including Makefile.am .
84 84

85
swig_built_sources += gnuradio_swig_py_runtime.py gnuradio_swig_py_runtime_python.cc
85
swig_built_sources += gnuradio_swig_py_runtime.py #gnuradio_swig_py_runtime.cc
86 86
if GUILE
87
swig_built_sources += gnuradio_swig_py_runtime.scm gnuradio_swig_py_runtime_guile.cc
87
swig_built_sources += gnuradio_swig_py_runtime.scm #gnuradio_swig_py_runtime.cc
88 88
endif
89 89

90 90
## Various SWIG variables.  These can be overloaded in the including
......
96 96
	$(gnuradio_swig_py_runtime_swiginclude_headers)
97 97

98 98
gnuradio_swig_py_runtime_pylib_LTLIBRARIES =		\
99
	_gnuradio_swig_py_runtime_python.la
99
	_gnuradio_swig_py_runtime.la
100 100

101
_gnuradio_swig_py_runtime_python_la_SOURCES = 		\
102
	gnuradio_swig_py_runtime_python.cc		\
101
_gnuradio_swig_py_runtime_la_SOURCES = 			\
102
	python/gnuradio_swig_py_runtime.cc		\
103 103
	$(gnuradio_swig_py_runtime_la_swig_sources)
104 104

105
_gnuradio_swig_py_runtime_python_la_LIBADD =		\
105
_gnuradio_swig_py_runtime_la_LIBADD =			\
106 106
	$(STD_SWIG_LA_LIB_ADD)		\
107 107
	$(gnuradio_swig_py_runtime_la_swig_libadd)
108 108

109
_gnuradio_swig_py_runtime_python_la_LDFLAGS =		\
109
_gnuradio_swig_py_runtime_la_LDFLAGS =			\
110 110
	$(STD_SWIG_LA_LD_FLAGS)		\
111 111
	$(gnuradio_swig_py_runtime_la_swig_ldflags)
112 112

113
_gnuradio_swig_py_runtime_python_la_CXXFLAGS =		\
113
_gnuradio_swig_py_runtime_la_CXXFLAGS =			\
114 114
	$(STD_SWIG_CXX_FLAGS)		\
115 115
	$(gnuradio_swig_py_runtime_la_swig_cxxflags)
116 116

117 117
gnuradio_swig_py_runtime_python_PYTHON =			\
118
	gnuradio_swig_py_runtime.py			\
119
	$(gnuradio_swig_py_runtime_python)
118
	python/gnuradio_swig_py_runtime.py		\
119
	$(gnuradio_swig_py_runtime)
120 120

121 121
if GUILE
122
gnuradio_swig_py_runtime_scmlib_LTLIBRARIES = _gnuradio_swig_py_runtime_guile.la
123
_gnuradio_swig_py_runtime_guile_la_SOURCES = 		\
124
	gnuradio_swig_py_runtime_guile.cc		        \
122
gnuradio_swig_py_runtime_scmlib_LTLIBRARIES = gnuradio_swig_py_runtime_guile.la
123
gnuradio_swig_py_runtime_guile_la_SOURCES = 		\
124
	guile/gnuradio_swig_py_runtime.cc		        \
125 125
	$(gnuradio_swig_py_runtime_la_swig_sources)
126 126
gnuradio_swig_py_runtime_scm_DATA = gnuradio_swig_py_runtime.scm
127 127

128 128
# Guile can use the same flags as python does
129
_gnuradio_swig_py_runtime_guile_la_LIBADD = $(_gnuradio_swig_py_runtime_python_la_LIBADD)
130
_gnuradio_swig_py_runtime_guile_la_LDFLAGS = $(_gnuradio_swig_py_runtime_python_la_LDFLAGS)
131
_gnuradio_swig_py_runtime_guile_la_CXXFLAGS = $(_gnuradio_swig_py_runtime_python_la_CXXFLAGS)
129
gnuradio_swig_py_runtime_guile_la_LIBADD = $(_gnuradio_swig_py_runtime_la_LIBADD)
130
gnuradio_swig_py_runtime_guile_la_LDFLAGS = $(_gnuradio_swig_py_runtime_la_LDFLAGS)
131
gnuradio_swig_py_runtime_guile_la_CXXFLAGS = $(_gnuradio_swig_py_runtime_la_CXXFLAGS)
132 132

133 133
endif				# end of GUILE
134 134

135 135
## Entry rule for running SWIG
136 136

137 137
# $(python_deps) $(guile_deps): gnuradio_swig_py_runtime.i
138
gnuradio_swig_py_runtime_python.h gnuradio_swig_py_runtime.py gnuradio_swig_py_runtime_python.cc: gnuradio_swig_py_runtime.i
139
## This rule will get called only when MAKE decides that one of the
140
## targets needs to be created or re-created, because:
141
##
142
## * The .i file is newer than any or all of the generated files;
143
##
144
## * Any or all of the .cc, .h, or .py files does not exist and is
145
##   needed (in the case this file is not needed, the rule for it is
146
##   ignored); or
147
##
148
## * Some SWIG-based dependecy of the .cc file isn't met and hence the
149
##   .cc file needs be be regenerated.  Explanation: Because MAKE
150
##   knows how to handle dependencies for .cc files (regardless of
151
##   their name or extension), then the .cc file is used as a target
152
##   instead of the .i file -- but with the dependencies of the .i
153
##   file.  It is this last reason why the line:
154
##
155
##     	if test -f $@; then :; else
156
##
157
##   cannot be used in this case: If a .i file dependecy is not met,
158
##   then the .cc file needs to be rebuilt.  But if the stamp is newer
159
##   than the .cc file, and the .cc file exists, then in the original
160
##   version (with the 'test' above) the internal MAKE call will not
161
##   be issued and hence the .cc file will not be rebuilt.
162
##
163
## Once execution gets to here, it should always proceed no matter the
164
## state of a stamp (as discussed in link above).  The
165
## $(DEPDIR)/gnuradio_swig_py_runtime-generate stuff is used to allow for parallel
166
## builds to "do the right thing".  The stamp has no relationship with
167
## either the target files or dependency file; it is used solely for
168
## the protection of multiple builds during a given call to MAKE.
169
##
170
## Catch signals SIGHUP (1), SIGINT (2), SIGPIPE (13), and SIGTERM
171
## (15).  At a caught signal, the quoted command will be issued before
172
## exiting.  In this case, remove any stamp, whether temporary of not.
173
## The trap is valid until the process exits; the process includes all
174
## commands appended via "\"s.
175
##
176
	trap 'rm -rf $(DEPDIR)/gnuradio_swig_py_runtime-generate-*' 1 2 13 15; \
177
##
178
## Create a temporary directory, which acts as a lock.  The first
179
## process to create the directory will succeed and issue the MAKE
180
## command to do the actual work, while all subsequent processes will
181
## fail -- leading them to wait for the first process to finish.
182
##
183
	if mkdir $(DEPDIR)/gnuradio_swig_py_runtime-generate-lock 2>/dev/null; then \
184
##
185
## This code is being executed by the first process to succeed in
186
## creating the directory lock.
187
##
188
## Remove the stamp associated with this filename.
189
##
190
		rm -f $(DEPDIR)/gnuradio_swig_py_runtime-generate-*stamp; \
191
##
192
## Tell MAKE to run the rule for creating this stamp.
193
##
194
		$(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/gnuradio_swig_py_runtime-generate-python-stamp WHAT=$<; \
195
##
196
## Now that the .cc, .h, and .py files have been (re)created from the
197
## .i file, future checking of this rule during the same MAKE
198
## execution will come back that the rule doesn't need to be executed
199
## because none of the conditions mentioned at the start of this rule
200
## will be positive.  Remove the the directory lock, which frees up
201
## any waiting process(es) to continue.
202
##
203
		rmdir $(DEPDIR)/gnuradio_swig_py_runtime-generate-lock; \
204
	else \
205
##
206
## This code is being executed by any follower processes while the
207
## directory lock is in place.
208
##
209
## Wait until the first process is done, testing once per second.
210
##
211
		while test -d $(DEPDIR)/gnuradio_swig_py_runtime-generate-lock; do \
212
			sleep 1; \
213
		done; \
214
##
215
## Succeed if and only if the first process succeeded; exit this
216
## process returning the status of the generated stamp.
217
##
218
		test -f $(DEPDIR)/gnuradio_swig_py_runtime-generate-python-stamp; \
219
		exit $$?; \
220
	fi;
221

222
# the comments for the target above apply to this target as well, but it seemed
223
# silly to include them twice. The only main change is for guile.
224
gnuradio_swig_py_runtime_guile.h gnuradio_swig_py_runtime.scm gnuradio_swig_py_runtime_guile.cc: gnuradio_swig_py_runtime.i
225
if GUILE
226
	trap 'rm -rf $(DEPDIR)/gnuradio_swig_py_runtime-generate-*' 1 2 13 15; \
227
	if mkdir $(DEPDIR)/gnuradio_swig_py_runtime-generate-lock 2>/dev/null; then \
228
		rm -f $(DEPDIR)/gnuradio_swig_py_runtime-generate-*stamp; \
229
		$(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/gnuradio_swig_py_runtime-generate-guile-stamp WHAT=$<; \
230
		rmdir $(DEPDIR)/gnuradio_swig_py_runtime-generate-lock; \
231
	else \
232
		while test -d $(DEPDIR)/gnuradio_swig_py_runtime-generate-lock; do \
233
			sleep 1; \
234
		done; \
235
		test -f $(DEPDIR)/gnuradio_swig_py_runtime-generate-guile-stamp; \
236
		exit $$?; \
237
	fi;
238
endif				# end of GUILE
138
# gnuradio_swig_py_runtime.h gnuradio_swig_py_runtime.py gnuradio_swig_py_runtime.cc: gnuradio_swig_py_runtime.i
139
guile/gnuradio_swig_py_runtime.scm gnuradio_swig_py_runtime.scm: gnuradio_swig_py_runtime.i
140
python/gnuradio_swig_py_runtime.py gnuradio_swig_py_runtime.py: gnuradio_swig_py_runtime.i
239 141

240 142
$(DEPDIR)/gnuradio_swig_py_runtime-generate-python-stamp:
241
## This rule will be called only by the first process issuing the
242
## above rule to succeed in creating the lock directory, after
243
## removing the actual stamp file in order to guarantee that MAKE will
244
## execute this rule.
245
##
246
## Call SWIG to generate the various output files; special
247
## post-processing on 'mingw32' host OS for the dependency file.
248
##
249
	if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(gnuradio_swig_py_runtime_swig_args) \
250
		-MD -MF $(DEPDIR)/gnuradio_swig_py_runtime_python.Std \
251
		-module gnuradio_swig_py_runtime -o gnuradio_swig_py_runtime_python.cc $(WHAT); then \
252
	    if test $(host_os) = mingw32; then \
253
		$(RM) $(DEPDIR)/gnuradio_swig_py_runtime_python.Sd; \
254
		$(SED) 's,\\\\,/,g' < $(DEPDIR)/gnuradio_swig_py_runtime_python.Std \
255
			> $(DEPDIR)/gnuradio_swig_py_runtime_python.Sd; \
256
		$(RM) $(DEPDIR)/gnuradio_swig_py_runtime_python.Std; \
257
		$(MV) $(DEPDIR)/gnuradio_swig_py_runtime_python.Sd $(DEPDIR)/gnuradio_swig_py_runtime_python.Std; \
258
	    fi; \
259
	else \
260
	    $(RM) $(DEPDIR)/gnuradio_swig_py_runtime_python.S*; exit 1; \
261
	fi;
262
##
263
## Mess with the SWIG output .Std dependency file, to create a
264
## dependecy file valid for the input .i file: Basically, simulate the
265
## dependency file created for libraries by GNU's libtool for C++,
266
## where all of the dependencies for the target are first listed, then
267
## each individual dependency is listed as a target with no further
268
## dependencies.
269
##
270
## (1) remove the current dependency file
271
##
272
	$(RM) $(DEPDIR)/gnuradio_swig_py_runtime_python.d
273
##
274
## (2) Copy the whole SWIG file:
275
##
276
	cp $(DEPDIR)/gnuradio_swig_py_runtime_python.Std $(DEPDIR)/gnuradio_swig_py_runtime_python.d
277
##
278
## (3) all a carriage return to the end of the dependency file.
279
##
280
	echo "" >> $(DEPDIR)/gnuradio_swig_py_runtime_python.d
281
##
282
## (4) from the SWIG file, remove the first line (the target); remove
283
##     trailing " \" and " " from each line.  Append ":" to each line,
284
##     followed by 2 carriage returns, then append this to the end of
285
##     the dependency file.
286
##
287
	$(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/gnuradio_swig_py_runtime_python.Std | \
288
		awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/gnuradio_swig_py_runtime_python.d
289
##
290
## (5) remove the SWIG-generated file
291
##
292
	$(RM) $(DEPDIR)/gnuradio_swig_py_runtime_python.Std
293
##
294
## Create the stamp for this filename generation, to signal success in
295
## executing this rule; allows other threads waiting on this process
296
## to continue.
297
##
298
	touch $(DEPDIR)/gnuradio_swig_py_runtime-generate-python-stamp
299

300
# KLUDGE: Force runtime include of a SWIG dependency file.  This is
301
# not guaranteed to be portable, but will probably work.  If it works,
302
# we have accurate dependencies for our swig stuff, which is good.
303

304
@am__include@ @am__quote@./$(DEPDIR)/gnuradio_swig_py_runtime_python.d@am__quote@
305 143

306 144
$(DEPDIR)/gnuradio_swig_py_runtime-generate-guile-stamp:
307
if GUILE
308
# the comments for the target above apply to this target as well, but it seemed
309
# silly to include them twice. The only main change is for guile.
310
	if $(SWIG) $(STD_SWIG_GUILE_ARGS) $(gnuradio_swig_py_runtime_swig_args) \
311
		-MD -MF $(DEPDIR)/gnuradio_swig_py_runtime_guile.Std \
312
		-module gnuradio_swig_py_runtime -o gnuradio_swig_py_runtime_guile.cc $(WHAT); then \
313
	    if test $(host_os) = mingw32; then \
314
		$(RM) $(DEPDIR)/gnuradio_swig_py_runtime_guile.Sd; \
315
		$(SED) 's,\\\\,/,g' < $(DEPDIR)/gnuradio_swig_py_runtime_guile.Std \
316
			> $(DEPDIR)/gnuradio_swig_py_runtime_guile.Sd; \
317
		$(RM) $(DEPDIR)/gnuradio_swig_py_runtime_guile.Std; \
318
		$(MV) $(DEPDIR)/gnuradio_swig_py_runtime_guile.Sd $(DEPDIR)/gnuradio_swig_py_runtime_guile.Std; \
319
	    fi; \
320
	else \
321
	    $(RM) $(DEPDIR)/gnuradio_swig_py_runtime_guile.S*; exit 1; \
322
	fi;
323
	touch $(DEPDIR)/gnuradio_swig_py_runtime-generate-guile-stamp
324
	$(RM) $(DEPDIR)/gnuradio_swig_py_runtime_guile.d
325
	cp $(DEPDIR)/gnuradio_swig_py_runtime_guile.Std $(DEPDIR)/gnuradio_swig_py_runtime_guile.d
326
	echo "" >> $(DEPDIR)/gnuradio_swig_py_runtime_guile.d
327
	$(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/gnuradio_swig_py_runtime_guile.Std | \
328
		awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/gnuradio_swig_py_runtime_guile.d
329
	$(RM) $(DEPDIR)/gnuradio_swig_py_runtime_guile.Std
330
	touch $(DEPDIR)/gnuradio_swig_py_runtime-generate-guile-stamp
331
else
332
	touch $(DEPDIR)/gnuradio_swig_py_runtime-generate-guile-stamp
333
endif
334

335
@am__include@ @am__quote@./$(DEPDIR)/gnuradio_swig_py_runtime_guile.d@am__quote@
336

337
#gnuradio_swig_py_runtime_python.h: gnuradio_swig_py_runtime.i
338 145

339 146
# -*- Makefile -*-
340 147
#
......
420 227
## .h file is sometimes built, but not always ... so that one has to
421 228
## be added manually by the including Makefile.am .
422 229

423
swig_built_sources += gnuradio_swig_py_general.py gnuradio_swig_py_general_python.cc
230
swig_built_sources += gnuradio_swig_py_general.py #gnuradio_swig_py_general.cc
424 231
if GUILE
425
swig_built_sources += gnuradio_swig_py_general.scm gnuradio_swig_py_general_guile.cc
232
swig_built_sources += gnuradio_swig_py_general.scm #gnuradio_swig_py_general.cc
426 233
endif
427 234

428 235
## Various SWIG variables.  These can be overloaded in the including
......
434 241
	$(gnuradio_swig_py_general_swiginclude_headers)
435 242

436 243
gnuradio_swig_py_general_pylib_LTLIBRARIES =		\
437
	_gnuradio_swig_py_general_python.la
244
	_gnuradio_swig_py_general.la
438 245

439
_gnuradio_swig_py_general_python_la_SOURCES = 		\
440
	gnuradio_swig_py_general_python.cc		\
246
_gnuradio_swig_py_general_la_SOURCES = 			\
247
	python/gnuradio_swig_py_general.cc		\
441 248
	$(gnuradio_swig_py_general_la_swig_sources)
442 249

443
_gnuradio_swig_py_general_python_la_LIBADD =		\
250
_gnuradio_swig_py_general_la_LIBADD =			\
444 251
	$(STD_SWIG_LA_LIB_ADD)		\
445 252
	$(gnuradio_swig_py_general_la_swig_libadd)
446 253

447
_gnuradio_swig_py_general_python_la_LDFLAGS =		\
254
_gnuradio_swig_py_general_la_LDFLAGS =			\
448 255
	$(STD_SWIG_LA_LD_FLAGS)		\
449 256
	$(gnuradio_swig_py_general_la_swig_ldflags)
450 257

451
_gnuradio_swig_py_general_python_la_CXXFLAGS =		\
258
_gnuradio_swig_py_general_la_CXXFLAGS =			\
452 259
	$(STD_SWIG_CXX_FLAGS)		\
453 260
	$(gnuradio_swig_py_general_la_swig_cxxflags)
454 261

455 262
gnuradio_swig_py_general_python_PYTHON =			\
456
	gnuradio_swig_py_general.py			\
457
	$(gnuradio_swig_py_general_python)
263
	python/gnuradio_swig_py_general.py		\
264
	$(gnuradio_swig_py_general)
458 265

459 266
if GUILE
460
gnuradio_swig_py_general_scmlib_LTLIBRARIES = _gnuradio_swig_py_general_guile.la
461
_gnuradio_swig_py_general_guile_la_SOURCES = 		\
462
	gnuradio_swig_py_general_guile.cc		        \
267
gnuradio_swig_py_general_scmlib_LTLIBRARIES = gnuradio_swig_py_general_guile.la
268
gnuradio_swig_py_general_guile_la_SOURCES = 		\
269
	guile/gnuradio_swig_py_general.cc		        \
463 270
	$(gnuradio_swig_py_general_la_swig_sources)
464 271
gnuradio_swig_py_general_scm_DATA = gnuradio_swig_py_general.scm
465 272

466 273
# Guile can use the same flags as python does
467
_gnuradio_swig_py_general_guile_la_LIBADD = $(_gnuradio_swig_py_general_python_la_LIBADD)
468
_gnuradio_swig_py_general_guile_la_LDFLAGS = $(_gnuradio_swig_py_general_python_la_LDFLAGS)
469
_gnuradio_swig_py_general_guile_la_CXXFLAGS = $(_gnuradio_swig_py_general_python_la_CXXFLAGS)
274
gnuradio_swig_py_general_guile_la_LIBADD = $(_gnuradio_swig_py_general_la_LIBADD)
275
gnuradio_swig_py_general_guile_la_LDFLAGS = $(_gnuradio_swig_py_general_la_LDFLAGS)
276
gnuradio_swig_py_general_guile_la_CXXFLAGS = $(_gnuradio_swig_py_general_la_CXXFLAGS)
470 277

471 278
endif				# end of GUILE
472 279

473 280
## Entry rule for running SWIG
474 281

475 282
# $(python_deps) $(guile_deps): gnuradio_swig_py_general.i
476
gnuradio_swig_py_general_python.h gnuradio_swig_py_general.py gnuradio_swig_py_general_python.cc: gnuradio_swig_py_general.i
477
## This rule will get called only when MAKE decides that one of the
478
## targets needs to be created or re-created, because:
479
##
480
## * The .i file is newer than any or all of the generated files;
481
##
482
## * Any or all of the .cc, .h, or .py files does not exist and is
483
##   needed (in the case this file is not needed, the rule for it is
484
##   ignored); or
485
##
486
## * Some SWIG-based dependecy of the .cc file isn't met and hence the
487
##   .cc file needs be be regenerated.  Explanation: Because MAKE
488
##   knows how to handle dependencies for .cc files (regardless of
489
##   their name or extension), then the .cc file is used as a target
490
##   instead of the .i file -- but with the dependencies of the .i
491
##   file.  It is this last reason why the line:
492
##
493
##     	if test -f $@; then :; else
494
##
495
##   cannot be used in this case: If a .i file dependecy is not met,
496
##   then the .cc file needs to be rebuilt.  But if the stamp is newer
497
##   than the .cc file, and the .cc file exists, then in the original
498
##   version (with the 'test' above) the internal MAKE call will not
499
##   be issued and hence the .cc file will not be rebuilt.
500
##
501
## Once execution gets to here, it should always proceed no matter the
502
## state of a stamp (as discussed in link above).  The
503
## $(DEPDIR)/gnuradio_swig_py_general-generate stuff is used to allow for parallel
504
## builds to "do the right thing".  The stamp has no relationship with
505
## either the target files or dependency file; it is used solely for
506
## the protection of multiple builds during a given call to MAKE.
507
##
508
## Catch signals SIGHUP (1), SIGINT (2), SIGPIPE (13), and SIGTERM
509
## (15).  At a caught signal, the quoted command will be issued before
510
## exiting.  In this case, remove any stamp, whether temporary of not.
511
## The trap is valid until the process exits; the process includes all
512
## commands appended via "\"s.
513
##
514
	trap 'rm -rf $(DEPDIR)/gnuradio_swig_py_general-generate-*' 1 2 13 15; \
515
##
516
## Create a temporary directory, which acts as a lock.  The first
517
## process to create the directory will succeed and issue the MAKE
518
## command to do the actual work, while all subsequent processes will
519
## fail -- leading them to wait for the first process to finish.
520
##
521
	if mkdir $(DEPDIR)/gnuradio_swig_py_general-generate-lock 2>/dev/null; then \
522
##
523
## This code is being executed by the first process to succeed in
524
## creating the directory lock.
525
##
526
## Remove the stamp associated with this filename.
527
##
528
		rm -f $(DEPDIR)/gnuradio_swig_py_general-generate-*stamp; \
529
##
530
## Tell MAKE to run the rule for creating this stamp.
531
##
532
		$(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/gnuradio_swig_py_general-generate-python-stamp WHAT=$<; \
533
##
534
## Now that the .cc, .h, and .py files have been (re)created from the
535
## .i file, future checking of this rule during the same MAKE
536
## execution will come back that the rule doesn't need to be executed
537
## because none of the conditions mentioned at the start of this rule
538
## will be positive.  Remove the the directory lock, which frees up
539
## any waiting process(es) to continue.
540
##
541
		rmdir $(DEPDIR)/gnuradio_swig_py_general-generate-lock; \
542
	else \
543
##
544
## This code is being executed by any follower processes while the
545
## directory lock is in place.
546
##
547
## Wait until the first process is done, testing once per second.
548
##
549
		while test -d $(DEPDIR)/gnuradio_swig_py_general-generate-lock; do \
550
			sleep 1; \
551
		done; \
552
##
553
## Succeed if and only if the first process succeeded; exit this
554
## process returning the status of the generated stamp.
555
##
556
		test -f $(DEPDIR)/gnuradio_swig_py_general-generate-python-stamp; \
557
		exit $$?; \
558
	fi;
559

560
# the comments for the target above apply to this target as well, but it seemed
561
# silly to include them twice. The only main change is for guile.
562
gnuradio_swig_py_general_guile.h gnuradio_swig_py_general.scm gnuradio_swig_py_general_guile.cc: gnuradio_swig_py_general.i
563
if GUILE
564
	trap 'rm -rf $(DEPDIR)/gnuradio_swig_py_general-generate-*' 1 2 13 15; \
565
	if mkdir $(DEPDIR)/gnuradio_swig_py_general-generate-lock 2>/dev/null; then \
566
		rm -f $(DEPDIR)/gnuradio_swig_py_general-generate-*stamp; \
567
		$(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/gnuradio_swig_py_general-generate-guile-stamp WHAT=$<; \
568
		rmdir $(DEPDIR)/gnuradio_swig_py_general-generate-lock; \
569
	else \
570
		while test -d $(DEPDIR)/gnuradio_swig_py_general-generate-lock; do \
571
			sleep 1; \
572
		done; \
573
		test -f $(DEPDIR)/gnuradio_swig_py_general-generate-guile-stamp; \
574
		exit $$?; \
575
	fi;
576
endif				# end of GUILE
283
# gnuradio_swig_py_general.h gnuradio_swig_py_general.py gnuradio_swig_py_general.cc: gnuradio_swig_py_general.i
284
guile/gnuradio_swig_py_general.scm gnuradio_swig_py_general.scm: gnuradio_swig_py_general.i
285
python/gnuradio_swig_py_general.py gnuradio_swig_py_general.py: gnuradio_swig_py_general.i
577 286

578 287
$(DEPDIR)/gnuradio_swig_py_general-generate-python-stamp:
579
## This rule will be called only by the first process issuing the
580
## above rule to succeed in creating the lock directory, after
581
## removing the actual stamp file in order to guarantee that MAKE will
582
## execute this rule.
583
##
584
## Call SWIG to generate the various output files; special
585
## post-processing on 'mingw32' host OS for the dependency file.
586
##
587
	if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(gnuradio_swig_py_general_swig_args) \
588
		-MD -MF $(DEPDIR)/gnuradio_swig_py_general_python.Std \
589
		-module gnuradio_swig_py_general -o gnuradio_swig_py_general_python.cc $(WHAT); then \
590
	    if test $(host_os) = mingw32; then \
591
		$(RM) $(DEPDIR)/gnuradio_swig_py_general_python.Sd; \
592
		$(SED) 's,\\\\,/,g' < $(DEPDIR)/gnuradio_swig_py_general_python.Std \
593
			> $(DEPDIR)/gnuradio_swig_py_general_python.Sd; \
594
		$(RM) $(DEPDIR)/gnuradio_swig_py_general_python.Std; \
595
		$(MV) $(DEPDIR)/gnuradio_swig_py_general_python.Sd $(DEPDIR)/gnuradio_swig_py_general_python.Std; \
596
	    fi; \
597
	else \
598
	    $(RM) $(DEPDIR)/gnuradio_swig_py_general_python.S*; exit 1; \
599
	fi;
600
##
601
## Mess with the SWIG output .Std dependency file, to create a
602
## dependecy file valid for the input .i file: Basically, simulate the
603
## dependency file created for libraries by GNU's libtool for C++,
604
## where all of the dependencies for the target are first listed, then
605
## each individual dependency is listed as a target with no further
606
## dependencies.
607
##
608
## (1) remove the current dependency file
609
##
610
	$(RM) $(DEPDIR)/gnuradio_swig_py_general_python.d
611
##
612
## (2) Copy the whole SWIG file:
613
##
614
	cp $(DEPDIR)/gnuradio_swig_py_general_python.Std $(DEPDIR)/gnuradio_swig_py_general_python.d
615
##
616
## (3) all a carriage return to the end of the dependency file.
617
##
618
	echo "" >> $(DEPDIR)/gnuradio_swig_py_general_python.d
619
##
620
## (4) from the SWIG file, remove the first line (the target); remove
621
##     trailing " \" and " " from each line.  Append ":" to each line,
622
##     followed by 2 carriage returns, then append this to the end of
623
##     the dependency file.
624
##
625
	$(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/gnuradio_swig_py_general_python.Std | \
626
		awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/gnuradio_swig_py_general_python.d
627
##
628
## (5) remove the SWIG-generated file
629
##
630
	$(RM) $(DEPDIR)/gnuradio_swig_py_general_python.Std
631
##
632
## Create the stamp for this filename generation, to signal success in
633
## executing this rule; allows other threads waiting on this process
634
## to continue.
635
##
636
	touch $(DEPDIR)/gnuradio_swig_py_general-generate-python-stamp
637

638
# KLUDGE: Force runtime include of a SWIG dependency file.  This is
639
# not guaranteed to be portable, but will probably work.  If it works,
640
# we have accurate dependencies for our swig stuff, which is good.
641

642
@am__include@ @am__quote@./$(DEPDIR)/gnuradio_swig_py_general_python.d@am__quote@
643 288

644 289
$(DEPDIR)/gnuradio_swig_py_general-generate-guile-stamp:
645
if GUILE
646
# the comments for the target above apply to this target as well, but it seemed
647
# silly to include them twice. The only main change is for guile.
648
	if $(SWIG) $(STD_SWIG_GUILE_ARGS) $(gnuradio_swig_py_general_swig_args) \
649
		-MD -MF $(DEPDIR)/gnuradio_swig_py_general_guile.Std \
650
		-module gnuradio_swig_py_general -o gnuradio_swig_py_general_guile.cc $(WHAT); then \
651
	    if test $(host_os) = mingw32; then \
652
		$(RM) $(DEPDIR)/gnuradio_swig_py_general_guile.Sd; \
653
		$(SED) 's,\\\\,/,g' < $(DEPDIR)/gnuradio_swig_py_general_guile.Std \
654
			> $(DEPDIR)/gnuradio_swig_py_general_guile.Sd; \
655
		$(RM) $(DEPDIR)/gnuradio_swig_py_general_guile.Std; \
656
		$(MV) $(DEPDIR)/gnuradio_swig_py_general_guile.Sd $(DEPDIR)/gnuradio_swig_py_general_guile.Std; \
657
	    fi; \
658
	else \
659
	    $(RM) $(DEPDIR)/gnuradio_swig_py_general_guile.S*; exit 1; \
660
	fi;
661
	touch $(DEPDIR)/gnuradio_swig_py_general-generate-guile-stamp
662
	$(RM) $(DEPDIR)/gnuradio_swig_py_general_guile.d
663
	cp $(DEPDIR)/gnuradio_swig_py_general_guile.Std $(DEPDIR)/gnuradio_swig_py_general_guile.d
664
	echo "" >> $(DEPDIR)/gnuradio_swig_py_general_guile.d
665
	$(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/gnuradio_swig_py_general_guile.Std | \
666
		awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/gnuradio_swig_py_general_guile.d
667
	$(RM) $(DEPDIR)/gnuradio_swig_py_general_guile.Std
668
	touch $(DEPDIR)/gnuradio_swig_py_general-generate-guile-stamp
669
else
670
	touch $(DEPDIR)/gnuradio_swig_py_general-generate-guile-stamp
671
endif
672

673
@am__include@ @am__quote@./$(DEPDIR)/gnuradio_swig_py_general_guile.d@am__quote@
674

675
#gnuradio_swig_py_runtime_python.h: gnuradio_swig_py_runtime.i
676 290

677 291
# -*- Makefile -*-
678 292
#
......
758 372
## .h file is sometimes built, but not always ... so that one has to
759 373
## be added manually by the including Makefile.am .
760 374

761
swig_built_sources += gnuradio_swig_py_gengen.py gnuradio_swig_py_gengen_python.cc
375
swig_built_sources += gnuradio_swig_py_gengen.py #gnuradio_swig_py_gengen.cc
762 376
if GUILE
763
swig_built_sources += gnuradio_swig_py_gengen.scm gnuradio_swig_py_gengen_guile.cc
377
swig_built_sources += gnuradio_swig_py_gengen.scm #gnuradio_swig_py_gengen.cc
764 378
endif
765 379

766 380
## Various SWIG variables.  These can be overloaded in the including
......
772 386
	$(gnuradio_swig_py_gengen_swiginclude_headers)
773 387

774 388
gnuradio_swig_py_gengen_pylib_LTLIBRARIES =		\
775
	_gnuradio_swig_py_gengen_python.la
389
	_gnuradio_swig_py_gengen.la
776 390

777
_gnuradio_swig_py_gengen_python_la_SOURCES = 		\
778
	gnuradio_swig_py_gengen_python.cc		\
391
_gnuradio_swig_py_gengen_la_SOURCES = 			\
392
	python/gnuradio_swig_py_gengen.cc		\
779 393
	$(gnuradio_swig_py_gengen_la_swig_sources)
780 394

781
_gnuradio_swig_py_gengen_python_la_LIBADD =		\
395
_gnuradio_swig_py_gengen_la_LIBADD =			\
782 396
	$(STD_SWIG_LA_LIB_ADD)		\
783 397
	$(gnuradio_swig_py_gengen_la_swig_libadd)
784 398

785
_gnuradio_swig_py_gengen_python_la_LDFLAGS =		\
399
_gnuradio_swig_py_gengen_la_LDFLAGS =			\
786 400
	$(STD_SWIG_LA_LD_FLAGS)		\
787 401
	$(gnuradio_swig_py_gengen_la_swig_ldflags)
788 402

789
_gnuradio_swig_py_gengen_python_la_CXXFLAGS =		\
403
_gnuradio_swig_py_gengen_la_CXXFLAGS =			\
790 404
	$(STD_SWIG_CXX_FLAGS)		\
791 405
	$(gnuradio_swig_py_gengen_la_swig_cxxflags)
792 406

793 407
gnuradio_swig_py_gengen_python_PYTHON =			\
794
	gnuradio_swig_py_gengen.py			\
795
	$(gnuradio_swig_py_gengen_python)
408
	python/gnuradio_swig_py_gengen.py		\
409
	$(gnuradio_swig_py_gengen)
796 410

797 411
if GUILE
798
gnuradio_swig_py_gengen_scmlib_LTLIBRARIES = _gnuradio_swig_py_gengen_guile.la
799
_gnuradio_swig_py_gengen_guile_la_SOURCES = 		\
800
	gnuradio_swig_py_gengen_guile.cc		        \
412
gnuradio_swig_py_gengen_scmlib_LTLIBRARIES = gnuradio_swig_py_gengen_guile.la
413
gnuradio_swig_py_gengen_guile_la_SOURCES = 		\
414
	guile/gnuradio_swig_py_gengen.cc		        \
801 415
	$(gnuradio_swig_py_gengen_la_swig_sources)
802 416
gnuradio_swig_py_gengen_scm_DATA = gnuradio_swig_py_gengen.scm
803 417

804 418
# Guile can use the same flags as python does
805
_gnuradio_swig_py_gengen_guile_la_LIBADD = $(_gnuradio_swig_py_gengen_python_la_LIBADD)
806
_gnuradio_swig_py_gengen_guile_la_LDFLAGS = $(_gnuradio_swig_py_gengen_python_la_LDFLAGS)
807
_gnuradio_swig_py_gengen_guile_la_CXXFLAGS = $(_gnuradio_swig_py_gengen_python_la_CXXFLAGS)
419
gnuradio_swig_py_gengen_guile_la_LIBADD = $(_gnuradio_swig_py_gengen_la_LIBADD)
420
gnuradio_swig_py_gengen_guile_la_LDFLAGS = $(_gnuradio_swig_py_gengen_la_LDFLAGS)
421
gnuradio_swig_py_gengen_guile_la_CXXFLAGS = $(_gnuradio_swig_py_gengen_la_CXXFLAGS)
808 422

809 423
endif				# end of GUILE
810 424

811 425
## Entry rule for running SWIG
812 426

813 427
# $(python_deps) $(guile_deps): gnuradio_swig_py_gengen.i
814
gnuradio_swig_py_gengen_python.h gnuradio_swig_py_gengen.py gnuradio_swig_py_gengen_python.cc: gnuradio_swig_py_gengen.i
815
## This rule will get called only when MAKE decides that one of the
816
## targets needs to be created or re-created, because:
817
##
818
## * The .i file is newer than any or all of the generated files;
819
##
820
## * Any or all of the .cc, .h, or .py files does not exist and is
821
##   needed (in the case this file is not needed, the rule for it is
822
##   ignored); or
823
##
824
## * Some SWIG-based dependecy of the .cc file isn't met and hence the
825
##   .cc file needs be be regenerated.  Explanation: Because MAKE
826
##   knows how to handle dependencies for .cc files (regardless of
827
##   their name or extension), then the .cc file is used as a target
828
##   instead of the .i file -- but with the dependencies of the .i
829
##   file.  It is this last reason why the line:
830
##
831
##     	if test -f $@; then :; else
832
##
833
##   cannot be used in this case: If a .i file dependecy is not met,
834
##   then the .cc file needs to be rebuilt.  But if the stamp is newer
835
##   than the .cc file, and the .cc file exists, then in the original
836
##   version (with the 'test' above) the internal MAKE call will not
837
##   be issued and hence the .cc file will not be rebuilt.
838
##
839
## Once execution gets to here, it should always proceed no matter the
840
## state of a stamp (as discussed in link above).  The
841
## $(DEPDIR)/gnuradio_swig_py_gengen-generate stuff is used to allow for parallel
842
## builds to "do the right thing".  The stamp has no relationship with
843
## either the target files or dependency file; it is used solely for
844
## the protection of multiple builds during a given call to MAKE.
845
##
846
## Catch signals SIGHUP (1), SIGINT (2), SIGPIPE (13), and SIGTERM
847
## (15).  At a caught signal, the quoted command will be issued before
848
## exiting.  In this case, remove any stamp, whether temporary of not.
849
## The trap is valid until the process exits; the process includes all
850
## commands appended via "\"s.
851
##
852
	trap 'rm -rf $(DEPDIR)/gnuradio_swig_py_gengen-generate-*' 1 2 13 15; \
853
##
854
## Create a temporary directory, which acts as a lock.  The first
855
## process to create the directory will succeed and issue the MAKE
856
## command to do the actual work, while all subsequent processes will
857
## fail -- leading them to wait for the first process to finish.
858
##
859
	if mkdir $(DEPDIR)/gnuradio_swig_py_gengen-generate-lock 2>/dev/null; then \
860
##
861
## This code is being executed by the first process to succeed in
862
## creating the directory lock.
863
##
864
## Remove the stamp associated with this filename.
865
##
866
		rm -f $(DEPDIR)/gnuradio_swig_py_gengen-generate-*stamp; \
867
##
868
## Tell MAKE to run the rule for creating this stamp.
869
##
870
		$(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/gnuradio_swig_py_gengen-generate-python-stamp WHAT=$<; \
871
##
872
## Now that the .cc, .h, and .py files have been (re)created from the
873
## .i file, future checking of this rule during the same MAKE
874
## execution will come back that the rule doesn't need to be executed
875
## because none of the conditions mentioned at the start of this rule
876
## will be positive.  Remove the the directory lock, which frees up
877
## any waiting process(es) to continue.
878
##
879
		rmdir $(DEPDIR)/gnuradio_swig_py_gengen-generate-lock; \
880
	else \
881
##
882
## This code is being executed by any follower processes while the
883
## directory lock is in place.
884
##
885
## Wait until the first process is done, testing once per second.
886
##
887
		while test -d $(DEPDIR)/gnuradio_swig_py_gengen-generate-lock; do \
888
			sleep 1; \
889
		done; \
890
##
891
## Succeed if and only if the first process succeeded; exit this
892
## process returning the status of the generated stamp.
893
##
894
		test -f $(DEPDIR)/gnuradio_swig_py_gengen-generate-python-stamp; \
895
		exit $$?; \
896
	fi;
897

898
# the comments for the target above apply to this target as well, but it seemed
899
# silly to include them twice. The only main change is for guile.
900
gnuradio_swig_py_gengen_guile.h gnuradio_swig_py_gengen.scm gnuradio_swig_py_gengen_guile.cc: gnuradio_swig_py_gengen.i
901
if GUILE
902
	trap 'rm -rf $(DEPDIR)/gnuradio_swig_py_gengen-generate-*' 1 2 13 15; \
903
	if mkdir $(DEPDIR)/gnuradio_swig_py_gengen-generate-lock 2>/dev/null; then \
904
		rm -f $(DEPDIR)/gnuradio_swig_py_gengen-generate-*stamp; \
905
		$(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/gnuradio_swig_py_gengen-generate-guile-stamp WHAT=$<; \
906
		rmdir $(DEPDIR)/gnuradio_swig_py_gengen-generate-lock; \
907
	else \
908
		while test -d $(DEPDIR)/gnuradio_swig_py_gengen-generate-lock; do \
909
			sleep 1; \
910
		done; \
911
		test -f $(DEPDIR)/gnuradio_swig_py_gengen-generate-guile-stamp; \
912
		exit $$?; \
913
	fi;
914
endif				# end of GUILE
428
# gnuradio_swig_py_gengen.h gnuradio_swig_py_gengen.py gnuradio_swig_py_gengen.cc: gnuradio_swig_py_gengen.i
429
guile/gnuradio_swig_py_gengen.scm gnuradio_swig_py_gengen.scm: gnuradio_swig_py_gengen.i
430
python/gnuradio_swig_py_gengen.py gnuradio_swig_py_gengen.py: gnuradio_swig_py_gengen.i
915 431

916 432
$(DEPDIR)/gnuradio_swig_py_gengen-generate-python-stamp:
917
## This rule will be called only by the first process issuing the
918
## above rule to succeed in creating the lock directory, after
919
## removing the actual stamp file in order to guarantee that MAKE will
920
## execute this rule.
921
##
922
## Call SWIG to generate the various output files; special
923
## post-processing on 'mingw32' host OS for the dependency file.
924
##
925
	if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(gnuradio_swig_py_gengen_swig_args) \
926
		-MD -MF $(DEPDIR)/gnuradio_swig_py_gengen_python.Std \
927
		-module gnuradio_swig_py_gengen -o gnuradio_swig_py_gengen_python.cc $(WHAT); then \
928
	    if test $(host_os) = mingw32; then \
929
		$(RM) $(DEPDIR)/gnuradio_swig_py_gengen_python.Sd; \
930
		$(SED) 's,\\\\,/,g' < $(DEPDIR)/gnuradio_swig_py_gengen_python.Std \
931
			> $(DEPDIR)/gnuradio_swig_py_gengen_python.Sd; \
932
		$(RM) $(DEPDIR)/gnuradio_swig_py_gengen_python.Std; \
933
		$(MV) $(DEPDIR)/gnuradio_swig_py_gengen_python.Sd $(DEPDIR)/gnuradio_swig_py_gengen_python.Std; \
934
	    fi; \
935
	else \
936
	    $(RM) $(DEPDIR)/gnuradio_swig_py_gengen_python.S*; exit 1; \
937
	fi;
938
##
939
## Mess with the SWIG output .Std dependency file, to create a
940
## dependecy file valid for the input .i file: Basically, simulate the
941
## dependency file created for libraries by GNU's libtool for C++,
942
## where all of the dependencies for the target are first listed, then
943
## each individual dependency is listed as a target with no further
944
## dependencies.
945
##
946
## (1) remove the current dependency file
947
##
948
	$(RM) $(DEPDIR)/gnuradio_swig_py_gengen_python.d
949
##
950
## (2) Copy the whole SWIG file:
951
##
952
	cp $(DEPDIR)/gnuradio_swig_py_gengen_python.Std $(DEPDIR)/gnuradio_swig_py_gengen_python.d
953
##
954
## (3) all a carriage return to the end of the dependency file.
955
##
956
	echo "" >> $(DEPDIR)/gnuradio_swig_py_gengen_python.d
957
##
958
## (4) from the SWIG file, remove the first line (the target); remove
959
##     trailing " \" and " " from each line.  Append ":" to each line,
960
##     followed by 2 carriage returns, then append this to the end of
961
##     the dependency file.
962
##
963
	$(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/gnuradio_swig_py_gengen_python.Std | \
964
		awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/gnuradio_swig_py_gengen_python.d
965
##
966
## (5) remove the SWIG-generated file
967
##
968
	$(RM) $(DEPDIR)/gnuradio_swig_py_gengen_python.Std
969
##
970
## Create the stamp for this filename generation, to signal success in
971
## executing this rule; allows other threads waiting on this process
972
## to continue.
973
##
974
	touch $(DEPDIR)/gnuradio_swig_py_gengen-generate-python-stamp
975

976
# KLUDGE: Force runtime include of a SWIG dependency file.  This is
977
# not guaranteed to be portable, but will probably work.  If it works,
978
# we have accurate dependencies for our swig stuff, which is good.
979

980
@am__include@ @am__quote@./$(DEPDIR)/gnuradio_swig_py_gengen_python.d@am__quote@
981 433

982 434
$(DEPDIR)/gnuradio_swig_py_gengen-generate-guile-stamp:
983
if GUILE
984
# the comments for the target above apply to this target as well, but it seemed
985
# silly to include them twice. The only main change is for guile.
986
	if $(SWIG) $(STD_SWIG_GUILE_ARGS) $(gnuradio_swig_py_gengen_swig_args) \
987
		-MD -MF $(DEPDIR)/gnuradio_swig_py_gengen_guile.Std \
988
		-module gnuradio_swig_py_gengen -o gnuradio_swig_py_gengen_guile.cc $(WHAT); then \
989
	    if test $(host_os) = mingw32; then \
990
		$(RM) $(DEPDIR)/gnuradio_swig_py_gengen_guile.Sd; \
991
		$(SED) 's,\\\\,/,g' < $(DEPDIR)/gnuradio_swig_py_gengen_guile.Std \
992
			> $(DEPDIR)/gnuradio_swig_py_gengen_guile.Sd; \
993
		$(RM) $(DEPDIR)/gnuradio_swig_py_gengen_guile.Std; \
994
		$(MV) $(DEPDIR)/gnuradio_swig_py_gengen_guile.Sd $(DEPDIR)/gnuradio_swig_py_gengen_guile.Std; \
995
	    fi; \
996
	else \
997
	    $(RM) $(DEPDIR)/gnuradio_swig_py_gengen_guile.S*; exit 1; \
998
	fi;
999
	touch $(DEPDIR)/gnuradio_swig_py_gengen-generate-guile-stamp
1000
	$(RM) $(DEPDIR)/gnuradio_swig_py_gengen_guile.d
1001
	cp $(DEPDIR)/gnuradio_swig_py_gengen_guile.Std $(DEPDIR)/gnuradio_swig_py_gengen_guile.d
1002
	echo "" >> $(DEPDIR)/gnuradio_swig_py_gengen_guile.d
1003
	$(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/gnuradio_swig_py_gengen_guile.Std | \
1004
		awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/gnuradio_swig_py_gengen_guile.d
1005
	$(RM) $(DEPDIR)/gnuradio_swig_py_gengen_guile.Std
1006
	touch $(DEPDIR)/gnuradio_swig_py_gengen-generate-guile-stamp
1007
else
1008
	touch $(DEPDIR)/gnuradio_swig_py_gengen-generate-guile-stamp
1009
endif
1010

1011
@am__include@ @am__quote@./$(DEPDIR)/gnuradio_swig_py_gengen_guile.d@am__quote@
1012

1013
#gnuradio_swig_py_runtime_python.h: gnuradio_swig_py_runtime.i
1014 435

1015 436
# -*- Makefile -*-
1016 437
#
......
1096 517
## .h file is sometimes built, but not always ... so that one has to
1097 518
## be added manually by the including Makefile.am .
1098 519

1099
swig_built_sources += gnuradio_swig_py_filter.py gnuradio_swig_py_filter_python.cc
520
swig_built_sources += gnuradio_swig_py_filter.py #gnuradio_swig_py_filter.cc
1100 521
if GUILE
1101
swig_built_sources += gnuradio_swig_py_filter.scm gnuradio_swig_py_filter_guile.cc
522
swig_built_sources += gnuradio_swig_py_filter.scm #gnuradio_swig_py_filter.cc
1102 523
endif
1103 524

1104 525
## Various SWIG variables.  These can be overloaded in the including
......
1110 531
	$(gnuradio_swig_py_filter_swiginclude_headers)
1111 532

1112 533
gnuradio_swig_py_filter_pylib_LTLIBRARIES =		\
1113
	_gnuradio_swig_py_filter_python.la
534
	_gnuradio_swig_py_filter.la
1114 535

1115
_gnuradio_swig_py_filter_python_la_SOURCES = 		\
1116
	gnuradio_swig_py_filter_python.cc		\
536
_gnuradio_swig_py_filter_la_SOURCES = 			\
537
	python/gnuradio_swig_py_filter.cc		\
1117 538
	$(gnuradio_swig_py_filter_la_swig_sources)
1118 539

1119
_gnuradio_swig_py_filter_python_la_LIBADD =		\
540
_gnuradio_swig_py_filter_la_LIBADD =			\
1120 541
	$(STD_SWIG_LA_LIB_ADD)		\
1121 542
	$(gnuradio_swig_py_filter_la_swig_libadd)
1122 543

1123
_gnuradio_swig_py_filter_python_la_LDFLAGS =		\
544
_gnuradio_swig_py_filter_la_LDFLAGS =			\
1124 545
	$(STD_SWIG_LA_LD_FLAGS)		\
1125 546
	$(gnuradio_swig_py_filter_la_swig_ldflags)
1126 547

1127
_gnuradio_swig_py_filter_python_la_CXXFLAGS =		\
548
_gnuradio_swig_py_filter_la_CXXFLAGS =			\
1128 549
	$(STD_SWIG_CXX_FLAGS)		\
1129 550
	$(gnuradio_swig_py_filter_la_swig_cxxflags)
1130 551

1131 552
gnuradio_swig_py_filter_python_PYTHON =			\
1132
	gnuradio_swig_py_filter.py			\
1133
	$(gnuradio_swig_py_filter_python)
553
	python/gnuradio_swig_py_filter.py		\
554
	$(gnuradio_swig_py_filter)
1134 555

1135 556
if GUILE
1136
gnuradio_swig_py_filter_scmlib_LTLIBRARIES = _gnuradio_swig_py_filter_guile.la
1137
_gnuradio_swig_py_filter_guile_la_SOURCES = 		\
1138
	gnuradio_swig_py_filter_guile.cc		        \
557
gnuradio_swig_py_filter_scmlib_LTLIBRARIES = gnuradio_swig_py_filter_guile.la
558
gnuradio_swig_py_filter_guile_la_SOURCES = 		\
559
	guile/gnuradio_swig_py_filter.cc		        \
1139 560
	$(gnuradio_swig_py_filter_la_swig_sources)
1140 561
gnuradio_swig_py_filter_scm_DATA = gnuradio_swig_py_filter.scm
1141 562

1142 563
# Guile can use the same flags as python does
1143
_gnuradio_swig_py_filter_guile_la_LIBADD = $(_gnuradio_swig_py_filter_python_la_LIBADD)
1144
_gnuradio_swig_py_filter_guile_la_LDFLAGS = $(_gnuradio_swig_py_filter_python_la_LDFLAGS)
1145
_gnuradio_swig_py_filter_guile_la_CXXFLAGS = $(_gnuradio_swig_py_filter_python_la_CXXFLAGS)
564
gnuradio_swig_py_filter_guile_la_LIBADD = $(_gnuradio_swig_py_filter_la_LIBADD)
565
gnuradio_swig_py_filter_guile_la_LDFLAGS = $(_gnuradio_swig_py_filter_la_LDFLAGS)
566
gnuradio_swig_py_filter_guile_la_CXXFLAGS = $(_gnuradio_swig_py_filter_la_CXXFLAGS)
1146 567

1147 568
endif				# end of GUILE
1148 569

1149 570
## Entry rule for running SWIG
1150 571

1151 572
# $(python_deps) $(guile_deps): gnuradio_swig_py_filter.i
1152
gnuradio_swig_py_filter_python.h gnuradio_swig_py_filter.py gnuradio_swig_py_filter_python.cc: gnuradio_swig_py_filter.i
1153
## This rule will get called only when MAKE decides that one of the
1154
## targets needs to be created or re-created, because:
1155
##
1156
## * The .i file is newer than any or all of the generated files;
1157
##
1158
## * Any or all of the .cc, .h, or .py files does not exist and is
1159
##   needed (in the case this file is not needed, the rule for it is
1160
##   ignored); or
1161
##
1162
## * Some SWIG-based dependecy of the .cc file isn't met and hence the
1163
##   .cc file needs be be regenerated.  Explanation: Because MAKE
1164
##   knows how to handle dependencies for .cc files (regardless of
1165
##   their name or extension), then the .cc file is used as a target
1166
##   instead of the .i file -- but with the dependencies of the .i
1167
##   file.  It is this last reason why the line:
1168
##
1169
##     	if test -f $@; then :; else
1170
##
1171
##   cannot be used in this case: If a .i file dependecy is not met,
1172
##   then the .cc file needs to be rebuilt.  But if the stamp is newer
1173
##   than the .cc file, and the .cc file exists, then in the original
1174
##   version (with the 'test' above) the internal MAKE call will not
1175
##   be issued and hence the .cc file will not be rebuilt.
1176
##
1177
## Once execution gets to here, it should always proceed no matter the
1178
## state of a stamp (as discussed in link above).  The
1179
## $(DEPDIR)/gnuradio_swig_py_filter-generate stuff is used to allow for parallel
1180
## builds to "do the right thing".  The stamp has no relationship with
1181
## either the target files or dependency file; it is used solely for
1182
## the protection of multiple builds during a given call to MAKE.
1183
##
1184
## Catch signals SIGHUP (1), SIGINT (2), SIGPIPE (13), and SIGTERM
1185
## (15).  At a caught signal, the quoted command will be issued before
1186
## exiting.  In this case, remove any stamp, whether temporary of not.
1187
## The trap is valid until the process exits; the process includes all
1188
## commands appended via "\"s.
1189
##
1190
	trap 'rm -rf $(DEPDIR)/gnuradio_swig_py_filter-generate-*' 1 2 13 15; \
1191
##
1192
## Create a temporary directory, which acts as a lock.  The first
1193
## process to create the directory will succeed and issue the MAKE
1194
## command to do the actual work, while all subsequent processes will
1195
## fail -- leading them to wait for the first process to finish.
1196
##
1197
	if mkdir $(DEPDIR)/gnuradio_swig_py_filter-generate-lock 2>/dev/null; then \
1198
##
1199
## This code is being executed by the first process to succeed in
1200
## creating the directory lock.
1201
##
1202
## Remove the stamp associated with this filename.
1203
##
1204
		rm -f $(DEPDIR)/gnuradio_swig_py_filter-generate-*stamp; \
1205
##
1206
## Tell MAKE to run the rule for creating this stamp.
1207
##
1208
		$(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/gnuradio_swig_py_filter-generate-python-stamp WHAT=$<; \
1209
##
1210
## Now that the .cc, .h, and .py files have been (re)created from the
1211
## .i file, future checking of this rule during the same MAKE
1212
## execution will come back that the rule doesn't need to be executed
1213
## because none of the conditions mentioned at the start of this rule
1214
## will be positive.  Remove the the directory lock, which frees up
1215
## any waiting process(es) to continue.
1216
##
1217
		rmdir $(DEPDIR)/gnuradio_swig_py_filter-generate-lock; \
1218
	else \
1219
##
1220
## This code is being executed by any follower processes while the
1221
## directory lock is in place.
1222
##
1223
## Wait until the first process is done, testing once per second.
1224
##
1225
		while test -d $(DEPDIR)/gnuradio_swig_py_filter-generate-lock; do \
1226
			sleep 1; \
1227
		done; \
1228
##
1229
## Succeed if and only if the first process succeeded; exit this
1230
## process returning the status of the generated stamp.
1231
##
1232
		test -f $(DEPDIR)/gnuradio_swig_py_filter-generate-python-stamp; \
1233
		exit $$?; \
1234
	fi;
1235

1236
# the comments for the target above apply to this target as well, but it seemed
1237
# silly to include them twice. The only main change is for guile.
1238
gnuradio_swig_py_filter_guile.h gnuradio_swig_py_filter.scm gnuradio_swig_py_filter_guile.cc: gnuradio_swig_py_filter.i
1239
if GUILE
1240
	trap 'rm -rf $(DEPDIR)/gnuradio_swig_py_filter-generate-*' 1 2 13 15; \
1241
	if mkdir $(DEPDIR)/gnuradio_swig_py_filter-generate-lock 2>/dev/null; then \
1242
		rm -f $(DEPDIR)/gnuradio_swig_py_filter-generate-*stamp; \
1243
		$(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/gnuradio_swig_py_filter-generate-guile-stamp WHAT=$<; \
1244
		rmdir $(DEPDIR)/gnuradio_swig_py_filter-generate-lock; \
1245
	else \
1246
		while test -d $(DEPDIR)/gnuradio_swig_py_filter-generate-lock; do \
1247
			sleep 1; \
1248
		done; \
1249
		test -f $(DEPDIR)/gnuradio_swig_py_filter-generate-guile-stamp; \
1250
		exit $$?; \
1251
	fi;
1252
endif				# end of GUILE
573
# gnuradio_swig_py_filter.h gnuradio_swig_py_filter.py gnuradio_swig_py_filter.cc: gnuradio_swig_py_filter.i
574
guile/gnuradio_swig_py_filter.scm gnuradio_swig_py_filter.scm: gnuradio_swig_py_filter.i
575
python/gnuradio_swig_py_filter.py gnuradio_swig_py_filter.py: gnuradio_swig_py_filter.i
1253 576

1254 577
$(DEPDIR)/gnuradio_swig_py_filter-generate-python-stamp:
1255
## This rule will be called only by the first process issuing the
1256
## above rule to succeed in creating the lock directory, after
1257
## removing the actual stamp file in order to guarantee that MAKE will
1258
## execute this rule.
1259
##
1260
## Call SWIG to generate the various output files; special
1261
## post-processing on 'mingw32' host OS for the dependency file.
1262
##
1263
	if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(gnuradio_swig_py_filter_swig_args) \
1264
		-MD -MF $(DEPDIR)/gnuradio_swig_py_filter_python.Std \
1265
		-module gnuradio_swig_py_filter -o gnuradio_swig_py_filter_python.cc $(WHAT); then \
1266
	    if test $(host_os) = mingw32; then \
1267
		$(RM) $(DEPDIR)/gnuradio_swig_py_filter_python.Sd; \
1268
		$(SED) 's,\\\\,/,g' < $(DEPDIR)/gnuradio_swig_py_filter_python.Std \
1269
			> $(DEPDIR)/gnuradio_swig_py_filter_python.Sd; \
1270
		$(RM) $(DEPDIR)/gnuradio_swig_py_filter_python.Std; \
1271
		$(MV) $(DEPDIR)/gnuradio_swig_py_filter_python.Sd $(DEPDIR)/gnuradio_swig_py_filter_python.Std; \
1272
	    fi; \
1273
	else \
1274
	    $(RM) $(DEPDIR)/gnuradio_swig_py_filter_python.S*; exit 1; \
1275
	fi;
1276
##
1277
## Mess with the SWIG output .Std dependency file, to create a
1278
## dependecy file valid for the input .i file: Basically, simulate the
1279
## dependency file created for libraries by GNU's libtool for C++,
1280
## where all of the dependencies for the target are first listed, then
1281
## each individual dependency is listed as a target with no further
1282
## dependencies.
1283
##
1284
## (1) remove the current dependency file
1285
##
1286
	$(RM) $(DEPDIR)/gnuradio_swig_py_filter_python.d
1287
##
1288
## (2) Copy the whole SWIG file:
1289
##
1290
	cp $(DEPDIR)/gnuradio_swig_py_filter_python.Std $(DEPDIR)/gnuradio_swig_py_filter_python.d
1291
##
1292
## (3) all a carriage return to the end of the dependency file.
1293
##
1294
	echo "" >> $(DEPDIR)/gnuradio_swig_py_filter_python.d
1295
##
1296
## (4) from the SWIG file, remove the first line (the target); remove
1297
##     trailing " \" and " " from each line.  Append ":" to each line,
1298
##     followed by 2 carriage returns, then append this to the end of
1299
##     the dependency file.
1300
##
1301
	$(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/gnuradio_swig_py_filter_python.Std | \
1302
		awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/gnuradio_swig_py_filter_python.d
1303
##
1304
## (5) remove the SWIG-generated file
1305
##
1306
	$(RM) $(DEPDIR)/gnuradio_swig_py_filter_python.Std
1307
##
1308
## Create the stamp for this filename generation, to signal success in
1309
## executing this rule; allows other threads waiting on this process
1310
## to continue.
1311
##
1312
	touch $(DEPDIR)/gnuradio_swig_py_filter-generate-python-stamp
1313

1314
# KLUDGE: Force runtime include of a SWIG dependency file.  This is
1315
# not guaranteed to be portable, but will probably work.  If it works,
1316
# we have accurate dependencies for our swig stuff, which is good.
1317

1318
@am__include@ @am__quote@./$(DEPDIR)/gnuradio_swig_py_filter_python.d@am__quote@
1319 578

1320 579
$(DEPDIR)/gnuradio_swig_py_filter-generate-guile-stamp:
1321
if GUILE
1322
# the comments for the target above apply to this target as well, but it seemed
1323
# silly to include them twice. The only main change is for guile.
1324
	if $(SWIG) $(STD_SWIG_GUILE_ARGS) $(gnuradio_swig_py_filter_swig_args) \
1325
		-MD -MF $(DEPDIR)/gnuradio_swig_py_filter_guile.Std \
1326
		-module gnuradio_swig_py_filter -o gnuradio_swig_py_filter_guile.cc $(WHAT); then \
1327
	    if test $(host_os) = mingw32; then \
1328
		$(RM) $(DEPDIR)/gnuradio_swig_py_filter_guile.Sd; \
1329
		$(SED) 's,\\\\,/,g' < $(DEPDIR)/gnuradio_swig_py_filter_guile.Std \
1330
			> $(DEPDIR)/gnuradio_swig_py_filter_guile.Sd; \
1331
		$(RM) $(DEPDIR)/gnuradio_swig_py_filter_guile.Std; \
1332
		$(MV) $(DEPDIR)/gnuradio_swig_py_filter_guile.Sd $(DEPDIR)/gnuradio_swig_py_filter_guile.Std; \
1333
	    fi; \
1334
	else \
1335
	    $(RM) $(DEPDIR)/gnuradio_swig_py_filter_guile.S*; exit 1; \
1336
	fi;
1337
	touch $(DEPDIR)/gnuradio_swig_py_filter-generate-guile-stamp
1338
	$(RM) $(DEPDIR)/gnuradio_swig_py_filter_guile.d
1339
	cp $(DEPDIR)/gnuradio_swig_py_filter_guile.Std $(DEPDIR)/gnuradio_swig_py_filter_guile.d
1340
	echo "" >> $(DEPDIR)/gnuradio_swig_py_filter_guile.d
1341
	$(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/gnuradio_swig_py_filter_guile.Std | \
1342
		awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/gnuradio_swig_py_filter_guile.d
1343
	$(RM) $(DEPDIR)/gnuradio_swig_py_filter_guile.Std
1344
	touch $(DEPDIR)/gnuradio_swig_py_filter-generate-guile-stamp
1345
else
1346
	touch $(DEPDIR)/gnuradio_swig_py_filter-generate-guile-stamp
1347
endif
1348

1349
@am__include@ @am__quote@./$(DEPDIR)/gnuradio_swig_py_filter_guile.d@am__quote@
1350

1351
#gnuradio_swig_py_runtime_python.h: gnuradio_swig_py_runtime.i
1352 580

1353 581
# -*- Makefile -*-
1354 582
#
......
1434 662
## .h file is sometimes built, but not always ... so that one has to
1435 663
## be added manually by the including Makefile.am .
1436 664

1437
swig_built_sources += gnuradio_swig_py_io.py gnuradio_swig_py_io_python.cc
665
swig_built_sources += gnuradio_swig_py_io.py #gnuradio_swig_py_io.cc
1438 666
if GUILE
1439
swig_built_sources += gnuradio_swig_py_io.scm gnuradio_swig_py_io_guile.cc
667
swig_built_sources += gnuradio_swig_py_io.scm #gnuradio_swig_py_io.cc
1440 668
endif
1441 669

1442 670
## Various SWIG variables.  These can be overloaded in the including
......
1448 676
	$(gnuradio_swig_py_io_swiginclude_headers)
1449 677

1450 678
gnuradio_swig_py_io_pylib_LTLIBRARIES =		\
1451
	_gnuradio_swig_py_io_python.la
679
	_gnuradio_swig_py_io.la
1452 680

1453
_gnuradio_swig_py_io_python_la_SOURCES = 		\
1454
	gnuradio_swig_py_io_python.cc		\
681
_gnuradio_swig_py_io_la_SOURCES = 			\
682
	python/gnuradio_swig_py_io.cc		\
1455 683
	$(gnuradio_swig_py_io_la_swig_sources)
1456 684

1457
_gnuradio_swig_py_io_python_la_LIBADD =		\
685
_gnuradio_swig_py_io_la_LIBADD =			\
1458 686
	$(STD_SWIG_LA_LIB_ADD)		\
1459 687
	$(gnuradio_swig_py_io_la_swig_libadd)
1460 688

1461
_gnuradio_swig_py_io_python_la_LDFLAGS =		\
689
_gnuradio_swig_py_io_la_LDFLAGS =			\
1462 690
	$(STD_SWIG_LA_LD_FLAGS)		\
1463 691
	$(gnuradio_swig_py_io_la_swig_ldflags)
1464 692

1465
_gnuradio_swig_py_io_python_la_CXXFLAGS =		\
693
_gnuradio_swig_py_io_la_CXXFLAGS =			\
1466 694
	$(STD_SWIG_CXX_FLAGS)		\
1467 695
	$(gnuradio_swig_py_io_la_swig_cxxflags)
1468 696

1469 697
gnuradio_swig_py_io_python_PYTHON =			\
1470
	gnuradio_swig_py_io.py			\
1471
	$(gnuradio_swig_py_io_python)
698
	python/gnuradio_swig_py_io.py		\
699
	$(gnuradio_swig_py_io)
1472 700

1473 701
if GUILE
1474
gnuradio_swig_py_io_scmlib_LTLIBRARIES = _gnuradio_swig_py_io_guile.la
1475
_gnuradio_swig_py_io_guile_la_SOURCES = 		\
1476
	gnuradio_swig_py_io_guile.cc		        \
702
gnuradio_swig_py_io_scmlib_LTLIBRARIES = gnuradio_swig_py_io_guile.la
703
gnuradio_swig_py_io_guile_la_SOURCES = 		\
704
	guile/gnuradio_swig_py_io.cc		        \
1477 705
	$(gnuradio_swig_py_io_la_swig_sources)
1478 706
gnuradio_swig_py_io_scm_DATA = gnuradio_swig_py_io.scm
1479 707

1480 708
# Guile can use the same flags as python does
1481
_gnuradio_swig_py_io_guile_la_LIBADD = $(_gnuradio_swig_py_io_python_la_LIBADD)
1482
_gnuradio_swig_py_io_guile_la_LDFLAGS = $(_gnuradio_swig_py_io_python_la_LDFLAGS)
1483
_gnuradio_swig_py_io_guile_la_CXXFLAGS = $(_gnuradio_swig_py_io_python_la_CXXFLAGS)
709
gnuradio_swig_py_io_guile_la_LIBADD = $(_gnuradio_swig_py_io_la_LIBADD)
710
gnuradio_swig_py_io_guile_la_LDFLAGS = $(_gnuradio_swig_py_io_la_LDFLAGS)
711
gnuradio_swig_py_io_guile_la_CXXFLAGS = $(_gnuradio_swig_py_io_la_CXXFLAGS)
1484 712

1485 713
endif				# end of GUILE
1486 714

1487 715
## Entry rule for running SWIG
1488 716

1489 717
# $(python_deps) $(guile_deps): gnuradio_swig_py_io.i
1490
gnuradio_swig_py_io_python.h gnuradio_swig_py_io.py gnuradio_swig_py_io_python.cc: gnuradio_swig_py_io.i
1491
## This rule will get called only when MAKE decides that one of the
1492
## targets needs to be created or re-created, because:
1493
##
1494
## * The .i file is newer than any or all of the generated files;
1495
##
1496
## * Any or all of the .cc, .h, or .py files does not exist and is
1497
##   needed (in the case this file is not needed, the rule for it is
1498
##   ignored); or
1499
##
1500
## * Some SWIG-based dependecy of the .cc file isn't met and hence the
1501
##   .cc file needs be be regenerated.  Explanation: Because MAKE
1502
##   knows how to handle dependencies for .cc files (regardless of
1503
##   their name or extension), then the .cc file is used as a target
1504
##   instead of the .i file -- but with the dependencies of the .i
1505
##   file.  It is this last reason why the line:
1506
##
1507
##     	if test -f $@; then :; else
1508
##
1509
##   cannot be used in this case: If a .i file dependecy is not met,
1510
##   then the .cc file needs to be rebuilt.  But if the stamp is newer
1511
##   than the .cc file, and the .cc file exists, then in the original
1512
##   version (with the 'test' above) the internal MAKE call will not
1513
##   be issued and hence the .cc file will not be rebuilt.
1514
##
1515
## Once execution gets to here, it should always proceed no matter the
1516
## state of a stamp (as discussed in link above).  The
1517
## $(DEPDIR)/gnuradio_swig_py_io-generate stuff is used to allow for parallel
1518
## builds to "do the right thing".  The stamp has no relationship with
1519
## either the target files or dependency file; it is used solely for
1520
## the protection of multiple builds during a given call to MAKE.
1521
##
1522
## Catch signals SIGHUP (1), SIGINT (2), SIGPIPE (13), and SIGTERM
1523
## (15).  At a caught signal, the quoted command will be issued before
1524
## exiting.  In this case, remove any stamp, whether temporary of not.
1525
## The trap is valid until the process exits; the process includes all
1526
## commands appended via "\"s.
1527
##
1528
	trap 'rm -rf $(DEPDIR)/gnuradio_swig_py_io-generate-*' 1 2 13 15; \
1529
##
1530
## Create a temporary directory, which acts as a lock.  The first
1531
## process to create the directory will succeed and issue the MAKE
1532
## command to do the actual work, while all subsequent processes will
1533
## fail -- leading them to wait for the first process to finish.
1534
##
1535
	if mkdir $(DEPDIR)/gnuradio_swig_py_io-generate-lock 2>/dev/null; then \
1536
##
1537
## This code is being executed by the first process to succeed in
1538
## creating the directory lock.
1539
##
1540
## Remove the stamp associated with this filename.
1541
##
1542
		rm -f $(DEPDIR)/gnuradio_swig_py_io-generate-*stamp; \
1543
##
1544
## Tell MAKE to run the rule for creating this stamp.
1545
##
1546
		$(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/gnuradio_swig_py_io-generate-python-stamp WHAT=$<; \
1547
##
1548
## Now that the .cc, .h, and .py files have been (re)created from the
1549
## .i file, future checking of this rule during the same MAKE
1550
## execution will come back that the rule doesn't need to be executed
1551
## because none of the conditions mentioned at the start of this rule
1552
## will be positive.  Remove the the directory lock, which frees up
1553
## any waiting process(es) to continue.
1554
##
1555
		rmdir $(DEPDIR)/gnuradio_swig_py_io-generate-lock; \
1556
	else \
1557
##
1558
## This code is being executed by any follower processes while the
1559
## directory lock is in place.
1560
##
1561
## Wait until the first process is done, testing once per second.
1562
##
1563
		while test -d $(DEPDIR)/gnuradio_swig_py_io-generate-lock; do \
1564
			sleep 1; \
1565
		done; \
1566
##
1567
## Succeed if and only if the first process succeeded; exit this
1568
## process returning the status of the generated stamp.
1569
##
1570
		test -f $(DEPDIR)/gnuradio_swig_py_io-generate-python-stamp; \
1571
		exit $$?; \
1572
	fi;
1573

1574
# the comments for the target above apply to this target as well, but it seemed
1575
# silly to include them twice. The only main change is for guile.
1576
gnuradio_swig_py_io_guile.h gnuradio_swig_py_io.scm gnuradio_swig_py_io_guile.cc: gnuradio_swig_py_io.i
1577
if GUILE
1578
	trap 'rm -rf $(DEPDIR)/gnuradio_swig_py_io-generate-*' 1 2 13 15; \
1579
	if mkdir $(DEPDIR)/gnuradio_swig_py_io-generate-lock 2>/dev/null; then \
1580
		rm -f $(DEPDIR)/gnuradio_swig_py_io-generate-*stamp; \
1581
		$(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/gnuradio_swig_py_io-generate-guile-stamp WHAT=$<; \
1582
		rmdir $(DEPDIR)/gnuradio_swig_py_io-generate-lock; \
1583
	else \
1584
		while test -d $(DEPDIR)/gnuradio_swig_py_io-generate-lock; do \
1585
			sleep 1; \
1586
		done; \
1587
		test -f $(DEPDIR)/gnuradio_swig_py_io-generate-guile-stamp; \
1588
		exit $$?; \
1589
	fi;
1590
endif				# end of GUILE
718
# gnuradio_swig_py_io.h gnuradio_swig_py_io.py gnuradio_swig_py_io.cc: gnuradio_swig_py_io.i
719
guile/gnuradio_swig_py_io.scm gnuradio_swig_py_io.scm: gnuradio_swig_py_io.i
720
python/gnuradio_swig_py_io.py gnuradio_swig_py_io.py: gnuradio_swig_py_io.i
1591 721

1592 722
$(DEPDIR)/gnuradio_swig_py_io-generate-python-stamp:
1593
## This rule will be called only by the first process issuing the
1594
## above rule to succeed in creating the lock directory, after
1595
## removing the actual stamp file in order to guarantee that MAKE will
1596
## execute this rule.
1597
##
1598
## Call SWIG to generate the various output files; special
1599
## post-processing on 'mingw32' host OS for the dependency file.
1600
##
1601
	if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(gnuradio_swig_py_io_swig_args) \
1602
		-MD -MF $(DEPDIR)/gnuradio_swig_py_io_python.Std \
1603
		-module gnuradio_swig_py_io -o gnuradio_swig_py_io_python.cc $(WHAT); then \
1604
	    if test $(host_os) = mingw32; then \
1605
		$(RM) $(DEPDIR)/gnuradio_swig_py_io_python.Sd; \
1606
		$(SED) 's,\\\\,/,g' < $(DEPDIR)/gnuradio_swig_py_io_python.Std \
1607
			> $(DEPDIR)/gnuradio_swig_py_io_python.Sd; \
1608
		$(RM) $(DEPDIR)/gnuradio_swig_py_io_python.Std; \
1609
		$(MV) $(DEPDIR)/gnuradio_swig_py_io_python.Sd $(DEPDIR)/gnuradio_swig_py_io_python.Std; \
1610
	    fi; \
1611
	else \
1612
	    $(RM) $(DEPDIR)/gnuradio_swig_py_io_python.S*; exit 1; \
1613
	fi;
1614
##
1615
## Mess with the SWIG output .Std dependency file, to create a
1616
## dependecy file valid for the input .i file: Basically, simulate the
1617
## dependency file created for libraries by GNU's libtool for C++,
1618
## where all of the dependencies for the target are first listed, then
1619
## each individual dependency is listed as a target with no further
1620
## dependencies.
1621
##
1622
## (1) remove the current dependency file
1623
##
1624
	$(RM) $(DEPDIR)/gnuradio_swig_py_io_python.d
1625
##
1626
## (2) Copy the whole SWIG file:
1627
##
1628
	cp $(DEPDIR)/gnuradio_swig_py_io_python.Std $(DEPDIR)/gnuradio_swig_py_io_python.d
1629
##
1630
## (3) all a carriage return to the end of the dependency file.
1631
##
1632
	echo "" >> $(DEPDIR)/gnuradio_swig_py_io_python.d
1633
##
1634
## (4) from the SWIG file, remove the first line (the target); remove
1635
##     trailing " \" and " " from each line.  Append ":" to each line,
1636
##     followed by 2 carriage returns, then append this to the end of
1637
##     the dependency file.
1638
##
1639
	$(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/gnuradio_swig_py_io_python.Std | \
1640
		awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/gnuradio_swig_py_io_python.d
1641
##
1642
## (5) remove the SWIG-generated file
1643
##
1644
	$(RM) $(DEPDIR)/gnuradio_swig_py_io_python.Std
1645
##
1646
## Create the stamp for this filename generation, to signal success in
1647
## executing this rule; allows other threads waiting on this process
1648
## to continue.
1649
##
1650
	touch $(DEPDIR)/gnuradio_swig_py_io-generate-python-stamp
1651

1652
# KLUDGE: Force runtime include of a SWIG dependency file.  This is
1653
# not guaranteed to be portable, but will probably work.  If it works,
1654
# we have accurate dependencies for our swig stuff, which is good.
1655

1656
@am__include@ @am__quote@./$(DEPDIR)/gnuradio_swig_py_io_python.d@am__quote@
1657 723

1658 724
$(DEPDIR)/gnuradio_swig_py_io-generate-guile-stamp:
1659
if GUILE
1660
# the comments for the target above apply to this target as well, but it seemed
1661
# silly to include them twice. The only main change is for guile.
1662
	if $(SWIG) $(STD_SWIG_GUILE_ARGS) $(gnuradio_swig_py_io_swig_args) \
1663
		-MD -MF $(DEPDIR)/gnuradio_swig_py_io_guile.Std \
1664
		-module gnuradio_swig_py_io -o gnuradio_swig_py_io_guile.cc $(WHAT); then \
1665
	    if test $(host_os) = mingw32; then \
1666
		$(RM) $(DEPDIR)/gnuradio_swig_py_io_guile.Sd; \
1667
		$(SED) 's,\\\\,/,g' < $(DEPDIR)/gnuradio_swig_py_io_guile.Std \
1668
			> $(DEPDIR)/gnuradio_swig_py_io_guile.Sd; \
1669
		$(RM) $(DEPDIR)/gnuradio_swig_py_io_guile.Std; \
1670
		$(MV) $(DEPDIR)/gnuradio_swig_py_io_guile.Sd $(DEPDIR)/gnuradio_swig_py_io_guile.Std; \
1671
	    fi; \
1672
	else \
1673
	    $(RM) $(DEPDIR)/gnuradio_swig_py_io_guile.S*; exit 1; \
1674
	fi;
1675
	touch $(DEPDIR)/gnuradio_swig_py_io-generate-guile-stamp
1676
	$(RM) $(DEPDIR)/gnuradio_swig_py_io_guile.d
1677
	cp $(DEPDIR)/gnuradio_swig_py_io_guile.Std $(DEPDIR)/gnuradio_swig_py_io_guile.d
1678
	echo "" >> $(DEPDIR)/gnuradio_swig_py_io_guile.d
1679
	$(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/gnuradio_swig_py_io_guile.Std | \
1680
		awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/gnuradio_swig_py_io_guile.d
1681
	$(RM) $(DEPDIR)/gnuradio_swig_py_io_guile.Std
1682
	touch $(DEPDIR)/gnuradio_swig_py_io-generate-guile-stamp
1683
else
1684
	touch $(DEPDIR)/gnuradio_swig_py_io-generate-guile-stamp
1685
endif
1686

1687
@am__include@ @am__quote@./$(DEPDIR)/gnuradio_swig_py_io_guile.d@am__quote@
1688

1689
#gnuradio_swig_py_runtime_python.h: gnuradio_swig_py_runtime.i
1690 725

1691 726
# -*- Makefile -*-
1692 727
#
......
1772 807
## .h file is sometimes built, but not always ... so that one has to
1773 808
## be added manually by the including Makefile.am .
1774 809

1775
swig_built_sources += gnuradio_swig_py_hier.py gnuradio_swig_py_hier_python.cc
810
swig_built_sources += gnuradio_swig_py_hier.py #gnuradio_swig_py_hier.cc
1776 811
if GUILE
1777
swig_built_sources += gnuradio_swig_py_hier.scm gnuradio_swig_py_hier_guile.cc
812
swig_built_sources += gnuradio_swig_py_hier.scm #gnuradio_swig_py_hier.cc
1778 813
endif
1779 814

1780 815
## Various SWIG variables.  These can be overloaded in the including
......
1786 821
	$(gnuradio_swig_py_hier_swiginclude_headers)
1787 822

1788 823
gnuradio_swig_py_hier_pylib_LTLIBRARIES =		\
1789
	_gnuradio_swig_py_hier_python.la
824
	_gnuradio_swig_py_hier.la
1790 825

1791
_gnuradio_swig_py_hier_python_la_SOURCES = 		\
1792
	gnuradio_swig_py_hier_python.cc		\
826
_gnuradio_swig_py_hier_la_SOURCES = 			\
827
	python/gnuradio_swig_py_hier.cc		\
1793 828
	$(gnuradio_swig_py_hier_la_swig_sources)
1794 829

1795
_gnuradio_swig_py_hier_python_la_LIBADD =		\
830
_gnuradio_swig_py_hier_la_LIBADD =			\
1796 831
	$(STD_SWIG_LA_LIB_ADD)		\
1797 832
	$(gnuradio_swig_py_hier_la_swig_libadd)
1798 833

1799
_gnuradio_swig_py_hier_python_la_LDFLAGS =		\
834
_gnuradio_swig_py_hier_la_LDFLAGS =			\
1800 835
	$(STD_SWIG_LA_LD_FLAGS)		\
1801 836
	$(gnuradio_swig_py_hier_la_swig_ldflags)
1802 837

1803
_gnuradio_swig_py_hier_python_la_CXXFLAGS =		\
838
_gnuradio_swig_py_hier_la_CXXFLAGS =			\
1804 839
	$(STD_SWIG_CXX_FLAGS)		\
1805 840
	$(gnuradio_swig_py_hier_la_swig_cxxflags)
1806 841

1807 842
gnuradio_swig_py_hier_python_PYTHON =			\
1808
	gnuradio_swig_py_hier.py			\
1809
	$(gnuradio_swig_py_hier_python)
843
	python/gnuradio_swig_py_hier.py		\
844
	$(gnuradio_swig_py_hier)
1810 845

1811 846
if GUILE
1812
gnuradio_swig_py_hier_scmlib_LTLIBRARIES = _gnuradio_swig_py_hier_guile.la
1813
_gnuradio_swig_py_hier_guile_la_SOURCES = 		\
1814
	gnuradio_swig_py_hier_guile.cc		        \
847
gnuradio_swig_py_hier_scmlib_LTLIBRARIES = gnuradio_swig_py_hier_guile.la
848
gnuradio_swig_py_hier_guile_la_SOURCES = 		\
849
	guile/gnuradio_swig_py_hier.cc		        \
1815 850
	$(gnuradio_swig_py_hier_la_swig_sources)
1816 851
gnuradio_swig_py_hier_scm_DATA = gnuradio_swig_py_hier.scm
1817 852

1818 853
# Guile can use the same flags as python does
1819
_gnuradio_swig_py_hier_guile_la_LIBADD = $(_gnuradio_swig_py_hier_python_la_LIBADD)
1820
_gnuradio_swig_py_hier_guile_la_LDFLAGS = $(_gnuradio_swig_py_hier_python_la_LDFLAGS)
1821
_gnuradio_swig_py_hier_guile_la_CXXFLAGS = $(_gnuradio_swig_py_hier_python_la_CXXFLAGS)
854
gnuradio_swig_py_hier_guile_la_LIBADD = $(_gnuradio_swig_py_hier_la_LIBADD)
855
gnuradio_swig_py_hier_guile_la_LDFLAGS = $(_gnuradio_swig_py_hier_la_LDFLAGS)
856
gnuradio_swig_py_hier_guile_la_CXXFLAGS = $(_gnuradio_swig_py_hier_la_CXXFLAGS)
1822 857

1823 858
endif				# end of GUILE
1824 859

1825 860
## Entry rule for running SWIG
1826 861

1827 862
# $(python_deps) $(guile_deps): gnuradio_swig_py_hier.i
1828
gnuradio_swig_py_hier_python.h gnuradio_swig_py_hier.py gnuradio_swig_py_hier_python.cc: gnuradio_swig_py_hier.i
1829
## This rule will get called only when MAKE decides that one of the
1830
## targets needs to be created or re-created, because:
1831
##
1832
## * The .i file is newer than any or all of the generated files;
1833
##
1834
## * Any or all of the .cc, .h, or .py files does not exist and is
1835
##   needed (in the case this file is not needed, the rule for it is
1836
##   ignored); or
1837
##
1838
## * Some SWIG-based dependecy of the .cc file isn't met and hence the
1839
##   .cc file needs be be regenerated.  Explanation: Because MAKE
1840
##   knows how to handle dependencies for .cc files (regardless of
1841
##   their name or extension), then the .cc file is used as a target
1842
##   instead of the .i file -- but with the dependencies of the .i
1843
##   file.  It is this last reason why the line:
1844
##
1845
##     	if test -f $@; then :; else
1846
##
1847
##   cannot be used in this case: If a .i file dependecy is not met,
1848
##   then the .cc file needs to be rebuilt.  But if the stamp is newer
1849
##   than the .cc file, and the .cc file exists, then in the original
1850
##   version (with the 'test' above) the internal MAKE call will not
1851
##   be issued and hence the .cc file will not be rebuilt.
1852
##
1853
## Once execution gets to here, it should always proceed no matter the
1854
## state of a stamp (as discussed in link above).  The
1855
## $(DEPDIR)/gnuradio_swig_py_hier-generate stuff is used to allow for parallel
1856
## builds to "do the right thing".  The stamp has no relationship with
1857
## either the target files or dependency file; it is used solely for
1858
## the protection of multiple builds during a given call to MAKE.
1859
##
1860
## Catch signals SIGHUP (1), SIGINT (2), SIGPIPE (13), and SIGTERM
1861
## (15).  At a caught signal, the quoted command will be issued before
1862
## exiting.  In this case, remove any stamp, whether temporary of not.
1863
## The trap is valid until the process exits; the process includes all
1864
## commands appended via "\"s.
1865
##
1866
	trap 'rm -rf $(DEPDIR)/gnuradio_swig_py_hier-generate-*' 1 2 13 15; \
1867
##
1868
## Create a temporary directory, which acts as a lock.  The first
1869
## process to create the directory will succeed and issue the MAKE
1870
## command to do the actual work, while all subsequent processes will
1871
## fail -- leading them to wait for the first process to finish.
1872
##
1873
	if mkdir $(DEPDIR)/gnuradio_swig_py_hier-generate-lock 2>/dev/null; then \
1874
##
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff