help-gsasl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] Initialization of pkgdata_DATA


From: Bruno Haible
Subject: Re: [bug-gnulib] Initialization of pkgdata_DATA
Date: Mon, 21 Aug 2006 20:15:41 +0200
User-agent: KMail/1.9.1

Martin Lambers wrote:
> Currently, 'make install' in the gnulib directory of my projects always
> creates the directory $(pkgdatadir) (/usr/local/share/<packagename> by
> default), even if it is empty.
> 
> If I remove the initialization of pkgdata_DATA in Makefile.am, the
> directory is not created.

I'm committing the following change. Does it fix the problem?

Bruno


2006-08-21  Bruno Haible <address@hidden>

        * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
        Emit a pkgdata_DATA variable only if some snippets add contents to it.
        Reported by Martin Lambers <address@hidden>.

*** gnulib-tool 21 Aug 2006 13:30:55 -0000      1.138
--- gnulib-tool 21 Aug 2006 18:15:41 -0000
***************
*** 898,909 ****
    # No need to generate dependencies since the sources are in gnulib, not 
here.
    echo "AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies"
    echo
    echo "noinst_${perhapsLT}LIBRARIES = $libname.$libext"
    echo
    echo "${libname}_${libext}_SOURCES ="
    echo "${libname}_${libext}_LIBADD = @${perhapsLT}LIBOBJS@"
    echo "noinst_HEADERS ="
!   echo "pkgdata_DATA ="
    echo "EXTRA_DIST ="
    echo "BUILT_SOURCES ="
    echo "SUFFIXES ="
--- 898,934 ----
    # No need to generate dependencies since the sources are in gnulib, not 
here.
    echo "AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies"
    echo
+   (
+     for module in $modules; do
+       func_verify_nontests_module
+       if test -n "$module"; then
+         {
+           func_get_automake_snippet "$module" |
+             sed -e 's,lib_\([A-Z][A-Z]*\),'"${libname}_${libext}"'_\1,g'
+           if test "$module" = 'alloca'; then
+             echo "${libname}_${libext}_LIBADD += @${perhapsLT}ALLOCA@"
+           fi
+         } > amsnippet.tmp
+         # Skip the contents if its entirely empty.
+         if grep '[^    ]' amsnippet.tmp > /dev/null ; then
+           echo "## begin gnulib module $module"
+           echo
+           cat amsnippet.tmp
+           echo "## end   gnulib module $module"
+           echo
+         fi
+         rm -f amsnippet.tmp
+       fi
+     done
+   ) > allsnippets.tmp
    echo "noinst_${perhapsLT}LIBRARIES = $libname.$libext"
    echo
    echo "${libname}_${libext}_SOURCES ="
    echo "${libname}_${libext}_LIBADD = @${perhapsLT}LIBOBJS@"
    echo "noinst_HEADERS ="
!   if grep '^pkgdata_DATA *+=' allsnippets.tmp > /dev/null; then
!     echo "pkgdata_DATA ="
!   fi
    echo "EXTRA_DIST ="
    echo "BUILT_SOURCES ="
    echo "SUFFIXES ="
***************
*** 915,941 ****
    echo
    echo "AM_CPPFLAGS ="
    echo
!   for module in $modules; do
!     func_verify_nontests_module
!     if test -n "$module"; then
!       {
!         func_get_automake_snippet "$module" |
!           sed -e 's,lib_\([A-Z][A-Z]*\),'"${libname}_${libext}"'_\1,g'
!         if test "$module" = 'alloca'; then
!           echo "${libname}_${libext}_LIBADD += @${perhapsLT}ALLOCA@"
!         fi
!       } > amsnippet.tmp
!       # Skip the contents if its entirely empty.
!       if grep '[^      ]' amsnippet.tmp > /dev/null ; then
!         echo "## begin gnulib module $module"
!         echo
!         cat amsnippet.tmp
!         echo "## end   gnulib module $module"
!         echo
!       fi
!       rm -f amsnippet.tmp
!     fi
!   done
    echo
    echo "mostlyclean-local: mostlyclean-generic"
    echo "      @test -z \"\$(MOSTLYCLEANDIRS)\" || \\"
--- 940,946 ----
    echo
    echo "AM_CPPFLAGS ="
    echo
!   cat allsnippets.tmp
    echo
    echo "mostlyclean-local: mostlyclean-generic"
    echo "      @test -z \"\$(MOSTLYCLEANDIRS)\" || \\"
***************
*** 946,951 ****
--- 951,957 ----
    echo "        done"
    echo
    echo "# Makefile.am ends here"
+   rm -f allsnippets.tmp
  }
  
  # func_emit_tests_Makefile_am
***************
*** 973,978 ****
--- 979,1001 ----
    echo
    echo "ACLOCAL_AMFLAGS = -I ${testsbase_inverse}/${m4base}"
    echo
+   (
+     for module in $modules; do
+       func_verify_tests_module
+       if test -n "$module"; then
+         func_get_automake_snippet "$module" > amsnippet.tmp
+         # Skip the contents if its entirely empty.
+         if grep '[^    ]' amsnippet.tmp > /dev/null ; then
+           echo "## begin gnulib module $module"
+           echo
+           cat amsnippet.tmp
+           echo "## end   gnulib module $module"
+           echo
+         fi
+         rm -f amsnippet.tmp
+       fi
+     done
+   ) > allsnippets.tmp
    # Nothing is being added to SUBDIRS; nevertheless the existence of this
    # variable is needed to avoid an error from automake:
    #   "AM_GNU_GETTEXT used but SUBDIRS not defined"
***************
*** 982,988 ****
    echo "noinst_PROGRAMS ="
    echo "check_PROGRAMS ="
    echo "noinst_HEADERS ="
!   echo "pkgdata_DATA ="
    echo "EXTRA_DIST ="
    echo "BUILT_SOURCES ="
    echo "SUFFIXES ="
--- 1005,1013 ----
    echo "noinst_PROGRAMS ="
    echo "check_PROGRAMS ="
    echo "noinst_HEADERS ="
!   if grep '^pkgdata_DATA *+=' allsnippets.tmp > /dev/null; then
!     echo "pkgdata_DATA ="
!   fi
    echo "EXTRA_DIST ="
    echo "BUILT_SOURCES ="
    echo "SUFFIXES ="
***************
*** 999,1019 ****
    echo
    echo "LDADD = ${testsbase_inverse}/${sourcebase-lib}/${libname}.${libext}"
    echo
!   for module in $modules; do
!     func_verify_tests_module
!     if test -n "$module"; then
!       func_get_automake_snippet "$module" > amsnippet.tmp
!       # Skip the contents if its entirely empty.
!       if grep '[^      ]' amsnippet.tmp > /dev/null ; then
!         echo "## begin gnulib module $module"
!         echo
!         cat amsnippet.tmp
!         echo "## end   gnulib module $module"
!         echo
!       fi
!       rm -f amsnippet.tmp
!     fi
!   done
    echo "# Clean up after Solaris cc."
    echo "clean-local:"
    echo "      rm -rf SunWS_cache"
--- 1024,1030 ----
    echo
    echo "LDADD = ${testsbase_inverse}/${sourcebase-lib}/${libname}.${libext}"
    echo
!   cat allsnippets.tmp
    echo "# Clean up after Solaris cc."
    echo "clean-local:"
    echo "      rm -rf SunWS_cache"
***************
*** 1027,1032 ****
--- 1038,1044 ----
    echo "        done"
    echo
    echo "# Makefile.am ends here"
+   rm -f allsnippets.tmp
  }
  
  # func_import modules




reply via email to

[Prev in Thread] Current Thread [Next in Thread]