summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Soriano <csoriano@gnome.org>2016-04-19 16:49:54 +0200
committerCarlos Soriano <csoriano@gnome.org>2016-04-19 16:51:15 +0200
commit9bb4ff027546f9f054093168aaa422a0a0459fb5 (patch)
tree04eb737790f84feab1079c5b3dd6f5da34137181
parentb9ac781382ec72605d4348a470f7328a79582608 (diff)
downloadnautilus-9bb4ff027546f9f054093168aaa422a0a0459fb5.tar.gz
desktop: add a compile flag for building it
So we can build nautilus without desktop support and the other way around. https://bugzilla.gnome.org/show_bug.cgi?id=712620
-rw-r--r--Makefile.am5
-rw-r--r--configure.ac21
-rw-r--r--data/Makefile.am21
3 files changed, 39 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am
index b75140f34..17a81e4b9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,13 +6,16 @@ DIRS = \
libgd \
libnautilus-private \
src \
- nautilus-desktop \
test \
po \
data \
docs \
$(NULL)
+if ENABLE_DESKTOP
+DIRS += nautilus-desktop
+endif
+
DIST_SUBDIRS = $(DIRS) nautilus-sendto-extension
SUBDIRS = $(DIRS)
diff --git a/configure.ac b/configure.ac
index 955a6bdba..6ed273cbf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -165,7 +165,25 @@ AM_CONDITIONAL(ENABLE_EMPTY_VIEW, test "x$ENABLE_EMPTY_VIEW" = "x1")
dnl ==========================================================================
-AC_ARG_ENABLE(packagekit,
+dnl *********************************
+dnl *** Check for desktop support ***
+dnl *********************************
+
+AC_ARG_ENABLE(desktop,
+ [AS_HELP_STRING([--enable-desktop=@<:@yes/no@:>@],
+ [build desktop support [default=yes]])],
+ [enable_desktop="$enableval"],
+ [enable_desktop=yes])
+
+if test "x$enable_desktop" != "xno"; then
+ AC_DEFINE(ENABLE_DESKTOP, 1, [Define to enable the desktop support])
+fi
+
+AM_CONDITIONAL(ENABLE_DESKTOP, test "x$enable_desktop" = "xyes")
+
+dnl ==========================================================================
+
+AC_ARG_ENABLE(packagekit,
AS_HELP_STRING([--disable-packagekit],
[build without PackageKit support]))
msg_packagekit=no
@@ -337,6 +355,7 @@ nautilus-$VERSION:
PackageKit support: $msg_packagekit
nautilus-sendto ext: $enable_nst_extension
Tracker support: $enable_tracker
+ desktop support: $enable_desktop
profiling support: ${enable_profiling}
nautilus-extension documentation: ${enable_gtk_doc}
diff --git a/data/Makefile.am b/data/Makefile.am
index 1db62a7f9..05214a960 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,16 +1,21 @@
NULL=
desktopdir = $(datadir)/applications
-desktop_DATA = \
- $(desktop_in_files:.desktop.in=.desktop) \
- nautilus-classic.desktop
desktop_in_files = \
org.gnome.Nautilus.desktop.in \
nautilus-autorun-software.desktop.in
-autostartdir = $(sysconfdir)/xdg/autostart
+desktop_DATA = \
+ $(desktop_in_files:.desktop.in=.desktop)
+
autostart_in_files = nautilus-autostart.desktop.in
-autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
+
+if ENABLE_DESKTOP
+desktop_DATA += nautilus-classic.desktop
+
+autostartdir = $(sysconfdir)/xdg/autostart
+autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
+endif
appdatadir = $(datadir)/appdata
appdata_in_files = org.gnome.Nautilus.appdata.xml.in
@@ -55,8 +60,12 @@ EXTRA_DIST = \
CLEANFILES = \
$(desktop_DATA) \
$(service_DATA) \
- $(autostart_DATA) \
$(appdata_DATA) \
$(NULL)
+if ENABLE_DESKTOP
+CLEANFILES += $(autostart_DATA)
+endif
+
+
-include $(top_srcdir)/git.mk