Skip to content

Commit

Permalink
Allow printing component to be removed completely
Browse files Browse the repository at this point in the history
Using enable_printing=0 removes all of the source files of the printing
component, but has no effect on its dependencies. It is wrong to empty out the
target inside the target. If printing is disabled, then the dependency on
printing.gyp is not needed and can be removed.

This target was causing libgcrypt to be linked even when printing was disabled.
That problem goes away with this change.

Review URL: https://codereview.chromium.org/62793002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233563 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
spang@chromium.org committed Nov 7, 2013
1 parent 070bb45 commit f757c1a
Show file tree
Hide file tree
Showing 13 changed files with 65 additions and 23 deletions.
6 changes: 5 additions & 1 deletion build/all.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@
'../jingle/jingle.gyp:jingle_unittests',
'../media/media.gyp:media_unittests',
'../ppapi/ppapi_internal.gyp:ppapi_unittests',
'../printing/printing.gyp:printing_unittests',
'../remoting/remoting.gyp:remoting_unittests',
'../sync/sync.gyp:sync_unit_tests',
'../third_party/WebKit/public/all.gyp:all_blink',
Expand Down Expand Up @@ -350,6 +349,11 @@
'../google_apis/gcm/gcm.gyp:gcm_unit_tests',
],
}],
['enable_printing!=0', {
'dependencies': [
'../printing/printing.gyp:printing_unittests',
],
}],
],
}, # target_name: chromium_builder_tests
{
Expand Down
6 changes: 5 additions & 1 deletion chrome/chrome.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
'conditions': [
['OS!="ios"', {
'chromium_browser_dependencies': [
'../printing/printing.gyp:printing',
'../ppapi/ppapi_internal.gyp:ppapi_host',
],
'chromium_child_dependencies': [
Expand All @@ -42,6 +41,11 @@
'../third_party/WebKit/Source/devtools/devtools.gyp:devtools_frontend_resources',
],
}],
['enable_printing!=0', {
'chromium_browser_dependencies': [
'../printing/printing.gyp:printing',
],
}],
['OS=="win"', {
'platform_locale_settings_grd':
'app/resources/locale_settings_win.grd',
Expand Down
6 changes: 5 additions & 1 deletion chrome/chrome_browser.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -2669,7 +2669,6 @@
'../components/components.gyp:navigation_interception',
'../media/media.gyp:media',
'../net/net.gyp:net_with_v8',
'../printing/printing.gyp:printing',
# TODO(tonyg): Remove this dependency (crbug.com/280157).
'../testing/perf/perf_test.gyp:*',
'../third_party/adobe/flash/flash_player.gyp:flapper_version_h',
Expand Down Expand Up @@ -2723,6 +2722,11 @@
'xcode_settings': {'OTHER_LDFLAGS': ['-weak_framework CoreImage']},
},
}],
['enable_printing!=0', {
'dependencies': [
'../printing/printing.gyp:printing',
],
}],
['OS=="win" or OS=="mac"', {
'sources': [
'browser/media_galleries/fileapi/iapps_data_provider.cc',
Expand Down
6 changes: 5 additions & 1 deletion chrome/chrome_browser_chromeos.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
'../media/media.gyp:media',
'../net/net.gyp:net',
'../ppapi/ppapi_internal.gyp:ppapi_ipc', # For PpapiMsg_LoadPlugin
'../printing/printing.gyp:printing',
'../skia/skia.gyp:skia',
'../sync/sync.gyp:sync',
'../third_party/adobe/flash/flash_player.gyp:flapper_version_h',
Expand Down Expand Up @@ -966,6 +965,11 @@
['include', '^browser/chromeos/status/memory_menu_button.h'],
],
}],
['enable_printing != 0', {
'dependencies': [
'../printing/printing.gyp:printing',
],
}],
],
},
{
Expand Down
6 changes: 5 additions & 1 deletion chrome/chrome_browser_ui.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -2552,7 +2552,6 @@
'../device/bluetooth/bluetooth.gyp:device_bluetooth',
'../media/media.gyp:media',
'../net/net.gyp:net_with_v8',
'../printing/printing.gyp:printing',
'../third_party/adobe/flash/flash_player.gyp:flapper_version_h',
'../third_party/expat/expat.gyp:expat',
'../third_party/hunspell/hunspell.gyp:hunspell',
Expand Down Expand Up @@ -2590,6 +2589,11 @@
['include', '^browser/ui/profile_error_dialog\\.cc$'],
],
}],
['enable_printing!=0', {
'dependencies': [
'../printing/printing.gyp:printing',
],
}],
['OS!="ios" and chrome_multiple_dll!=1', {
'dependencies': [
'../webkit/glue/webkit_glue.gyp:glue',
Expand Down
6 changes: 5 additions & 1 deletion chrome/chrome_common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@
'<(DEPTH)/components/components.gyp:autofill_core_common',
'<(DEPTH)/components/nacl_common.gyp:nacl_common',
'<(DEPTH)/ipc/ipc.gyp:ipc',
'<(DEPTH)/printing/printing.gyp:printing',
'<(DEPTH)/third_party/adobe/flash/flash_player.gyp:flapper_version_h',
'<(DEPTH)/third_party/re2/re2.gyp:re2',
'<(DEPTH)/third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
Expand Down Expand Up @@ -491,6 +490,11 @@
'<(DEPTH)/breakpad/src',
],
}],
['enable_printing!=0', {
'dependencies': [
'<(DEPTH)/printing/printing.gyp:printing',
],
}],
['OS!="ios" and chrome_multiple_dll!=1', {
'dependencies': [
'<(DEPTH)/webkit/glue/webkit_glue.gyp:glue',
Expand Down
6 changes: 5 additions & 1 deletion chrome/chrome_dll.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@
'chrome_version_resources',
'../chrome/chrome_resources.gyp:chrome_unscaled_resources',
'../crypto/crypto.gyp:crypto',
'../printing/printing.gyp:printing',
'../net/net.gyp:net_resources',
'../ui/views/views.gyp:views',
'../webkit/webkit_resources.gyp:webkit_resources',
Expand Down Expand Up @@ -214,6 +213,11 @@
'<(allocator_target)',
],
}],
['enable_printing!=0', {
'dependencies': [
'../printing/printing.gyp:printing',
],
}],
]
}],
['chrome_multiple_dll==1', {
Expand Down
6 changes: 5 additions & 1 deletion chrome/chrome_renderer.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
'../media/cast/cast.gyp:cast_config',
'../media/cast/cast_sender.gyp:cast_sender',
'../net/net.gyp:net',
'../printing/printing.gyp:printing',
'../skia/skia.gyp:skia',
'../third_party/WebKit/public/blink.gyp:blink',
'../third_party/hunspell/hunspell.gyp:hunspell',
Expand Down Expand Up @@ -476,6 +475,11 @@
'<(DEPTH)/chrome/common/extensions/api/api.gyp:api',
],
}],
['enable_printing!=0', {
'dependencies': [
'../printing/printing.gyp:printing',
],
}],
],
},
],
Expand Down
12 changes: 10 additions & 2 deletions chrome/chrome_tests.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -2314,7 +2314,6 @@
'test_support_chrome',
'test_support_common',
'../net/net.gyp:net',
'../printing/printing.gyp:printing',
'../skia/skia.gyp:skia',
'../sync/sync.gyp:sync',
'../sync/sync.gyp:test_support_sync_testserver',
Expand Down Expand Up @@ -2482,6 +2481,11 @@
'../ui/views/views.gyp:views',
],
}],
['enable_printing!=0', {
'dependencies': [
'../printing/printing.gyp:printing',
],
}],
],
},
{
Expand Down Expand Up @@ -2951,7 +2955,6 @@
# 'browser_tests',
'../ipc/ipc.gyp:ipc_tests',
'../net/net.gyp:net_unittests',
'../printing/printing.gyp:printing_unittests',
'../remoting/remoting.gyp:remoting_unittests',
'../sql/sql.gyp:sql_unittests',
'../content/content_shell_and_tests.gyp:content_unittests',
Expand Down Expand Up @@ -2995,6 +2998,11 @@
'dependencies': [
# Placeholder; empty for now.
]}],
['enable_printing!=0', {
'dependencies': [
'../printing/printing.gyp:printing_unittests',
],
}],
], # 'conditions'
'actions': [
{
Expand Down
6 changes: 5 additions & 1 deletion cloud_print/service/service.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
'<(DEPTH)/google_apis/google_apis.gyp:google_apis',
'<(DEPTH)/ipc/ipc.gyp:ipc',
'<(DEPTH)/net/net.gyp:net',
'<(DEPTH)/printing/printing.gyp:printing',
'<(DEPTH)/url/url.gyp:url_lib',
'service_resources',
],
Expand All @@ -69,6 +68,11 @@
'<(DEPTH)/chrome/common_constants.gyp:common_constants',
],
}],
['enable_printing!=0', {
'dependencies': [
'<(DEPTH)/printing/printing.gyp:printing',
],
}],
],
'sources': [
'<(DEPTH)/content/public/common/content_switches.h',
Expand Down
6 changes: 5 additions & 1 deletion content/content_browser.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,6 @@
'browser/devtools/devtools_resources.gyp:devtools_resources',
'../cc/cc.gyp:cc',
'../net/net.gyp:http_server',
'../printing/printing.gyp:printing',
'../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
'../ui/surface/surface.gyp:surface',
'../webkit/common/webkit_common.gyp:webkit_common',
Expand All @@ -1280,6 +1279,11 @@
'../webkit/webkit_resources.gyp:webkit_strings',
],
}],
['enable_printing!=0', {
'dependencies': [
'../printing/printing.gyp:printing',
],
}],
['OS!="ios" and chrome_multiple_dll!=1', {
'dependencies': [
'../third_party/WebKit/public/blink.gyp:blink',
Expand Down
10 changes: 0 additions & 10 deletions printing/printing.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,6 @@
],
},
'conditions': [
['enable_printing==0', {
'sources/': [
['exclude', '.'],
],
}],
['use_aura==1', {
'dependencies': [
'<(DEPTH)/ui/aura/aura.gyp:aura',
Expand Down Expand Up @@ -261,11 +256,6 @@
'units_unittest.cc',
],
'conditions': [
['enable_printing==0', {
'sources/': [
['exclude', '.'],
],
}],
['toolkit_uses_gtk == 0', {'sources/': [['exclude', '_gtk_unittest\\.cc$']]}],
['OS!="mac"', {'sources/': [['exclude', '_mac_unittest\\.(cc|mm?)$']]}],
['OS!="win"', {'sources/': [['exclude', '_win_unittest\\.cc$']]}],
Expand Down
6 changes: 5 additions & 1 deletion webkit/glue/webkit_glue.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
'<(DEPTH)/gpu/gpu.gyp:gles2_c_lib',
'<(DEPTH)/gpu/gpu.gyp:gles2_implementation',
'<(DEPTH)/net/net.gyp:net',
'<(DEPTH)/printing/printing.gyp:printing',
'<(DEPTH)/skia/skia.gyp:skia',
'<(DEPTH)/third_party/icu/icu.gyp:icui18n',
'<(DEPTH)/third_party/icu/icu.gyp:icuuc',
Expand Down Expand Up @@ -99,6 +98,11 @@
'<(DEPTH)/third_party/WebKit/public/blink.gyp:blink',
],
}],
['enable_printing!=0', {
'dependencies': [
'<(DEPTH)/printing/printing.gyp:printing',
],
}],
],
},
],
Expand Down

0 comments on commit f757c1a

Please sign in to comment.