summaryrefslogtreecommitdiff
path: root/Makefile.in
blob: c47cdbe7c0419593d09566efa2e1d4b9591c2052 (plain)
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
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
#######################################################################
# SWIG top level Makefile
#######################################################################

.PHONY: ccache source swig

prefix      = @prefix@
exec_prefix = @exec_prefix@
srcdir      = @srcdir@
datarootdir = @datarootdir@

##############################################################################
# Compiler and system configuration
##############################################################################

SHELL       = /bin/sh
SWIG_LIB    = @swig_lib@
BIN_DIR     = @bindir@
ENABLE_CCACHE = @ENABLE_CCACHE@
TARGET_NOEXE= swig
TARGET      = $(TARGET_NOEXE)@EXEEXT@
SOURCE      = Source
CCACHE      = CCache
DOCS        = Doc/Manual
RUNPIPE     = \>/dev/null

swig: libfiles source ccache

source:
	@cd $(SOURCE) && $(MAKE)

ccache:
	test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE))

libfiles: $(srcdir)/Lib/swigwarn.swg

# Files required just for the tarball
maintainer: libfiles
	@cd $(SOURCE) && $(MAKE) CParse/parser.h

#####################################################################
# Documentation
#####################################################################

docs: docs-main docs-ccache

docs-main:
	@echo making docs
	@test -d $(DOCS) || exit 0; cd $(DOCS) && $(MAKE) all clean-baks

docs-ccache:
	test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) docs)

#####################################################################
# All the languages SWIG speaks (when it wants to)
#####################################################################

skip-tcl	= test -n "@SKIP_TCL@"
skip-perl5	= test -n "@SKIP_PERL5@"
skip-python	= test -n "@SKIP_PYTHON@"
skip-java	= test -n "@SKIP_JAVA@"
skip-guilescm   = test -n "@SKIP_GUILESCM@"
skip-guile	= test -n "@SKIP_GUILE@"
skip-mzscheme	= test -n "@SKIP_MZSCHEME@"
skip-ruby	= test -n "@SKIP_RUBY@"
skip-php	= test -n "@SKIP_PHP@"
skip-ocaml      = test -n "@SKIP_OCAML@"
skip-octave     = test -n "@SKIP_OCTAVE@"
skip-pike       = test -n "@SKIP_PIKE@"
skip-chicken	= test -n "@SKIP_CHICKEN@"
skip-csharp	= test -n "@SKIP_CSHARP@"
skip-modula3	= test -n "@SKIP_MODULA3@"
skip-lua    	= test -n "@SKIP_LUA@"
skip-allegrocl  = test -n "@SKIP_ALLEGROCL@"
skip-clisp	= test -n "@SKIP_CLISP@"
skip-cffi	= test -n "@SKIP_CFFI@"
skip-uffi	= test -n "@SKIP_UFFI@"
skip-r		= test -n "@SKIP_R@"
skip-go		= test -n "@SKIP_GO@"
skip-d		= test -n "@SKIP_D@"

# Additional dependencies for some tests
skip-gcj        = test -n "@SKIP_GCJ@"
skip-android    = test -n "@SKIP_ANDROID@"

#####################################################################
# CHECK
#####################################################################

ACTION = check
NOSKIP =

chk-set-swiglib		= SWIG_LIB=@ROOT_DIR@/Lib
chk-set-swig		= SWIG=@ROOT_DIR@/$(TARGET)
chk-set-env = $(chk-set-swiglib) $(chk-set-swig)

