# source path
top_srcdir=@top_srcdir@
-top_builddir=..
+top_builddir=.
srcdir=@srcdir@
-VPATH=.:@srcdir@:@srcdir@/resources:@srcdir@/idl
+VPATH=.:@srcdir@:@top_srcdir@/resources:@top_srcdir@/idl
@COMMENCE@
-SUBDIRS = src
+SUBDIRS = idl src
MODULE = MED
Structure.png \
ModuleMed.png
+# copy header files in common directory
+ifeq ($(HAVE_SSTREAM),yes)
+ include_list=include/salome/SALOMEconfig.h
+else
+ include_list=include/salome/SALOMEconfig.h include/salome/sstream
+endif
+
+inc: idl $(include_list)
+
+include/salome/SALOMEconfig.h: salome_adm/unix/SALOMEconfig.h
+ -$(RM) $@
+ $(LN_S) ../$< $@
+
+include/salome/sstream: salome_adm/unix/sstream
+ -$(RM) $@
+ $(LN_S) ../$< $@
+
+depend: depend_idl
+
+depend_idl:
+ (cd idl ; $(MAKE) $@) || exit 1
+
+# doc is already build : if you want to had documents, go manually to doc and run 'make doc'
+#doc:
+# (cd doc && $(MAKE) $@) || exit 1
+
+install-end:
+# finish libtool install
+# @$(LT) --mode=finish $(libdir)
+
+install-include: $(include_list)
+ $(INSTALL) -d $(includedir)
+ @for f in X $(include_list); do \
+ if test $$f != X; then \
+ ($(INSTALL_DATA) $$f $(includedir)/. || exit 1); \
+ fi; \
+ done
+
+# install script in $(bindir) :
+install-bin: $(BIN_SCRIPT)
+ $(INSTALL) -d $(bindir)
+ $(INSTALL_PROGRAM) $^ $(bindir)
+
+uninstall: uninstall-idl
+
+uninstall-idl:
+ $(RM) $(idldir)/*.idl
+
+distclean: distclean-other
+
+distclean-other:
+ -$(RM) salome_adm/unix/*~ salome_adm/unix/*% salome_adm/unix/*.bak salome_adm/unix/*.new salome_adm/unix/*.old
+ -$(RM) salome_adm/unix/make_*
+ -$(RM) salome_adm/unix/depend salome_adm/unix/SALOMEconfig.h
+ -$(RM) config.cache config.log config.status
+
@MODULE@
+
+install: install-bin install-include install-end
fi
chmod u-w configure.in.base
+# make a link allowing AC_OUTPUT to find the salome_adm/.../*.in files
+echo "" >> configure.in_tmp1
+echo 'ln -fs ${KERNEL_ROOT_DIR}/salome_adm ${ROOT_SRCDIR}/salome_adm' >> configure.in_tmp1
echo "" >> configure.in_tmp1
echo "AC_OUTPUT([ \\" >> configure.in_tmp1
# put them "manually"
#
-echo " ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h \\" >> configure.in_tmp1
-echo " ${KERNEL_ROOT_DIR}/salome_adm/unix/F77config.h \\" >> configure.in_tmp1
-echo " ${KERNEL_ROOT_DIR}/salome_adm/unix/sstream \\" >> configure.in_tmp1
-echo " ${KERNEL_ROOT_DIR}/salome_adm/unix/depend \\" >> configure.in_tmp1
-echo " ${KERNEL_ROOT_DIR}/salome_adm/unix/make_omniorb \\" >> configure.in_tmp1
-echo " ${KERNEL_ROOT_DIR}/salome_adm/unix/envScript \\" >> configure.in_tmp1
-echo " ${KERNEL_ROOT_DIR}/salome_adm/unix/make_commence \\" >> configure.in_tmp1
-echo " ${KERNEL_ROOT_DIR}/salome_adm/unix/make_conclude \\" >> configure.in_tmp1
-echo " ${KERNEL_ROOT_DIR}/salome_adm/unix/make_module \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/SALOMEconfig.h \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/F77config.h \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/sstream \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/depend \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/make_omniorb \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/envScript \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/make_commence \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/make_conclude \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/make_module \\" >> configure.in_tmp1
\rm -f configure.in_tmp2 configure.in_tmp3
touch configure.in_tmp2
sed 's/.in / /' configure.in_tmp2 >> configure.in_tmp1
echo "])" >> configure.in_tmp1
+
+# delete the link created for AC_OUTPUT
+echo "" >> configure.in_tmp1
+echo 'rm -f ${ROOT_SRCDIR}/salome_adm' >> configure.in_tmp1
\mv configure.in_tmp1 configure.in_new
\rm -f configure.in_tmp2 configure.in_tmp3
# Created from configure.in.base
#
-AC_INIT(SALOME)
-AC_CONFIG_AUX_DIR(adm/unix/config_files)
+AC_INIT(src)
+AC_CONFIG_AUX_DIR(${KERNEL_ROOT_DIR}/salome_adm/unix/config_files)
AC_CANONICAL_HOST
PACKAGE=salome
dnl full-path to the binary instead.
case "$INSTALL" in
*install-sh*)
- INSTALL='\${top_srcdir}'/adm/unix/config_files/install-sh
+ INSTALL='\${KERNEL_ROOT_DIR}'/salome_adm/unix/config_files/install-sh
;;
esac
AC_SUBST_FILE(CORBA)
corba=make_$ORB
-CORBA=adm/unix/$corba
+CORBA=${KERNEL_ROOT_DIR}/salome_adm/unix/$corba
echo
echo ---------------------------------------------
dnl generals files which could be included in every makefile
-AC_SUBST_FILE(COMMENCE) COMMENCE=adm/unix/make_commence
-AC_SUBST_FILE(CONCLUDE) CONCLUDE=adm/unix/make_conclude
-AC_SUBST_FILE(MODULE) MODULE=adm/unix/make_module
+AC_SUBST_FILE(COMMENCE) COMMENCE=${KERNEL_ROOT_DIR}/salome_adm/unix/make_commence
+AC_SUBST_FILE(CONCLUDE) CONCLUDE=${KERNEL_ROOT_DIR}/salome_adm/unix/make_conclude
+AC_SUBST_FILE(MODULE) MODULE=${KERNEL_ROOT_DIR}/salome_adm/unix/make_module
dnl les dependences
-AC_SUBST_FILE(DEPEND) DEPEND=adm/unix/depend
+AC_SUBST_FILE(DEPEND) DEPEND=${KERNEL_ROOT_DIR}/salome_adm/unix/depend
dnl We don t need to say when we re entering directories if we re using
dnl GNU make becuase make does it for us.
fi
# make other build directories
-for rep in adm bin include lib share/salome/resources share/salome/idl
+for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources share/salome/doc idl
do
# if test ! -d $rep ; then
# eval mkdir $rep
done
cd $ROOT_BUILDDIR
-AC_SUBST_FILE(ENVSCRIPT) ENVSCRIPT=adm/unix/envScript
+AC_SUBST_FILE(ENVSCRIPT) ENVSCRIPT=${KERNEL_ROOT_DIR}/salome_adm/unix/envScript
dnl copy xml files to the build tree (lib directory)
dnl pourquoi ????
#done
#cd $ROOT_BUILDDIR
+
echo
echo ---------------------------------------------
echo generating Makefiles and configure files