[gjs] build: Don't distribute generated GResource files



commit ddd1443a4cf29cc9e4936937c07c3e31a1bc06ae
Author: Philip Chimento <philip chimento gmail com>
Date:   Mon Apr 22 22:44:25 2019 -0700

    build: Don't distribute generated GResource files
    
    Due to an unknown bug we never previously distributed the generated
    modules-resources.{c,h} files. This bug was apparently fixed in commit
    e80ff83383062709ae30f47ac0c01e016e201d4a. However, this adds about 20%
    to the size of the source archive. Since we effectively required
    glib-compile-resources for building GJS by not previously distributing
    those files, we may as well save some download bandwidth by not
    including any generated GResource files.
    
    Unreviewed, pushing in order to be able to release without making the
    archive much larger.

 Makefile-test.am | 17 ++++++++++-------
 Makefile.am      |  2 +-
 2 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/Makefile-test.am b/Makefile-test.am
index c74f080b..0fe27eb3 100644
--- a/Makefile-test.am
+++ b/Makefile-test.am
@@ -36,7 +36,12 @@ jsunit-resources.h: $(srcdir)/installed-tests/js/jsunit.gresources.xml $(jsunit_
 jsunit-resources.c: $(srcdir)/installed-tests/js/jsunit.gresources.xml $(jsunit_resources_files)
        $(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir)/installed-tests/js 
--sourcedir=$(builddir) --generate --c-name jsunit_resources $<
 
-BUILT_SOURCES += mock-js-resources.c jsunit-resources.h jsunit-resources.c
+BUILT_SOURCES +=               \
+       mock-js-resources.c     \
+       mock-js-resources.h     \
+       jsunit-resources.c      \
+       jsunit-resources.h      \
+       $(NULL)
 
 EXTRA_DIST +=                                                  \
        $(mock_js_resources_files)                              \
@@ -46,6 +51,7 @@ EXTRA_DIST +=                                                         \
 
 CLEANFILES +=                                          \
        mock-js-resources.c                             \
+       mock-js-resources.h                             \
        jsunit-resources.c                              \
        jsunit-resources.h                              \
        $(NULL)
@@ -81,14 +87,11 @@ gjs_tests_gtester_SOURCES =                         \
        test/gjs-test-call-args.cpp                     \
        test/gjs-test-coverage.cpp                      \
        test/gjs-test-rooting.cpp                       \
-       mock-js-resources.c                             \
        $(NULL)
+nodist_gjs_tests_gtester_SOURCES = mock-js-resources.c mock-js-resources.h
 
-minijasmine_SOURCES =                  \
-       installed-tests/minijasmine.cpp \
-       jsunit-resources.c              \
-       jsunit-resources.h              \
-       $(NULL)
+minijasmine_SOURCES = installed-tests/minijasmine.cpp
+nodist_minijasmine_SOURCES = jsunit-resources.c jsunit-resources.h
 
 minijasmine_CPPFLAGS =                         \
        $(AM_CPPFLAGS)                          \
diff --git a/Makefile.am b/Makefile.am
index b0dcac68..7882af0a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -111,7 +111,6 @@ modules-resources.c: $(srcdir)/modules/modules.gresource.xml $(modules_resource_
 EXTRA_DIST += $(modules_resource_files) $(srcdir)/modules/modules.gresource.xml
 
 modules_source_files =         \
-       $(module_resource_srcs) \
        $(module_system_srcs)   \
        $(module_console_srcs)  \
        $(NULL)
@@ -125,6 +124,7 @@ endif
 CLEANFILES += $(module_resource_srcs)
 
 libgjs_la_SOURCES += $(modules_source_files)
+nodist_libgjs_la_SOURCES = $(module_resource_srcs)
 
 GjsPrivate-1.0.gir: libgjs.la
 GjsPrivate_1_0_gir_LIBS = libgjs.la


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