check-aliveness:
	test -x ./$(TARGET)
	./$(TARGET) -version
	./$(TARGET) -help
	@$(skip-tcl)      || ./$(TARGET) -tcl        -help
	@$(skip-perl5)    || ./$(TARGET) -perl       -help
	@$(skip-python)   || ./$(TARGET) -python     -help
	@$(skip-java)     || ./$(TARGET) -java       -help
	@$(skip-guile)    || ./$(TARGET) -guile      -help
	@$(skip-mzscheme) || ./$(TARGET) -mzscheme   -help
	@$(skip-ruby)     || ./$(TARGET) -ruby       -help
	@$(skip-ocaml)    || ./$(TARGET) -ocaml      -help
	@$(skip-octave)   || ./$(TARGET) -octave     -help
	@$(skip-php)      || ./$(TARGET) -php        -help
	@$(skip-pike)     || ./$(TARGET) -pike       -help
	@$(skip-chicken)  || ./$(TARGET) -chicken    -help
	@$(skip-csharp)   || ./$(TARGET) -csharp     -help
	@$(skip-modula3)  || ./$(TARGET) -modula3    -help
	@$(skip-allegrocl)|| ./$(TARGET) -allegrocl  -help
	@$(skip-clisp)    || ./$(TARGET) -clisp      -help
	@$(skip-uffi)     || ./$(TARGET) -uffi       -help
	@$(skip-cffi)     || ./$(TARGET) -cffi       -help
	@$(skip-lua)      || ./$(TARGET) -lua        -help
	@$(skip-r) 	  || ./$(TARGET) -r          -help
	@$(skip-go)	  || ./$(TARGET) -go         -help
	@$(skip-d) 	  || ./$(TARGET) -d          -help

check-ccache:
	test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) check)

# Checks / displays versions of each target language
check-versions:					\
	check-tcl-version			\
	check-perl5-version			\
	check-python-version			\
	check-java-version			\
	check-android-version			\
	check-guile-version			\
	check-mzscheme-version			\
	check-ruby-version			\
	check-ocaml-version			\
	check-octave-version			\
	check-php-version			\
	check-pike-version			\
	check-chicken-version			\
	check-csharp-version			\
	check-modula3-version			\
	check-lua-version			\
	check-allegrocl-version			\
	check-clisp-version			\
	check-uffi-version			\
	check-cffi-version			\
	check-r-version				\
	check-go-version			\
	check-d-version

# all examples
check-%-version :
	@if test -z "$(skip-$*)"; then				\
	  echo $* unknown;					\
	  exit 1;						\
	fi
	@if $(skip-$*); then					\
	  echo skipping $* version;				\
	else							\
	  echo showing $* version;				\
	  (cd Examples && $(MAKE) -s $*_version)		\
	fi

# Checks examples for compilation (does not run them)
check-examples:					\
	check-tcl-examples			\
	check-perl5-examples			\
	check-python-examples			\
	check-java-examples			\
	check-android-examples			\
	check-guile-examples			\
	check-mzscheme-examples			\
	check-ruby-examples			\
	check-ocaml-examples			\
	check-octave-examples			\
	check-php-examples			\
	check-pike-examples			\
	check-chicken-examples                  \
	check-csharp-examples                   \
	check-modula3-examples                  \
	check-lua-examples			\
	check-allegrocl-examples		\
	check-clisp-examples			\
	check-uffi-examples			\
	check-cffi-examples			\
	check-r-examples			\
	check-go-examples			\
	check-d-examples

