From 90ed9f91996b031135df4e176dac95c4446f23f3 Mon Sep 17 00:00:00 2001 From: apo Date: Mon, 10 Apr 2006 06:23:44 +0000 Subject: [PATCH] To rollback mistaken integration --- adm_local/unix/make_conclude.in | 113 +++++++++++++++++--------------- 1 file changed, 61 insertions(+), 52 deletions(-) diff --git a/adm_local/unix/make_conclude.in b/adm_local/unix/make_conclude.in index 397d4fa67..c79350747 100644 --- a/adm_local/unix/make_conclude.in +++ b/adm_local/unix/make_conclude.in @@ -48,6 +48,11 @@ LIB_OBJ_F = $(patsubst %.f, %.lo, $(filter %.f, $(LIB_SRC))) # all libtool obj file in library LIB_OBJ = $(LIB_OBJ_CXX) $(LIB_OBJ_CC) $(LIB_OBJ_C) $(LIB_CLIENT_OBJ:%.o=%.lo) $(LIB_SERVER_OBJ:%.o=%.lo) $(LIB_SWIG_OBJ) $(LIB_OBJ_F) +# LIB_BUILD = $(LIB:%.la=$(top_builddir)/lib/salome/%.la) +LIB_BUILD = $(patsubst %.la, $(top_builddir)/lib/salome/%.la, $(filter %.la, $(LIB))) +LIB_BUILD_A = $(patsubst %.a, $(top_builddir)/lib/salome/%.a, $(filter %.a, $(LIB))) +LIB_BUILD_SO = $(patsubst %.so, $(top_builddir)/lib/salome/%.so, $(filter %.so, $(LIB))) + ifneq ($(findstring cmodule.la,$(filter %.la, $(LIB))),) ifneq ($(GUI_DISABLE_CORBA),yes) LIB_SWIG = $(patsubst %cmodule.la,%.so, $(filter %.la, $(LIB))) @@ -58,14 +63,33 @@ else LIB_SWIG = endif -lib: $(LIB) $(LIB_CLIENT_PY) +lib: $(LIB_BUILD) $(LIB_BUILD_SO) $(LIB_CLIENT_PY) +# we don't build static library ! + +$(LIB_BUILD): $(top_builddir)/lib/salome/%.la: %.la + -$(RM) $@ + -$(RM) $(patsubst %.la, %.so, $@) + -$(RM) $(patsubst %.la, %.a, $@) + ln -sf $(CURDIR)/$< $@ || true + ln -sf $(patsubst %.la, %.so, $(CURDIR)/.libs/$<) \ + $(patsubst %.la, %.so, $@) || true + ln -sf $(patsubst %.la, %.so, $(CURDIR)/.libs/$<).0 \ + $(patsubst %.la, %.so, $@).0 || true + + if ! test -z $(LIB_SWIG) ; then \ + ln -sf $(patsubst %.la,%.so, $(CURDIR)/.libs/$<) $(top_builddir)/lib/salome/_$(LIB_SWIG) || true;\ + fi; + +$(LIB_BUILD_A): $(top_builddir)/lib/salome/%.a: %.a + -$(RM) $@ + ln -sf $(CURDIR)/$< $@ || true -LIB_BUILDDIR=$(shell cd $(CURDIR)/$(top_builddir); pwd)/lib/salome +$(LIB_BUILD_SO): $(top_builddir)/lib/salome/%.so: %.so + -$(RM) $@ + ln -sf $(CURDIR)/$< $@ || true $(LIB): $(LIB_OBJ) - $(LT) --mode=uninstall $(RM) $(LIB_BUILDDIR)/$@ - $(LT) --mode=link $(CXX) -shared -rpath $(LIB_BUILDDIR) -o $@ $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS) - $(LT_INSTALL_LIB) $@ $(LIB_BUILDDIR)/$@ + @$(LT) --mode=link $(CXX) -shared -rpath $(libdir) -o $@ $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS) # transform idl reference in appropriate obj file ifneq ($(GUI_DISABLE_CORBA),yes) @@ -87,23 +111,23 @@ BIN_CLIENT_OBJ = BIN_SERVER_OBJ = endif # transform c file in appropriate libtool obj file (.c) -BIN_OBJ_C = $(patsubst %.c, %.lo, $(filter %.c, $(BIN_SRC))) +BIN_OBJ_C = $(patsubst %.c, %.o, $(filter %.c, $(BIN_SRC))) # transform c++ file in appropriate libtool obj file (.cc and .cxx) -BIN_OBJ_CC = $(patsubst %.cc, %.lo, $(filter %.cc, $(BIN_SRC))) -BIN_OBJ_CXX = $(patsubst %.cxx, %.lo, $(filter %.cxx, $(BIN_SRC))) +BIN_OBJ_CC = $(patsubst %.cc, %.o, $(filter %.cc, $(BIN_SRC))) +BIN_OBJ_CXX = $(patsubst %.cxx, %.o, $(filter %.cxx, $(BIN_SRC))) # all obj file in bin target BIN_OBJ = $(BIN_OBJ_CC) $(BIN_OBJ_CXX) $(BIN_OBJ_C) $(BIN_CLIENT_OBJ) $(BIN_SERVER_OBJ) -bin: $(BIN) pyscripts sharedpyscripts +bin: $(BIN:%=$(top_builddir)/bin/salome/%) $(BIN) $(LIB) pyscripts sharedpyscripts BIN_LIB=$(LIB:lib%.la=-l%) -BIN_BUILDDIR=$(shell cd $(CURDIR)/$(top_builddir); pwd)/bin/salome +$(BIN:%=$(top_builddir)/bin/salome/%) $(TEST_PROGS:%=$(top_builddir)/bin/salome/%): $(top_builddir)/bin/salome/%: % + -$(RM) $@ + ln -sf $(CURDIR)/$< $@ -$(BIN) $(TEST_PROGS): %: %.lo $(BIN_OBJ) $(LIB) - $(LT) --mode=uninstall $(RM) $(BIN_BUILDDIR)/$@ - $(LT) --mode=link $(CXX) -rpath $(BIN_BUILDDIR) -o $@ $^ $(CXXFLAGS) $(CPPFLAGS) $(BIN_LIB) $(LDFLAGSFORBIN) $(LIBSFORBIN) - $(LT_INSTALL_PROG) $@ $(BIN_BUILDDIR)/$@ +$(BIN) $(TEST_PROGS): %: %.lo $(BIN_OBJ) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(BIN_LIB) $(LDFLAGSFORBIN) $(LIBSFORBIN) # copy python scripts in $(top_builddir)/bin/salome # @@ -179,39 +203,30 @@ $(libdir) $(includedir) $(bindir) $(datadir) $(idldir) $(sharedpydir): # Install the library, the public header files, and programs. install: $(LIB) $(BIN) $(TEST_PROGS) $(libdir) $(includedir) $(bindir) $(datadir) $(idldir) install-python install-sharedpyqt install-qm install-res - @for f in X $(LIB); do \ - if test $$f != X; then \ - echo "($(LT) --mode=link $(CXX) -shared -rpath '$(libdir)' -o '$$f' $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS) || exit 1)"; \ - ($(LT) --mode=link $(CXX) -shared -rpath "$(libdir)" -o "$$f" $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS) || exit 1); \ - echo "($(LT_INSTALL_LIB) '$$f' '$(libdir)/$$f' || exit 1)"; \ - ($(LT_INSTALL_LIB) "$$f" "$(libdir)/$$f" || exit 1); \ - fi; \ + @for f in X $(LIB); do \ + if test $$f != X; then \ + ($(LT_INSTALL_LIB) $$f $(libdir)/. || exit 1); \ + fi; \ done - @if ! test -z $(LIB_SWIG) ; then \ + @if ! test -z $(LIB_SWIG) ; then \ (cd $(libdir); ln -sf $(patsubst %.so, %cmodule.so, $(LIB_SWIG)) _$(LIB_SWIG) || true); \ fi; - @for f in X $(BIN); do \ - if test $$f != X; then \ - echo "($(LT) --mode=link $(CXX) -shared -rpath '$(bindir)' -o '$$f' $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS) || exit 1)"; \ - ($(LT) --mode=link $(CXX) -shared -rpath "$(bindir)" -o "$$f" $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS) || exit 1); \ - echo "($(LT_INSTALL_PROG) '$$f' '$(bindir)/$$f' || exit 1)"; \ - ($(LT_INSTALL_PROG) "$$f" "$(bindir)/$$f" || exit 1); \ - fi; \ + @for f in X $(BIN); do \ + if test $$f != X; then \ + ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1); \ + fi; \ done - # Install tests programmes in bindir - @for f in X $(TEST_PROGS); do \ - if test $$f != X; then \ - echo "($(LT) --mode=link $(CXX) -shared -rpath '$(bindir)' -o '$$f' $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS) || exit 1)"; \ - ($(LT) --mode=link $(CXX) -shared -rpath "$(bindir)" -o "$$f" $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS) || exit 1); \ - echo "($(LT_INSTALL_PROG) '$$f' '$(bindir)/$$f' || exit 1)"; \ - ($(LT_INSTALL_PROG) "$$f" "$(bindir)/$$f" || exit 1); \ - fi; \ +# Install tests programmes in bindir + @for f in X $(TEST_PROGS); do \ + if test $$f != X; then \ + ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1); \ + fi; \ done - # Install exported includes in includedir - @for f in X $(EXPORT_HEADERS:%=$(srcdir)/%); do \ - if test $$f != X; then \ - (cp -p -f $$f $(includedir) || exit 1); \ - fi; \ +# Install exported includes in includedir + @for f in X $(EXPORT_HEADERS:%=$(srcdir)/%); do \ + if test $$f != X; then \ + (cp -p -f $$f $(includedir) || exit 1); \ + fi; \ done # Install python script in $(bindir) @@ -361,31 +376,25 @@ distclean: clean $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< .cc.lo: - $(LT) --mode=compile --tag=CXX $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< + $(LT) --mode=compile $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< .cxx.o: $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< .cxx.lo: - $(LT) --mode=compile --tag=CXX $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< + $(LT) --mode=compile $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< .c.o: $(CC) $(CFLAGS) $(CPPFLAGS) -c $< .c.lo: - $(LT) --mode=compile --tag=CC $(CFLAGS) $(CPPFLAGS) -c $< + $(LT_COMPILE) $(CFLAGS) $(CPPFLAGS) -c $< .f.o: $(FC) $(FFLAGS) -c $< -o $@ .f.lo: - $(LT) --mode=compile --tag=F77 $(FC) $(FFLAGS) -c $< - -.f90.o: - $(FC) $(FFLAGS) -c $< -o $@ - -.f90.lo: - $(LT) --mode=compile --tag=F90 $(FC) $(FFLAGS) -c $< + $(LT) --mode=compile $(FC) $(FFLAGS) -c $< .ui.h: $(UIC) -o $@ $< -- 2.39.2