diff options
author | Daniel Burrows <dburrows@debian.org> | 2010-04-24 23:09:09 -0700 |
---|---|---|
committer | Daniel Burrows <dburrows@debian.org> | 2010-04-24 23:09:09 -0700 |
commit | e3291bde56b0ba3a8b53ef6436e361d1b01974eb (patch) | |
tree | ed0d8106eaae23aee763dd0f526b9c8de79586c1 /src | |
parent | 71f218f825e32adc77321f8cda86e784b0b3931d (diff) | |
download | aptitude-e3291bde56b0ba3a8b53ef6436e361d1b01974eb.tar.gz |
If the GTK+ frontend is being built, make sure to build its sources and link them into aptitude, and make the glade file available.
Since aptitude will actually run from the build directory, its glade
file needs to be available there, not just in the source directory.
Diffstat (limited to 'src')
-rw-r--r-- | src/SConscript | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/SConscript b/src/SConscript index 97d9fcbe..3123f8bc 100644 --- a/src/SConscript +++ b/src/SConscript @@ -95,13 +95,30 @@ toplevel_srcs = [ sub_srcs = SConscript(dirs = [ 'cmdline', 'generic', - #'gtk', 'mine', ]) -all_srcs = Flatten([toplevel_srcs, sub_srcs]) +# Note: always load the GTK+ sources (for dist, etc) even if we aren't +# building that variant. +gtk_srcs = SConscript(dirs = [ + 'gtk' + ]) + +if programs_env.IsVariantActive('gtk'): + aptitude_srcs = Flatten([toplevel_srcs, gtk_srcs, sub_srcs]) +else: + aptitude_srcs = Flatten([toplevel_srcs, sub_srcs]) + +aptitude = programs_env.Program(target = 'aptitude', source = NonHeaders(aptitude_srcs)) + +if programs_env.IsVariantActive('gtk'): + # Force the .glade file to be copied to the build directory. Note + # the use of Requires to ensure that the glade is available for + # aptitude, without forcing aptitude to be relinked because it + # changed. + aptitude_glade = programs_env.Command('gtk/aptitude.glade', + '#/src/gtk/aptitude.glade', + Copy('$TARGET', '$SOURCE')) + programs_env.Requires(aptitude, aptitude_glade) -# TODO: add nodes for all variants (debug vs release, gtk vs no-gtk), -# in separate build directories. -aptitude = programs_env.Program(target = 'aptitude', source = NonHeaders(all_srcs)) Return('aptitude') |