tcl_examples       :=$(shell sed '/^\#/d' $(srcdir)/Examples/tcl/check.list)
perl5_examples     :=$(shell sed '/^\#/d' $(srcdir)/Examples/perl5/check.list)
python_examples    :=$(shell sed '/^\#/d' $(srcdir)/Examples/python/check.list)
java_examples      :=$(shell sed '/^\#/d' $(srcdir)/Examples/java/check.list)
android_examples   :=$(shell sed '/^\#/d' $(srcdir)/Examples/android/check.list)
guile_examples     :=$(shell sed '/^\#/d' $(srcdir)/Examples/guile/check.list)
mzscheme_examples  :=$(shell sed '/^\#/d' $(srcdir)/Examples/mzscheme/check.list)
ruby_examples      :=$(shell sed '/^\#/d' $(srcdir)/Examples/ruby/check.list)
ocaml_examples     :=$(shell sed '/^\#/d' $(srcdir)/Examples/ocaml/check.list)
octave_examples    :=$(shell sed '/^\#/d' $(srcdir)/Examples/octave/check.list)
php_examples       :=$(shell sed '/^\#/d' $(srcdir)/Examples/php/check.list)
pike_examples      :=$(shell sed '/^\#/d' $(srcdir)/Examples/pike/check.list)
chicken_examples   :=$(shell sed '/^\#/d' $(srcdir)/Examples/chicken/check.list)
csharp_examples    :=$(shell sed '/^\#/d' $(srcdir)/Examples/csharp/check.list)
modula3_examples   :=$(shell sed '/^\#/d' $(srcdir)/Examples/modula3/check.list)
lua_examples       :=$(shell sed '/^\#/d' $(srcdir)/Examples/lua/check.list)
allegrocl_examples :=
clisp_examples     :=
uffi_examples      :=
cffi_examples      :=
r_examples         :=$(shell sed '/^\#/d' $(srcdir)/Examples/r/check.list)
go_examples        :=$(shell sed '/^\#/d' $(srcdir)/Examples/go/check.list)
d_examples         :=$(shell sed '/^\#/d' $(srcdir)/Examples/d/check.list)

# all examples
check-%-examples :
	@if test -z "$(skip-$*)"; then				\
	  echo $* unknown;					\
	  exit 1;						\
	fi
	@if $(skip-$*); then					\
	  echo skipping $* $(ACTION);				\
	elif test -z "$($(strip $*_examples))"; then		\
	  echo empty $* $(ACTION);				\
	else							\
	  $(MAKE) -k -s $($*_examples:=.actionexample) LANGUAGE=$* ACTION=$(ACTION); \
	fi

# individual example
%.actionexample:
	@echo $(ACTION)ing Examples/$(LANGUAGE)/$*
	@(cd Examples/$(LANGUAGE)/$* && $(MAKE) -s $(chk-set-env) $(ACTION) RUNPIPE=$(RUNPIPE))

# gcj individual example
java.actionexample:
	@if $(skip-gcj); then					\
          echo "skipping Examples/$(LANGUAGE)/java $(ACTION) (gcj test)";	\
        else							\
	  echo $(ACTION)ing Examples/$(LANGUAGE)/java;		\
	  (cd Examples/$(LANGUAGE)/java && $(MAKE) -s $(chk-set-env) $(ACTION)) \
	fi

# Checks testcases in the test-suite excluding those which are known to be broken
check-test-suite:				\
	check-tcl-test-suite			\
	check-perl5-test-suite			\
	check-python-test-suite			\
	check-java-test-suite			\
	check-guilescm-test-suite		\
	check-guile-test-suite			\
	check-mzscheme-test-suite		\
	check-ruby-test-suite			\
	check-ocaml-test-suite			\
	check-octave-test-suite			\
	check-php-test-suite			\
	check-pike-test-suite			\
	check-csharp-test-suite			\
	check-modula3-test-suite		\
	check-lua-test-suite			\
	check-allegrocl-test-suite		\
	check-clisp-test-suite			\
	check-uffi-test-suite			\
	check-cffi-test-suite			\
	check-chicken-test-suite		\
	check-r-test-suite			\
	check-go-test-suite			\
	check-d-test-suite

check-%-test-suite:
	@if test -z "$(skip-$*)"; then					\
	  echo $* unknown;						\
	  exit 1;							\
	fi
	@passed=true;							\
	dir="Examples/test-suite/$*";					\
	if $(skip-$*) -a "$(NOSKIP)" != "1"; then			\
	  echo skipping $* test-suite $(ACTION);			\
	elif [ ! -d $$dir ]; then					\
	  echo warning: cannot $(ACTION) $* test-suite "(no dir $$dir)";\
	else								\
	  echo $(ACTION)ing $* test-suite;				\
	  (cd $$dir && $(MAKE) -k -s $(ACTION))				\
	  || passed=false;						\
	fi;								\
	test $$passed = true

