Single makefile for building SWIG executable
Automake used to build SWIG executable Tidied up make install Bug fixes in installation when using ./configure --with-release-suffix and autoconf's EXEEXT. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4219 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c2f148c725
commit
b88a7bfa05
1 changed files with 28 additions and 59 deletions
87
Makefile.in
87
Makefile.in
|
|
@ -12,49 +12,20 @@ libdir = @libdir@
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
CC = @CC@
|
|
||||||
CFLAGS = @CFLAGS@
|
|
||||||
CXX = @CXX@
|
|
||||||
LIBS = @LIBS@
|
|
||||||
SWIGLIBS = @SWIGLIBS@
|
|
||||||
AR = @AR@
|
|
||||||
RANLIB = @RANLIB@
|
|
||||||
|
|
||||||
# Note: Files in `SWIG_LIB' are machine independent so we use `prefix'
|
|
||||||
# instead of `exec_prefix' or, derivatively, `libdir'.
|
|
||||||
SWIG_LIB = @swig_lib@
|
SWIG_LIB = @swig_lib@
|
||||||
BIN_DIR = @bindir@
|
BIN_DIR = @bindir@
|
||||||
TARGET = swig@release_suffix@
|
TARGET = swig@release_suffix@@EXEEXT@
|
||||||
SOURCE = Source
|
SOURCE = Source
|
||||||
SOURCEDIRS = `ls $(SOURCE)`
|
|
||||||
|
|
||||||
swig: Modules Swig Preprocessor CParse DOH runtime swig.spec
|
swig: source runtime swig.spec
|
||||||
$(CXX) -o $(TARGET) \
|
|
||||||
$(SOURCE)/Modules/libmodules.a \
|
|
||||||
$(SOURCE)/CParse/libcparse.a \
|
|
||||||
$(SOURCE)/Preprocessor/libcpp.a \
|
|
||||||
$(SOURCE)/Swig/libswig.a \
|
|
||||||
$(SOURCE)/DOH/libdoh.a @SWIGLIBS@
|
|
||||||
|
|
||||||
Modules: Source/Include/swigconfig.h
|
source:
|
||||||
@cd $(SOURCE)/Modules; $(MAKE)
|
@cd $(SOURCE); $(MAKE)
|
||||||
|
|
||||||
Swig: Source/Include/swigconfig.h
|
|
||||||
@cd $(SOURCE)/Swig; $(MAKE)
|
|
||||||
|
|
||||||
Preprocessor: Source/Include/swigconfig.h
|
|
||||||
@cd $(SOURCE)/Preprocessor; $(MAKE)
|
|
||||||
|
|
||||||
CParse: Source/Include/swigconfig.h
|
|
||||||
@cd $(SOURCE)/CParse; $(MAKE)
|
|
||||||
|
|
||||||
swig.spec: swig.spec.in config.status
|
swig.spec: swig.spec.in config.status
|
||||||
@CONFIG_HEADERS= CONFIG_LINKS= CONFIG_FILES=swig.spec $(SHELL) ./config.status
|
@CONFIG_HEADERS= CONFIG_LINKS= CONFIG_FILES=swig.spec $(SHELL) ./config.status
|
||||||
|
|
||||||
DOH: Source/Include/swigconfig.h
|
.PHONY: source runtime
|
||||||
@cd $(SOURCE)/DOH; $(MAKE)
|
|
||||||
|
|
||||||
.PHONY: SWIG1.1 Modules Swig Preprocessor DOH runtime
|
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# All the languages SWIG speaks (when it wants to)
|
# All the languages SWIG speaks (when it wants to)
|
||||||
|
|
@ -211,22 +182,25 @@ check: check-aliveness check-examples check-gifplot check-test-suite
|
||||||
|
|
||||||
clean: clean-objects clean-examples clean-gifplot clean-test-suite
|
clean: clean-objects clean-examples clean-gifplot clean-test-suite
|
||||||
|
|
||||||
clean-objects:
|
clean-objects: clean-source clean-runtime
|
||||||
@for i in $(SOURCEDIRS) ; \
|
|
||||||
do \
|
clean-source:
|
||||||
echo cleaning $(SOURCE)/$$i; \
|
@echo cleaning Source
|
||||||
if [ -d $(SOURCE)/$$i -a -f $(SOURCE)/$$i/Makefile ]; then \
|
@cd $(SOURCE); $(MAKE) -s clean
|
||||||
(cd $(SOURCE)/$$i; $(MAKE) -s clean) ; \
|
|
||||||
fi \
|
|
||||||
done;
|
|
||||||
@echo cleaning Runtime
|
|
||||||
@cd Runtime; $(MAKE) -s clean
|
|
||||||
@rm -f $(TARGET)
|
@rm -f $(TARGET)
|
||||||
|
|
||||||
distclean-dead = config.status config.log config.cache swig.spec \
|
distclean-source:
|
||||||
@configure_substituted_files@
|
@echo dist cleaning Source
|
||||||
|
@cd $(SOURCE); $(MAKE) -s distclean
|
||||||
|
@rm -f $(TARGET)
|
||||||
|
|
||||||
distclean: clean
|
clean-runtime:
|
||||||
|
@echo cleaning Runtime
|
||||||
|
@cd Runtime; $(MAKE) -s clean
|
||||||
|
|
||||||
|
distclean-dead = config.status config.log config.cache swig.spec Makefile mkmf.log
|
||||||
|
|
||||||
|
distclean: distclean-source clean-runtime clean-examples clean-gifplot clean-test-suite
|
||||||
rm -f $(distclean-dead)
|
rm -f $(distclean-dead)
|
||||||
|
|
||||||
clean-examples:
|
clean-examples:
|
||||||
|
|
@ -262,20 +236,19 @@ install: install-main install-lib install-runtime
|
||||||
@echo "Installation complete"
|
@echo "Installation complete"
|
||||||
|
|
||||||
install-main:
|
install-main:
|
||||||
@echo "Installing $(BIN_DIR)/swig"
|
@echo "Installing SWIG executable"
|
||||||
@$(MKINSTDIRS) $(DESTDIR)$(BIN_DIR)
|
@$(MKINSTDIRS) $(DESTDIR)$(BIN_DIR)
|
||||||
@if [ -f swig.exe ]; then swig=swig.exe; else swig=$(TARGET); fi; \
|
@echo "Installing $(BIN_DIR)/$(TARGET)"
|
||||||
$(INSTALL_PROGRAM) $$swig $(DESTDIR)$(BIN_DIR)/$$swig
|
@$(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(BIN_DIR)/$(TARGET)
|
||||||
|
|
||||||
lib-languages = tcl perl5 python guile java mzscheme ruby php4 ocaml pike
|
lib-languages = tcl perl5 python guile java mzscheme ruby php4 ocaml pike
|
||||||
|
|
||||||
install-lib:
|
install-lib:
|
||||||
@echo "Installing the SWIG library"
|
@echo "Installing the SWIG library"
|
||||||
@$(MKINSTDIRS) $(DESTDIR)$(SWIG_LIB)
|
@$(MKINSTDIRS) $(DESTDIR)$(SWIG_LIB)
|
||||||
# cd $(SWIG_LIB); rm -rf *
|
|
||||||
@cd $(srcdir)/Lib; for i in *.i *.swg; \
|
@cd $(srcdir)/Lib; for i in *.i *.swg; \
|
||||||
do \
|
do \
|
||||||
echo "Installing Lib/$$i"; \
|
echo "Installing $(DESTDIR)$(SWIG_LIB)/$$i"; \
|
||||||
../$(INSTALL_DATA) $$i $(DESTDIR)$(SWIG_LIB)/$$i; \
|
../$(INSTALL_DATA) $$i $(DESTDIR)$(SWIG_LIB)/$$i; \
|
||||||
done;
|
done;
|
||||||
@for lang in $(lib-languages); \
|
@for lang in $(lib-languages); \
|
||||||
|
|
@ -293,7 +266,7 @@ install-lib:
|
||||||
echo "Installing nothing from Lib/$$lang"; \
|
echo "Installing nothing from Lib/$$lang"; \
|
||||||
else for file in $$doti $$dotswg $$extra; \
|
else for file in $$doti $$dotswg $$extra; \
|
||||||
do \
|
do \
|
||||||
echo "Installing Lib/$$lang/$$file"; \
|
echo "Installing $$dst/$$file"; \
|
||||||
../../$(INSTALL_DATA) $$file $$dst/$$file; \
|
../../$(INSTALL_DATA) $$file $$dst/$$file; \
|
||||||
done; \
|
done; \
|
||||||
fi ); \
|
fi ); \
|
||||||
|
|
@ -312,12 +285,8 @@ uninstall: uninstall-main uninstall-lib uninstall-runtime
|
||||||
@echo "Uninstall complete"
|
@echo "Uninstall complete"
|
||||||
|
|
||||||
uninstall-main:
|
uninstall-main:
|
||||||
@echo "Uninstalling $(BIN_DIR)/swig"
|
@echo "Uninstalling $(BIN_DIR)/$(TARGET)"
|
||||||
@if [ -f swig.exe ]; then \
|
rm -f $(DESTDIR)$(BIN_DIR)/$(TARGET);
|
||||||
rm -f $(DESTDIR)$(BIN_DIR)/swig.exe; \
|
|
||||||
else \
|
|
||||||
rm -f $(DESTDIR)$(BIN_DIR)/$(TARGET); \
|
|
||||||
fi
|
|
||||||
|
|
||||||
uninstall-lib:
|
uninstall-lib:
|
||||||
@echo "Uninstalling the SWIG library"
|
@echo "Uninstalling the SWIG library"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue