From: vsr Date: Tue, 16 Sep 2008 07:14:13 +0000 (+0000) Subject: Implement 'make dist' and 'make distcheck' steps support X-Git-Tag: V5_1_0_for_TC1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6066769d7755d27fb1b966e92fbc1672a98086df;p=plugins%2Fblsurfplugin.git Implement 'make dist' and 'make distcheck' steps support --- diff --git a/Makefile.am b/Makefile.am index 3e45b52..e3e7bb0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -25,6 +25,21 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am +if BLSURFPLUGIN_ENABLE_GUI + ACLOCAL_AMFLAGS = -I adm_local/unix/config_files \ + -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \ + -I ${GUI_ROOT_DIR}/adm_local/unix/config_files \ + -I ${MED_ROOT_DIR}/adm_local/unix/config_files \ + -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \ + -I ${SMESH_ROOT_DIR}/adm_local/unix/config_files +else !BLSURFPLUGIN_ENABLE_GUI + ACLOCAL_AMFLAGS = -I adm_local/unix/config_files \ + -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \ + -I ${MED_ROOT_DIR}/adm_local/unix/config_files \ + -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \ + -I ${SMESH_ROOT_DIR}/adm_local/unix/config_files +endif + SUBDIRS = idl adm_local resources src bin DIST_SUBDIRS = idl adm_local resources src bin @@ -36,3 +51,6 @@ salomeinclude_DATA = BLSURFPLUGIN_version.h EXTRA_DIST += \ build_configure \ clean_configure + +dist-hook: + rm -rf `find $(distdir) -name CVS` diff --git a/adm_local/unix/make_common_starter.am b/adm_local/unix/make_common_starter.am index 5373119..f58316f 100644 --- a/adm_local/unix/make_common_starter.am +++ b/adm_local/unix/make_common_starter.am @@ -31,43 +31,58 @@ # # Standard directory for installation -salomeincludedir = $(includedir)/@PACKAGE@ -libdir = $(prefix)/lib@LIB_LOCATION_SUFFIX@/@PACKAGE@ -bindir = $(prefix)/bin/@PACKAGE@ +salomeincludedir = $(includedir)/salome +libdir = $(prefix)/lib@LIB_LOCATION_SUFFIX@/salome +bindir = $(prefix)/bin/salome salomescriptdir = $(bindir) +salomepythondir = $(pythondir)/salome +salomepyexecdir = $(pyexecdir)/salome # Directory for installing idl files -salomeidldir = $(prefix)/idl/@PACKAGE@ +salomeidldir = $(prefix)/idl/salome # Directory for installing resource files -salomeresdir = $(prefix)/share/@PACKAGE@/resources/@MODULE_NAME@ +salomeresdir = $(prefix)/share/salome/resources/@MODULE_NAME@ # Directories for installing admin files -admlocaldir = $(prefix)/adm_local -admlocalunixdir = $(admlocaldir)/unix -admlocalm4dir = $(admlocaldir)/unix/config_files +admlocaldir = $(prefix)/adm_local +admlocalunixdir = $(admlocaldir)/unix +admlocalm4dir = $(admlocaldir)/unix/config_files # Shared modules installation directory -sharedpkgpythondir =$(pkgpythondir)/shared_modules +sharedpkgpythondir = $(salomepythondir)/shared_modules # Documentation directory -docdir = $(datadir)/doc/@PACKAGE@ +docdir = $(datadir)/doc/salome # common rules -# moc-files generation +# meta object implementation files generation (moc) %_moc.cxx: %.h $(MOC) $< -o $@ -# qm-files generation +# translation (*.qm) files generation (lrelease) %.qm: %.ts $(LRELEASE) $< -qm $@ -EXTRA_DIST=$(MOC_FILES:%_moc.cxx=%.h) $(nodist_salomeres_DATA:%.qm=%.ts) +# resource files generation (qrcc) +qrc_%.cxx: %.qrc + $(QRCC) $< -o $@ -name $(*F) +# qt forms files generation (uic) +ui_%.h: %.ui + $(UIC) -o $@ $< + +# extra distributed files +EXTRA_DIST = $(MOC_FILES:%_moc.cxx=%.h) $(QRC_FILES:qrc_%.cxx=%.qrc) \ + $(UIC_FILES:ui_%.h=%.ui) $(nodist_salomeres_DATA:%.qm=%.ts) + +# customize clean operation mostlyclean-local: rm -f @builddir@/*_moc.cxx rm -f @builddir@/*.qm + rm -f @builddir@/ui_*.h + rm -f @builddir@/qrc_*.cxx # tests tests: unittest diff --git a/bin/Makefile.am b/bin/Makefile.am index 16ef43e..17a9756 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -25,6 +25,8 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am +# non-distributed files nodist_salomescript_DATA = VERSION -EXTRA_DIST += VERSION.in +# distributed files +dist_salomescript_SCRIPTS = diff --git a/configure.ac b/configure.ac index aa5efbf..b9dd101 100644 --- a/configure.ac +++ b/configure.ac @@ -25,7 +25,7 @@ # # --- -AC_INIT([Salome2 Project BLSURFPLUGIN module], [5.0.0], [webmaster.salome@opencascade.com], [salome]) +AC_INIT([Salome2 Project BLSURFPLUGIN module], [5.0.0], [webmaster.salome@opencascade.com], [SalomeBLSURFPLUGIN]) AC_CONFIG_AUX_DIR(salome_adm/unix/config_files) AC_CANONICAL_HOST AC_CANONICAL_TARGET diff --git a/idl/Makefile.am b/idl/Makefile.am index 54b7b25..c245652 100644 --- a/idl/Makefile.am +++ b/idl/Makefile.am @@ -34,21 +34,19 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am BASEIDL_FILES = BLSURFPlugin_Algorithm.idl -EXTRA_DIST+= $(BASEIDL_FILES) - # This variable defines the files to be installed -salomeidl_DATA = $(BASEIDL_FILES) +dist_salomeidl_DATA = $(BASEIDL_FILES) # GUI idl common library lib_LTLIBRARIES = libSalomeIDLBLSURFPLUGIN.la # Sources built from idl files -nodist_libSalomeIDLBLSURFPLUGIN_la_SOURCES= BLSURFPlugin_AlgorithmSK.cc +nodist_libSalomeIDLBLSURFPLUGIN_la_SOURCES = BLSURFPlugin_AlgorithmSK.cc # header files must be exported: other modules have to use this library -nodist_salomeinclude_HEADERS= $(BASEIDL_FILES:%.idl=%.hh) +nodist_salomeinclude_HEADERS = $(BASEIDL_FILES:%.idl=%.hh) -libSalomeIDLBLSURFPLUGIN_la_CPPFLAGS =\ +libSalomeIDLBLSURFPLUGIN_la_CPPFLAGS = \ $(KERNEL_CXXFLAGS) \ $(GEOM_CXXFLAGS) \ $(SMESH_CXXFLAGS) \ @@ -57,7 +55,6 @@ libSalomeIDLBLSURFPLUGIN_la_CPPFLAGS =\ -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl - libSalomeIDLBLSURFPLUGIN_la_LDFLAGS = -no-undefined -version-info=0:0:0 libSalomeIDLBLSURFPLUGIN_la_LIBADD = \ $(KERNEL_LDFLAGS) -lSalomeIDLKernel \ @@ -96,14 +93,14 @@ SUFFIXES = .idl .hh SK.cc $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $< install-exec-local: $(BASEIDL_FILES:%=$(top_srcdir)/idl/%) - $(INSTALL) -d $(pkgpythondir) + $(INSTALL) -d $(DESTDIR)$(salomepythondir) ls $^ | while read file; do \ - $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(pkgpythondir) $$file ; \ + $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \ done # uninstall-local removes too much, but it works in distcheck uninstall-local: - rm -rf $(pkgpythondir)/* + rm -rf $(DESTDIR)$(salomepythondir)/* mostlyclean-local: -rm -f *.hh *.cc .depidl diff --git a/src/Makefile.am b/src/Makefile.am index 065949f..caf16c8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -30,3 +30,5 @@ SUBDIRS = BLSURFPlugin if BLSURFPLUGIN_ENABLE_GUI SUBDIRS += GUI endif + +DIST_SUBDIRS = BLSURFPlugin GUI \ No newline at end of file