# Partial test-suite check - it only invokes SWIG, ie no compilation and no runtime testing
partialcheck-test-suite:
	@$(MAKE) -k -s check-test-suite ACTION=partialcheck NOSKIP=1

partialcheck-%-test-suite:
	@$(MAKE) -k -s check-$*-test-suite ACTION=partialcheck NOSKIP=1

check: check-aliveness check-ccache check-versions check-examples check-test-suite

# Run known-to-be-broken as well as not broken testcases in the test-suite
all-test-suite:					\
	all-tcl-test-suite			\
	all-perl5-test-suite			\
	all-python-test-suite			\
	all-java-test-suite			\
	all-guilescm-test-suite			\
	all-guile-test-suite			\
	all-mzscheme-test-suite			\
	all-ruby-test-suite			\
	all-ocaml-test-suite			\
	all-octave-test-suite			\
	all-php-test-suite			\
	all-pike-test-suite			\
	all-csharp-test-suite			\
	all-modula3-test-suite			\
	all-lua-test-suite			\
	all-allegrocl-test-suite		\
	all-clisp-test-suite			\
	all-uffi-test-suite			\
	all-cffi-test-suite			\
	all-chicken-test-suite			\
	all-r-test-suite			\
	all-go-test-suite			\
	all-d-test-suite

all-%-test-suite:
	@$(MAKE) -k -s check-$*-test-suite ACTION=all

# Run known-to-be-broken testcases in the test-suite
broken-test-suite:				\
	broken-tcl-test-suite			\
	broken-perl5-test-suite			\
	broken-python-test-suite		\
	broken-java-test-suite			\
	broken-guilescm-test-suite		\
	broken-guile-test-suite			\
	broken-mzscheme-test-suite		\
	broken-ruby-test-suite			\
	broken-ocaml-test-suite			\
	broken-octave-test-suite		\
	broken-php-test-suite			\
	broken-pike-test-suite			\
	broken-csharp-test-suite		\
	broken-modula3-test-suite		\
	broken-lua-test-suite			\
	broken-allegrocl-test-suite		\
	broken-clisp-test-suite			\
	broken-uffi-test-suite			\
	broken-cffi-test-suite			\
	broken-chicken-test-suite		\
	broken-r-test-suite			\
	broken-go-test-suite			\
	broken-d-test-suite

broken-%-test-suite:
	@$(MAKE) -k -s check-$*-test-suite ACTION=broken

#####################################################################
# CLEAN
#####################################################################

clean: clean-objects clean-examples clean-test-suite

clean-objects: clean-source clean-ccache

clean-source:
	@echo cleaning Source
	@cd $(SOURCE) && $(MAKE) -s clean
	@rm -f $(TARGET)

clean-examples:
	@$(MAKE) -k -s check-examples ACTION=clean

clean-test-suite:
	@$(MAKE) -k -s check-test-suite ACTION=clean NOSKIP=1

clean-%-examples:
	@$(MAKE) -k -s check-$*-examples ACTION=clean

clean-%-test-suite:
	@$(MAKE) -k -s check-$*-test-suite ACTION=clean NOSKIP=1

clean-ccache:
	test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) -s clean)

#####################################################################
# DISTCLEAN - clean what configure built
#####################################################################

DISTCLEAN-DEAD = config.status config.log config.cache swig.spec Makefile mkmf.log libtool preinst-swig Lib/ocaml/swigp4.ml

distclean-helper: distclean-test-suite distclean-examples distclean-dead

distclean: distclean-source distclean-ccache distclean-helper

distclean-source:
	@echo distcleaning Source
	@cd $(SOURCE) && $(MAKE) -s distclean
	@rm -f $(TARGET)

distclean-test-suite:
	@echo distcleaning Examples/test-suite
	@$(MAKE) -k -s check-test-suite ACTION=distclean NOSKIP=1

