swig/Makefile.in
Thien-Thi Nguyen ff596ace98 (check-xml): New target.
(check): Depend on `check-xml'.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@999 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2001-01-17 02:07:09 +00:00

277 lines
9 KiB
Makefile

#######################################################################
# $Header$
#######################################################################
prefix = @prefix@
exec_prefix = @exec_prefix@
srcdir = @srcdir@
##############################################################################
# Compiler and system configuration
##############################################################################
SHELL = /bin/sh
CC = @CC@
CFLAGS = @CFLAGS@
CXX = @CXX@
LIBS = @LIBS@
AR = @AR@
RANLIB = @RANLIB@
LINKFORSHARED = @LINKFORSHARED@
# Note: Files in `SWIG_LIB' are machine independent so we use `prefix'
# instead of `exec_prefix' or, derivatively, `libdir'.
SWIG_LIB = $(prefix)/lib/swig1.3
BIN_DIR = @bindir@
TARGET = swig
SOURCE = Source
SOURCEDIRS = `ls $(SOURCE)`
swig: Modules1.1 Swig Modules Preprocessor LParse DOH
$(CXX) -o $(TARGET) \
$(SOURCE)/Modules/libmodules.a \
$(SOURCE)/Modules1.1/libmodules11.a \
$(SOURCE)/LParse/liblparse.a \
$(SOURCE)/Preprocessor/libcpp.a \
$(SOURCE)/Swig/libswig.a \
$(SOURCE)/DOH/libdoh.a \
$(LIBS)
Modules1.1:
@cd $(SOURCE)/Modules1.1; $(MAKE)
Swig:
@cd $(SOURCE)/Swig; $(MAKE)
Preprocessor:
@cd $(SOURCE)/Preprocessor; $(MAKE)
LParse:
@cd $(SOURCE)/LParse; $(MAKE)
DOH:
@cd $(SOURCE)/DOH; $(MAKE)
Modules:
@cd $(SOURCE)/Modules; $(MAKE)
.PHONY: Modules1.1 Modules Swig Preprocessor LParse DOH
#####################################################################
# Runtime libraries
#####################################################################
runtime:
@cd Runtime; $(MAKE)
#####################################################################
# CHECK
#####################################################################
skip-tcl = [ -z "@TCLINCLUDE@" -o -z "@TCLLIB@" ]
skip-perl = [ -z "@PERL@" -o -z "@PERL5EXT@" ]
skip-python = [ -z "@PYINCLUDE@" -o -z "@PYLIB@" ]
skip-java = [ -z "@JAVA@" -o -z "@JAVAC@" -o -z "@JAVAINC@" ]
skip-guile = [ -z "@GUILEINCLUDE@" -o -z "@GUILELIB@" ]
skip-mzscheme = [ -z "@MZC@" ]
skip-ruby = [ -z "@RUBY@" -o -z "@RUBYINCLUDE@" -o -z "@RUBYLIB@" ]
chk-swiglib = @ROOT_DIR@/Lib
chk = $(MAKE) SWIG_LIB=$(chk-swiglib) check
check-aliveness:
test -x ./swig
./swig -version
./swig -help
$(skip-tcl) || ./swig -tcl -help
$(skip-perl) || ./swig -perl -help
$(skip-python) || ./swig -python -help
$(skip-java) || ./swig -java -help
$(skip-guile) || ./swig -guile -help
$(skip-mzscheme) || ./swig -mzscheme -help
$(skip-ruby) || ./swig -ruby -help
check-examples:
$(skip-tcl) || (cd Examples/tcl/class && $(chk))
$(skip-tcl) || (cd Examples/tcl/constants && $(chk))
$(skip-tcl) || (cd Examples/tcl/pointer && $(chk))
$(skip-tcl) || (cd Examples/tcl/reference && $(chk))
$(skip-tcl) || (cd Examples/tcl/simple && $(chk))
$(skip-tcl) || (cd Examples/tcl/value && $(chk))
$(skip-tcl) || (cd Examples/tcl/variables && $(chk))
$(skip-perl) || (cd Examples/perl5/class && $(chk))
$(skip-perl) || (cd Examples/perl5/constants && $(chk))
$(skip-perl) || (cd Examples/perl5/pointer && $(chk))
$(skip-perl) || (cd Examples/perl5/reference && $(chk))
$(skip-perl) || (cd Examples/perl5/simple && $(chk))
$(skip-perl) || (cd Examples/perl5/value && $(chk))
$(skip-perl) || (cd Examples/perl5/variables && $(chk))
$(skip-python) || (cd Examples/python/class && $(chk))
$(skip-python) || (cd Examples/python/constants && $(chk))
$(skip-python) || (cd Examples/python/pointer && $(chk))
$(skip-python) || (cd Examples/python/reference && $(chk))
$(skip-python) || (cd Examples/python/simple && $(chk))
$(skip-python) || (cd Examples/python/value && $(chk))
$(skip-python) || (cd Examples/python/variables && $(chk))
$(skip-java) || (cd Examples/java/native && $(chk))
$(skip-java) || (cd Examples/java/simple && $(chk))
$(skip-java) || (cd Examples/java/typemap && $(chk))
$(skip-guile) || (cd Examples/guile/matrix && $(chk))
$(skip-guile) || (cd Examples/guile/simple && $(chk))
$(skip-guile) || (cd Examples/guile/port && $(chk))
$(skip-mzscheme) || (cd Examples/mzscheme/simple && $(chk))
$(skip-ruby) || (cd Examples/ruby/class && $(chk))
$(skip-ruby) || (cd Examples/ruby/constants && $(chk))
$(skip-ruby) || (cd Examples/ruby/pointer && $(chk))
$(skip-ruby) || (cd Examples/ruby/reference && $(chk))
$(skip-ruby) || (cd Examples/ruby/simple && $(chk))
$(skip-ruby) || (cd Examples/ruby/value && $(chk))
$(skip-ruby) || (cd Examples/ruby/variables && $(chk))
Examples/GIFPlot/libgifplot.a:
cd Examples/GIFPlot/Lib ; $(MAKE)
check-gifplot-example: Examples/GIFPlot/libgifplot.a
$(skip-perl) || (cd Examples/GIFPlot/Perl/full && $(chk))
$(skip-perl) || (cd Examples/GIFPlot/Perl/simple && $(chk))
$(skip-perl) || (cd Examples/GIFPlot/Perl/shadow && $(chk))
$(skip-python) || (cd Examples/GIFPlot/Python/full && $(chk))
$(skip-python) || (cd Examples/GIFPlot/Python/simple && $(chk))
$(skip-tcl) || (cd Examples/GIFPlot/Tcl/full && $(chk))
$(skip-tcl) || (cd Examples/GIFPlot/Tcl/mandel && $(chk))
$(skip-tcl) || (cd Examples/GIFPlot/Tcl/simple && $(chk))
$(skip-guile) || (cd Examples/GIFPlot/Guile/full && $(chk))
$(skip-guile) || (cd Examples/GIFPlot/Guile/simple && $(chk))
$(skip-ruby) || (cd Examples/GIFPlot/Ruby/full && $(chk))
$(skip-ruby) || (cd Examples/GIFPlot/Ruby/simple && $(chk))
$(skip-ruby) || (cd Examples/GIFPlot/Ruby/shadow && $(chk))
check-c++-examples:
$(skip-python) || (cd Examples/C++/Python && $(chk))
$(skip-java) || (cd Examples/C++/Java && $(chk))
check-xml:
cd Examples/xml && $(chk)
check: check-aliveness \
check-examples check-gifplot-example check-c++-examples \
check-xml
#####################################################################
# CLEAN
#####################################################################
clean:
@for i in $(SOURCEDIRS) ; \
do \
if [ -d $(SOURCE)/$$i -a -f $(SOURCE)/$$i/Makefile ]; then \
(cd $(SOURCE)/$$i; $(MAKE) clean) ; \
fi \
done;
@cd Runtime; $(MAKE) clean
rm -f swig
distclean-dead = config.status config.log config.cache \
@configure_substituted_files@
distclean: clean
rm -f $(distclean-dead)
#####################################################################
# TARGETS: install & friends
#####################################################################
INSTALL = install-sh -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = $(srcdir)/${INSTALL} -m 755
MKINSTDIRS = $(srcdir)/mkinstalldirs
install: install-main install-lib install-runtime
@echo "Installation complete"
install-main:
@echo "Installing $(BIN_DIR)/swig"
@$(MKINSTDIRS) $(BIN_DIR)
@if [ -f swig.exe ]; then \
$(INSTALL_PROGRAM) swig.exe $(BIN_DIR)/swig.exe; \
else \
$(INSTALL_PROGRAM) swig $(BIN_DIR)/swig; \
fi
install-lib:
@echo "Installing the SWIG library"
@$(MKINSTDIRS) $(SWIG_LIB)
# cd $(SWIG_LIB); rm -rf *
# The following line has `*.swg' removed -- add it back if needed.
@cd $(srcdir)/Lib; for i in *.i *.swg; \
do \
echo "Installing Lib/$$i"; \
../$(INSTALL_DATA) $$i $(SWIG_LIB)/$$i; \
done;
@$(MKINSTDIRS) $(SWIG_LIB)/tcl
@cd $(srcdir)/Lib/tcl; for i in *.i *.swg; \
do \
echo "Installing Lib/tcl/$$i"; \
../../$(INSTALL_DATA) $$i $(SWIG_LIB)/tcl/$$i; \
done;
@$(MKINSTDIRS) $(SWIG_LIB)/perl5
@cd $(srcdir)/Lib/perl5; for i in *.i *.swg Makefile.pl; \
do \
echo "Installing Lib/perl5/$$i"; \
../../$(INSTALL_DATA) $$i $(SWIG_LIB)/perl5/$$i; \
done;
@$(MKINSTDIRS) $(SWIG_LIB)/python
@cd $(srcdir)/Lib/python; for i in *.i *.swg; \
do \
echo "Installing Lib/python/$$i"; \
../../$(INSTALL_DATA) $$i $(SWIG_LIB)/python/$$i; \
done;
@$(MKINSTDIRS) $(SWIG_LIB)/guile
@cd $(srcdir)/Lib/guile; for i in *.i *.swg; \
do \
echo "Installing Lib/guile/$$i"; \
../../$(INSTALL_DATA) $$i $(SWIG_LIB)/guile/$$i; \
done;
@$(MKINSTDIRS) $(SWIG_LIB)/java
@cd $(srcdir)/Lib/java; for i in *.i *.swg; \
do \
echo "Installing Lib/java/$$i"; \
../../$(INSTALL_DATA) $$i $(SWIG_LIB)/java/$$i; \
done;
@$(MKINSTDIRS) $(SWIG_LIB)/mzscheme
@cd $(srcdir)/Lib/mzscheme; for i in *.i *.swg; \
do \
echo "Installing Lib/mzscheme/$$i"; \
../../$(INSTALL_DATA) $$i $(SWIG_LIB)/mzscheme/$$i; \
done;
@$(MKINSTDIRS) $(SWIG_LIB)/ruby
@cd $(srcdir)/Lib/ruby; for i in *.i *.swg Makefile.swig extconf.rb; \
do \
echo "Installing Lib/ruby/$$i"; \
../../$(INSTALL_DATA) $$i $(SWIG_LIB)/ruby/$$i; \
done;
install-runtime:
@cd Runtime; $(MAKE) install
############################################################################
# DIST and other maintenance
############################################################################
# distribution directory
dd = @PACKAGE@-@VERSION@
dist:
@echo 'Dave, what do you want to do w/ "make dist"?'
@echo 'See Makefile.in target "dist-suggested" for an idea.'
@echo ' --thi'
false
dist-suggested:
rm -rf $(dd) $(dd).tar.gz
cvs export -d $(dd) -r HEAD SWIG
tar cf - $(dd) | gzip --best > $(dd).tar.gz
rm -rf $(dd)
# Makefile ends here