Mercurial > hg > octave-nkf > gnulib-hg
comparison gnulib-tool @ 7169:cb505deddb22
Don't create a $(pkgdatadir) if there's nothing to be installed in it.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Mon, 21 Aug 2006 18:18:25 +0000 |
parents | 56632b3512af |
children | bc1c94eecdb1 |
comparison
equal
deleted
inserted
replaced
7168:56632b3512af | 7169:cb505deddb22 |
---|---|
20 # This program is meant for authors or maintainers which want to import | 20 # This program is meant for authors or maintainers which want to import |
21 # modules from gnulib into their packages. | 21 # modules from gnulib into their packages. |
22 | 22 |
23 progname=$0 | 23 progname=$0 |
24 package=gnulib | 24 package=gnulib |
25 cvsdatestamp='$Date: 2006-08-21 13:30:55 $' | 25 cvsdatestamp='$Date: 2006-08-21 18:18:25 $' |
26 last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'` | 26 last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'` |
27 version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'` | 27 version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'` |
28 | 28 |
29 # You can set AUTOCONFPATH to empty if autoconf 2.57 is already in your PATH. | 29 # You can set AUTOCONFPATH to empty if autoconf 2.57 is already in your PATH. |
30 AUTOCONFPATH= | 30 AUTOCONFPATH= |
896 fi | 896 fi |
897 echo | 897 echo |
898 # No need to generate dependencies since the sources are in gnulib, not here. | 898 # No need to generate dependencies since the sources are in gnulib, not here. |
899 echo "AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies" | 899 echo "AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies" |
900 echo | 900 echo |
901 ( | |
902 for module in $modules; do | |
903 func_verify_nontests_module | |
904 if test -n "$module"; then | |
905 { | |
906 func_get_automake_snippet "$module" | | |
907 sed -e 's,lib_\([A-Z][A-Z]*\),'"${libname}_${libext}"'_\1,g' | |
908 if test "$module" = 'alloca'; then | |
909 echo "${libname}_${libext}_LIBADD += @${perhapsLT}ALLOCA@" | |
910 fi | |
911 } > amsnippet.tmp | |
912 # Skip the contents if its entirely empty. | |
913 if grep '[^ ]' amsnippet.tmp > /dev/null ; then | |
914 echo "## begin gnulib module $module" | |
915 echo | |
916 cat amsnippet.tmp | |
917 echo "## end gnulib module $module" | |
918 echo | |
919 fi | |
920 rm -f amsnippet.tmp | |
921 fi | |
922 done | |
923 ) > allsnippets.tmp | |
901 echo "noinst_${perhapsLT}LIBRARIES = $libname.$libext" | 924 echo "noinst_${perhapsLT}LIBRARIES = $libname.$libext" |
902 echo | 925 echo |
903 echo "${libname}_${libext}_SOURCES =" | 926 echo "${libname}_${libext}_SOURCES =" |
904 echo "${libname}_${libext}_LIBADD = @${perhapsLT}LIBOBJS@" | 927 echo "${libname}_${libext}_LIBADD = @${perhapsLT}LIBOBJS@" |
905 echo "noinst_HEADERS =" | 928 echo "noinst_HEADERS =" |
906 echo "pkgdata_DATA =" | 929 if grep '^pkgdata_DATA *+=' allsnippets.tmp > /dev/null; then |
930 echo "pkgdata_DATA =" | |
931 fi | |
907 echo "EXTRA_DIST =" | 932 echo "EXTRA_DIST =" |
908 echo "BUILT_SOURCES =" | 933 echo "BUILT_SOURCES =" |
909 echo "SUFFIXES =" | 934 echo "SUFFIXES =" |
910 echo "MOSTLYCLEANFILES = core *.stackdump" | 935 echo "MOSTLYCLEANFILES = core *.stackdump" |
911 echo "MOSTLYCLEANDIRS =" | 936 echo "MOSTLYCLEANDIRS =" |
913 echo "DISTCLEANFILES =" | 938 echo "DISTCLEANFILES =" |
914 echo "MAINTAINERCLEANFILES =" | 939 echo "MAINTAINERCLEANFILES =" |
915 echo | 940 echo |
916 echo "AM_CPPFLAGS =" | 941 echo "AM_CPPFLAGS =" |
917 echo | 942 echo |
918 for module in $modules; do | 943 cat allsnippets.tmp |
919 func_verify_nontests_module | |
920 if test -n "$module"; then | |
921 { | |
922 func_get_automake_snippet "$module" | | |
923 sed -e 's,lib_\([A-Z][A-Z]*\),'"${libname}_${libext}"'_\1,g' | |
924 if test "$module" = 'alloca'; then | |
925 echo "${libname}_${libext}_LIBADD += @${perhapsLT}ALLOCA@" | |
926 fi | |
927 } > amsnippet.tmp | |
928 # Skip the contents if its entirely empty. | |
929 if grep '[^ ]' amsnippet.tmp > /dev/null ; then | |
930 echo "## begin gnulib module $module" | |
931 echo | |
932 cat amsnippet.tmp | |
933 echo "## end gnulib module $module" | |
934 echo | |
935 fi | |
936 rm -f amsnippet.tmp | |
937 fi | |
938 done | |
939 echo | 944 echo |
940 echo "mostlyclean-local: mostlyclean-generic" | 945 echo "mostlyclean-local: mostlyclean-generic" |
941 echo " @test -z \"\$(MOSTLYCLEANDIRS)\" || \\" | 946 echo " @test -z \"\$(MOSTLYCLEANDIRS)\" || \\" |
942 echo " for dir in \$(MOSTLYCLEANDIRS); do \\" | 947 echo " for dir in \$(MOSTLYCLEANDIRS); do \\" |
943 echo " if test -d \$\$dir; then \\" | 948 echo " if test -d \$\$dir; then \\" |
944 echo " echo \"rmdir \$\$dir\"; rmdir \$\$dir; \\" | 949 echo " echo \"rmdir \$\$dir\"; rmdir \$\$dir; \\" |
945 echo " fi; \\" | 950 echo " fi; \\" |
946 echo " done" | 951 echo " done" |
947 echo | 952 echo |
948 echo "# Makefile.am ends here" | 953 echo "# Makefile.am ends here" |
954 rm -f allsnippets.tmp | |
949 } | 955 } |
950 | 956 |
951 # func_emit_tests_Makefile_am | 957 # func_emit_tests_Makefile_am |
952 # emits the contents of tests/Makefile.am to standard output. | 958 # emits the contents of tests/Makefile.am to standard output. |
953 # Input: | 959 # Input: |
971 # Generate dependencies here, since it eases the debugging of test failures. | 977 # Generate dependencies here, since it eases the debugging of test failures. |
972 echo "AUTOMAKE_OPTIONS = 1.5 foreign" | 978 echo "AUTOMAKE_OPTIONS = 1.5 foreign" |
973 echo | 979 echo |
974 echo "ACLOCAL_AMFLAGS = -I ${testsbase_inverse}/${m4base}" | 980 echo "ACLOCAL_AMFLAGS = -I ${testsbase_inverse}/${m4base}" |
975 echo | 981 echo |
982 ( | |
983 for module in $modules; do | |
984 func_verify_tests_module | |
985 if test -n "$module"; then | |
986 func_get_automake_snippet "$module" > amsnippet.tmp | |
987 # Skip the contents if its entirely empty. | |
988 if grep '[^ ]' amsnippet.tmp > /dev/null ; then | |
989 echo "## begin gnulib module $module" | |
990 echo | |
991 cat amsnippet.tmp | |
992 echo "## end gnulib module $module" | |
993 echo | |
994 fi | |
995 rm -f amsnippet.tmp | |
996 fi | |
997 done | |
998 ) > allsnippets.tmp | |
976 # Nothing is being added to SUBDIRS; nevertheless the existence of this | 999 # Nothing is being added to SUBDIRS; nevertheless the existence of this |
977 # variable is needed to avoid an error from automake: | 1000 # variable is needed to avoid an error from automake: |
978 # "AM_GNU_GETTEXT used but SUBDIRS not defined" | 1001 # "AM_GNU_GETTEXT used but SUBDIRS not defined" |
979 echo "SUBDIRS =" | 1002 echo "SUBDIRS =" |
980 echo "TESTS =" | 1003 echo "TESTS =" |
981 echo "TESTS_ENVIRONMENT =" | 1004 echo "TESTS_ENVIRONMENT =" |
982 echo "noinst_PROGRAMS =" | 1005 echo "noinst_PROGRAMS =" |
983 echo "check_PROGRAMS =" | 1006 echo "check_PROGRAMS =" |
984 echo "noinst_HEADERS =" | 1007 echo "noinst_HEADERS =" |
985 echo "pkgdata_DATA =" | 1008 if grep '^pkgdata_DATA *+=' allsnippets.tmp > /dev/null; then |
1009 echo "pkgdata_DATA =" | |
1010 fi | |
986 echo "EXTRA_DIST =" | 1011 echo "EXTRA_DIST =" |
987 echo "BUILT_SOURCES =" | 1012 echo "BUILT_SOURCES =" |
988 echo "SUFFIXES =" | 1013 echo "SUFFIXES =" |
989 echo "MOSTLYCLEANFILES = core *.stackdump" | 1014 echo "MOSTLYCLEANFILES = core *.stackdump" |
990 echo "MOSTLYCLEANDIRS =" | 1015 echo "MOSTLYCLEANDIRS =" |
997 echo " -I${testsbase_inverse} -I\$(srcdir)/${testsbase_inverse} \\" | 1022 echo " -I${testsbase_inverse} -I\$(srcdir)/${testsbase_inverse} \\" |
998 echo " -I${testsbase_inverse}/${sourcebase-lib} -I\$(srcdir)/${testsbase_inverse}/${sourcebase-lib}" | 1023 echo " -I${testsbase_inverse}/${sourcebase-lib} -I\$(srcdir)/${testsbase_inverse}/${sourcebase-lib}" |
999 echo | 1024 echo |
1000 echo "LDADD = ${testsbase_inverse}/${sourcebase-lib}/${libname}.${libext}" | 1025 echo "LDADD = ${testsbase_inverse}/${sourcebase-lib}/${libname}.${libext}" |
1001 echo | 1026 echo |
1002 for module in $modules; do | 1027 cat allsnippets.tmp |
1003 func_verify_tests_module | |
1004 if test -n "$module"; then | |
1005 func_get_automake_snippet "$module" > amsnippet.tmp | |
1006 # Skip the contents if its entirely empty. | |
1007 if grep '[^ ]' amsnippet.tmp > /dev/null ; then | |
1008 echo "## begin gnulib module $module" | |
1009 echo | |
1010 cat amsnippet.tmp | |
1011 echo "## end gnulib module $module" | |
1012 echo | |
1013 fi | |
1014 rm -f amsnippet.tmp | |
1015 fi | |
1016 done | |
1017 echo "# Clean up after Solaris cc." | 1028 echo "# Clean up after Solaris cc." |
1018 echo "clean-local:" | 1029 echo "clean-local:" |
1019 echo " rm -rf SunWS_cache" | 1030 echo " rm -rf SunWS_cache" |
1020 echo | 1031 echo |
1021 echo "mostlyclean-local: mostlyclean-generic" | 1032 echo "mostlyclean-local: mostlyclean-generic" |
1025 echo " echo \"rmdir \$\$dir\"; rmdir \$\$dir; \\" | 1036 echo " echo \"rmdir \$\$dir\"; rmdir \$\$dir; \\" |
1026 echo " fi; \\" | 1037 echo " fi; \\" |
1027 echo " done" | 1038 echo " done" |
1028 echo | 1039 echo |
1029 echo "# Makefile.am ends here" | 1040 echo "# Makefile.am ends here" |
1041 rm -f allsnippets.tmp | |
1030 } | 1042 } |
1031 | 1043 |
1032 # func_import modules | 1044 # func_import modules |
1033 # Uses also the variables | 1045 # Uses also the variables |
1034 # - destdir target directory | 1046 # - destdir target directory |