distclean-examples:
	@echo distcleaning Examples
	@$(MAKE) -k -s clean-examples
	@cd Examples && $(MAKE) -k -s distclean

distclean-ccache:
	@test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) -s distclean)

distclean-dead:
	rm -f $(DISTCLEAN-DEAD)
	rm -rf autom4te.cache

#####################################################################
# MAINTAINER CLEAN - clean what the maintainer builds and ships in
# the distributed tarball - should not delete anything needed to run
# ./configure && make
#####################################################################

maintainer-clean:
	@echo maintainer-cleaning source
	@cd $(SOURCE) && $(MAKE) -k -s maintainer-clean
	@echo maintainer-cleaning CCache
	@test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) -s maintainer-clean)
	@echo maintainer-cleaning docs
	@cd $(DOCS) && $(MAKE) -k -s maintainer-clean
	@echo maintainer-cleaning Lib files
	@rm -f $(srcdir)/Lib/swigwarn.swg
	@echo distcleaning
	@$(MAKE) -k -s distclean-helper

#####################################################################
# Update the Lib/swigwarn.swg file
# Note: Generated into the source tree rather than build tree
#####################################################################

$(srcdir)/Lib/swigwarn.swg: $(srcdir)/Source/Include/swigwarn.h
	mkdir -p Lib
	echo "/* Automatically generated file containing all the swig warning codes.  */" > $@
	echo "/* Do not modify this file by hand, change 'Source/Include/swigwarn.h'  */" >> $@
	echo "/* and use the command 'make Lib/swigwarn.swg' instead.                 */" >> $@
	echo >> $@; echo >> $@
	awk '/#define WARN/{$$1="%define"; $$2="SWIG"$$2; $$3=sprintf("%d %%enddef", $$3); print $$0; next;}\
	      /#/{next;} {print $0}' < $? >> $@

#####################################################################
# TARGETS: install & friends
#####################################################################

INSTALL         = @abs_srcdir@/Tools/config/install-sh -c
INSTALL_DATA    = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL} -m 755
MKINSTDIRS      = @abs_srcdir@/Tools/config/install-sh -m 0755 -d
# Use standard autoconf approach to transform executable name using --program-prefix and --program-suffix
transform	= @program_transform_name@

install: install-main install-lib install-ccache
	@echo "Installation complete"

