diff --git a/Makefile.am b/Makefile.am index 4a29e1cf7c..6bda5157a8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -35,38 +35,7 @@ clean-local: pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = protobuf.pc protobuf-lite.pc -EXTRA_DIST = \ - autogen.sh \ - generate_descriptor_proto.sh \ - README.md \ - INSTALL.txt \ - LICENSE \ - CONTRIBUTORS.txt \ - CHANGES.txt \ - editors/README.txt \ - editors/proto.vim \ - editors/protobuf-mode.el \ - vsprojects/config.h \ - vsprojects/extract_includes.bat \ - vsprojects/libprotobuf.vcproj \ - vsprojects/libprotobuf-lite.vcproj \ - vsprojects/libprotoc.vcproj \ - vsprojects/protobuf.sln \ - vsprojects/protoc.vcproj \ - vsprojects/readme.txt \ - vsprojects/test_plugin.vcproj \ - vsprojects/tests.vcproj \ - vsprojects/lite-test.vcproj \ - vsprojects/convert2008to2005.sh \ - examples/README.txt \ - examples/Makefile \ - examples/addressbook.proto \ - examples/add_person.cc \ - examples/list_people.cc \ - examples/AddPerson.java \ - examples/ListPeople.java \ - examples/add_person.py \ - examples/list_people.py \ +java_EXTRA_DIST= \ java/src/main/java/com/google/protobuf/AbstractMessage.java \ java/src/main/java/com/google/protobuf/AbstractMessageLite.java \ java/src/main/java/com/google/protobuf/AbstractParser.java \ @@ -182,7 +151,9 @@ EXTRA_DIST = \ java/src/test/java/com/google/protobuf/test_check_utf8_size.proto \ java/src/test/java/com/google/protobuf/test_custom_options.proto \ java/pom.xml \ - java/README.txt \ + java/README.txt + +python_EXTRA_DIST= \ python/google/protobuf/internal/api_implementation.cc \ python/google/protobuf/internal/api_implementation.py \ python/google/protobuf/internal/api_implementation_default_test.py \ @@ -267,6 +238,41 @@ EXTRA_DIST = \ python/stubout.py \ python/README.txt +all_EXTRA_DIST=$(java_EXTRA_DIST) $(python_EXTRA_DIST) + +EXTRA_DIST = $(@DIST_LANG@_EXTRA_DIST) \ + autogen.sh \ + generate_descriptor_proto.sh \ + README.md \ + INSTALL.txt \ + LICENSE \ + CONTRIBUTORS.txt \ + CHANGES.txt \ + editors/README.txt \ + editors/proto.vim \ + editors/protobuf-mode.el \ + vsprojects/config.h \ + vsprojects/extract_includes.bat \ + vsprojects/libprotobuf.vcproj \ + vsprojects/libprotobuf-lite.vcproj \ + vsprojects/libprotoc.vcproj \ + vsprojects/protobuf.sln \ + vsprojects/protoc.vcproj \ + vsprojects/readme.txt \ + vsprojects/test_plugin.vcproj \ + vsprojects/tests.vcproj \ + vsprojects/lite-test.vcproj \ + vsprojects/convert2008to2005.sh \ + examples/README.txt \ + examples/Makefile \ + examples/addressbook.proto \ + examples/add_person.cc \ + examples/list_people.cc \ + examples/AddPerson.java \ + examples/ListPeople.java \ + examples/add_person.py \ + examples/list_people.py + # Deletes all the files generated by autogen.sh. MAINTAINERCLEANFILES = \ aclocal.m4 \ diff --git a/configure.ac b/configure.ac index 58c1bf37cc..c3b04e0cc3 100644 --- a/configure.ac +++ b/configure.ac @@ -20,6 +20,14 @@ AC_CONFIG_SRCDIR(src/google/protobuf/message.cc) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) +AC_ARG_VAR(DIST_LANG, [language to include in the distribution package (i.e., make dist)]) +case "$DIST_LANG" in + "") DIST_LANG=cpp ;; + all | cpp | java | python | javanano) ;; + *) AC_MSG_FAILURE([unknown language: $DIST_LANG]) ;; +esac +AC_SUBST(DIST_LANG) + # autoconf's default CXXFLAGS are usually "-g -O2". These aren't necessarily # the best choice for libprotobuf. AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"],