Salome HOME
Fix problem of make distcheck on automake 1.11 (Mandriva 2010):
authorvsr <vsr@opencascade.com>
Wed, 18 Apr 2012 12:44:32 +0000 (12:44 +0000)
committervsr <vsr@opencascade.com>
Wed, 18 Apr 2012 12:44:32 +0000 (12:44 +0000)
- we have to uninstall only the staff generated for idl files and nothing more

idl/Makefile.am
src/Tools/padder/meshjob/idl/Makefile.am

index 766ffa0bb6d08ac1fb765cc0b8a12b3933aa4fc7..c43e554d320152261567f789ab048e7e5656cad0 100644 (file)
@@ -35,6 +35,8 @@ BASEIDL_FILES = \
        SMESH_MeshEditor.idl \
        SMESH_Measurements.idl
 
+BASEIDL_FILES_PY=$(BASEIDL_FILES:%.idl=%_idl.py)
+
 # This variable defines the files to be installed
 dist_salomeidl_DATA = $(BASEIDL_FILES)
 
@@ -108,9 +110,15 @@ install-exec-local: $(BASEIDL_FILES:%=$(top_srcdir)/idl/%)
          $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \
        done
 
-# uninstall-local removes too much, but it works in distcheck
+# we want to remove only staff generated for IDL files and nothing more
 uninstall-local:
-       rm -rf $(DESTDIR)$(salomepythondir)/*
+       @for modulen in SMESH StdMeshers ; do \
+         test -d $(DESTDIR)$(salomepythondir)/$${modulen} && echo "Removing $(DESTDIR)$(salomepythondir)/$${modulen}" && rm -rf $(DESTDIR)$(salomepythondir)/$${modulen} ; \
+         test -d $(DESTDIR)$(salomepythondir)/$${modulen}__POA && echo "Removing $(DESTDIR)$(salomepythondir)/$${modulen}__POA" && rm -rf $(DESTDIR)$(salomepythondir)/$${modulen}__POA ; \
+       done ; \
+       for filen in $(BASEIDL_FILES_PY) ; do \
+         echo "Removing $(DESTDIR)$(salomepythondir)/$${filen}" && rm -f $(DESTDIR)$(salomepythondir)/$${filen}* ; \
+       done
 
 mostlyclean-local:
        -rm -f *.hh *.cc .depidl
index 74fc03b4364c37b0ecdc874f2851cdb05e77c674..15bb1a87cb84740c1241f2bbd96c0a87d04a43b6 100644 (file)
@@ -31,6 +31,8 @@ IDL_FILES = MESHJOB.idl
 BUILT_SOURCES += SPADDERPluginTestSK.cc
 IDL_FILES += SPADDERPluginTest.idl
 
+IDL_FILES_PY=$(IDL_FILES:%.idl=%_idl.py)
+
 salomeidl_DATA = $(IDL_FILES) 
 
 lib_LTLIBRARIES = libSalomeIDLSPADDER.la
@@ -81,6 +83,13 @@ install-data-local: $(IDL_FILES)
        $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \
        done
 
+# we want to remove only staff generated for IDL files and nothing more
 uninstall-local:
-       rm -rf $(DESTDIR)$(salomepythondir)/*
+       @for modulen in MESHJOB SPADDERPluginTest  ; do \
+         test -d $(DESTDIR)$(salomepythondir)/$${modulen} && echo "Removing $(DESTDIR)$(salomepythondir)/$${modulen}" && rm -rf $(DESTDIR)$(salomepythondir)/$${modulen} ; \
+         test -d $(DESTDIR)$(salomepythondir)/$${modulen}__POA && echo "Removing $(DESTDIR)$(salomepythondir)/$${modulen}__POA" && rm -rf $(DESTDIR)$(salomepythondir)/$${modulen}__POA ; \
+       done ; \
+       for filen in $(IDL_FILES_PY) ; do \
+         echo "Removing $(DESTDIR)$(salomepythondir)/$${filen}" && rm -f $(DESTDIR)$(salomepythondir)/$${filen}* ; \
+       done