install-main:
	@echo "Installing SWIG executable"
	@$(MKINSTDIRS) $(DESTDIR)$(BIN_DIR)
	@echo "Installing $(DESTDIR)$(BIN_DIR)/`echo $(TARGET_NOEXE) | sed '$(transform)'`@EXEEXT@"
	@$(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(BIN_DIR)/`echo $(TARGET_NOEXE) | sed '$(transform)'`@EXEEXT@

lib-languages = gcj typemaps tcl perl5 python guile java mzscheme ruby php ocaml octave \
	pike chicken csharp modula3 allegrocl clisp lua cffi uffi r go d

lib-modules = std


install-lib: 
	@echo "Installing the SWIG library"
	@$(MKINSTDIRS) $(DESTDIR)$(SWIG_LIB)
	@for file in $(srcdir)/Lib/*.i $(srcdir)/Lib/*.swg ; do \
	    i=`basename $$file` ;				\
	    echo "Installing $(DESTDIR)$(SWIG_LIB)/$$i";	\
            $(INSTALL_DATA) $$file $(DESTDIR)$(SWIG_LIB)/$$i;	\
	    done;
	@for lang in $(lib-languages) $(lib-modules);		\
	    do							\
	    echo "Installing language specific files for $$lang"; \
	    dst=$(DESTDIR)$(SWIG_LIB)/$$lang;			\
	    $(MKINSTDIRS) $$dst;				\
	     (doti="`cd $(srcdir)/Lib/$$lang && ls *.i 2>/dev/null || echo ''`"; \
	      dotswg="`cd $(srcdir)/Lib/$$lang && ls *.swg 2>/dev/null || echo ''`"; \
	      if [ -f $(srcdir)/Lib/$$lang/extra-install.list ]; then	\
		  extra="`sed '/^#/d' $(srcdir)/Lib/$$lang/extra-install.list`";	\
	      fi;						\
	      files="`echo $$doti $$dotswg $$extra`";		\
	      if [ x"$$files" = x ]; then			\
		  echo "Installing nothing from Lib/$$lang";	\
	      else for file in $$doti $$dotswg $$extra;		\
		  do						\
		  echo "Installing $$dst/$$file";		\
		  $(INSTALL_DATA) $(srcdir)/Lib/$$lang/$$file $$dst/$$file; \
		  done;						\
	      fi) ; 						\
	done

install-ccache:
	@test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) -s install)


#####################################################################
# TARGETS: uninstall & friends
#####################################################################

uninstall: uninstall-main uninstall-lib uninstall-ccache
	@echo "Uninstall complete"

uninstall-main:
	@echo "Uninstalling SWIG executable $(DESTDIR)$(BIN_DIR)/`echo $(TARGET_NOEXE) | sed '$(transform)'`@EXEEXT@"
	rm -f $(DESTDIR)$(BIN_DIR)/`echo $(TARGET_NOEXE) | sed '$(transform)'`@EXEEXT@

uninstall-lib:
	@echo "Uninstalling the SWIG library"
	rm -rf $(DESTDIR)$(SWIG_LIB)/

uninstall-ccache:
	test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) uninstall)

############################################################################
# DIST and other maintenance
############################################################################

# distribution directory
dd = @PACKAGE_NAME@-@PACKAGE_VERSION@
srpm = @PACKAGE_NAME@-@PACKAGE_VERSION@

dist:
	@echo "not implemented - use Tools/makedist.py instead."
	false

srcrpm:
	rm -fr $(srpm) $(srpm).src.rpm
	echo "TODO: update to use git instead of cvs"
	cvs export -d $(srpm) -r HEAD SWIG
	cp swig.spec $(srpm)
	tar -cf - $(srpm) | gzip --best > $(srpm).tar.gz
	rm -fr $(srpm)
	rpmbuild -ts $(srpm).tar.gz

# Update the autoconf files for detecting host/targets. Automake will do this in
# version 1.10 for our case of not having a top level Makefile.am. Until then we
# can fetch them manually and will have to commit them to Git.
configfiles:
	wget ftp://ftp.gnu.org/pub/gnu/config/config.guess -O Tools/config/config.guess
	chmod a+x Tools/config/config.guess
	wget ftp://ftp.gnu.org/pub/gnu/config/config.sub -O Tools/config/config.sub
	chmod a+x Tools/config/config.sub

# Regenerate Makefile if Makefile.in or config.status have changed.
Makefile: $(srcdir)/Makefile.in config.status
	$(SHELL) ./config.status

# This target is usually called from Source/Makefile when configure.ac has
# changed.
am--refresh: $(srcdir)/configure

$(srcdir)/configure: $(srcdir)/configure.ac
	@echo "Build system is out of date.  If the following commands fail, please reconfigure by hand (rerun: ./autogen.sh && ./configure)"
	cd $(srcdir) && ./autogen.sh
	$(SHELL) ./config.status --recheck

############################################################################
# Tools
############################################################################

# Coverity static code analyser build and submit - EMAIL and PASSWORD need specifying
# See http://scan.coverity.com/start/
EMAIL=wsf@fultondesigns.co.uk
PASSWORD=
coverity:
	test -n "$(PASSWORD)" || (echo "PASSWORD not set" && false)
	$(MAKE) clean-source
	rm -rf cov-int
	cov-build --dir cov-int $(MAKE) source
	tar czvf swig-coverity.tgz cov-int
	curl --form file=@swig-coverity.tgz --form project=swig --form password=$(PASSWORD) --form email=$(EMAIL) http://scan5.coverity.com/cgi-bin/upload.py

# Makefile ends here