[patch] remove grody code, add spiffy new code for initial desktop population



Hi all,

So, as part of the Debian Desktop project, I wanted to have default
links on the user's desktop to say the Debian homepage, the
security.debian.org site, etc.

I started looking through the nautilus code which sets up the user's
~/.gnome-desktop directory, and I was a little bit floored to see it
execed /bin/cp to copy the start-here.desktop file.

So here's a patch which uses gnome_xfs_xfer_uri to recursively copy the
contents of ${prefix}/share/nautilus/initial-desktop to the user's
~/.gnome-desktop.

Note however that it depends on a patch to gnome-vfs I have sent
separately to that list.  Basically the problem was that the recursion
didn't follow symlinks, and I needed it to.


--- nautilus-2.0.7/data/Makefile.am	2002-05-02 17:16:27.000000000 -0400
+++ nautilus-2.0.7.new/data/Makefile.am	2002-10-25 01:34:51.000000000 -0400
@@ -35,11 +35,16 @@
 	static_bookmarks.xml 		\
 	nautilus-extras.placeholder 	\
 	nautilus-suggested.placeholder 	\
-	starthere.desktop		\
 	starthere-link.desktop		\
 	$(NULL)
 
+initialdesktopdir = $(nautilusdatadir)/initial-desktop
+
+initialdesktop_DATA = \
+	starthere.desktop
+
 EXTRA_DIST = $(nautilusdata_DATA) \
+	$(initialdesktop_DATA) \
 	$(DESKTOP_IN_FILES)			\
 	$(DESKTOP_FILES)			\
 	$(DIRECTORY_IN_FILES)			\
--- nautilus-2.0.7/src/nautilus-application.c	2002-08-29 06:15:42.000000000 -0400
+++ nautilus-2.0.7.new/src/nautilus-application.c	2002-10-25 01:30:43.000000000 -0400
@@ -332,32 +332,42 @@
 }
 
 static gint
-create_starthere_link_callback (gpointer data)
+populate_initial_desktop (gpointer data)
 {
-	char *desktop_path;
-	char *desktop_link_file;
-	char *cmd;
+	char *desktop_path, *initial_desktop_path;
+	char *desktop_uri, *initial_desktop_uri;
+	struct stat stbuf;
+	GnomeVFSResult result;
+	GnomeVFSURI *sourceuri, *targeturi;
 	
 	/* Create default services icon on the desktop */
 	desktop_path = nautilus_get_desktop_directory ();
-	desktop_link_file = g_build_filename (desktop_path,
-					      "starthere.desktop",
-					      NULL);
-
-	cmd = g_strconcat ("/bin/cp ",
-			   NAUTILUS_DATADIR,
-			   "/starthere-link.desktop ",
-			   desktop_link_file,
-			   NULL);
-
-	if (system (cmd) != 0) {
-		g_warning ("Failed to execute command '%s'\n", cmd);
-	}
-	
-	g_free (desktop_path);
-	g_free (desktop_link_file);
-	g_free (cmd);
-	
+	initial_desktop_path = g_build_filename(NAUTILUS_DATADIR, "initial-desktop", NULL);
+
+	if (stat (initial_desktop_path, &stbuf))
+		/* It doesn't exist (or something), just ignore it */
+		goto cleanup;
+
+	initial_desktop_uri = gnome_vfs_get_uri_from_local_path (initial_desktop_path);
+	desktop_uri = gnome_vfs_get_uri_from_local_path (desktop_path);
+	sourceuri = gnome_vfs_uri_new (initial_desktop_uri);
+	targeturi = gnome_vfs_uri_new (desktop_uri);
+
+	result = gnome_vfs_xfer_uri (sourceuri, targeturi, GNOME_VFS_XFER_RECURSIVE | GNOME_VFS_XFER_FOLLOW_LINKS_RECURSIVE,
+				     GNOME_VFS_XFER_ERROR_MODE_ABORT, GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE,
+				     NULL, NULL);
+	if (result != GNOME_VFS_OK) {
+		char *msg = g_strdup_printf (_("Couldn't copy initial desktop files: %s"),
+					     gnome_vfs_result_to_string (result));
+		eel_show_error_dialog (msg, NULL, NULL);
+	}
+		
+	g_free (initial_desktop_uri);
+	g_free (desktop_uri);
+	gnome_vfs_uri_unref (sourceuri);
+	gnome_vfs_uri_unref (targeturi);
+cleanup:
+	g_free (initial_desktop_path);
 	return FALSE;
 }
 
@@ -408,7 +418,7 @@
 		 * itself. Otherwise we may spawn a second nautilus
 		 * process when looking for a metadata factory..
 		 */
-		g_idle_add (create_starthere_link_callback, NULL);
+		g_idle_add (populate_initial_desktop, NULL);
 		nautilus_set_first_time_file_flag ();
 	}
 
--- nautilus-2.0.7/data/Makefile.in	2002-09-13 20:22:01.000000000 -0400
+++ nautilus-2.0.7.new/data/Makefile.in	2002-10-25 13:52:03.000000000 -0400
@@ -1,8 +1,6 @@
-# Makefile.in generated by automake 1.6.3 from Makefile.am.
-# @configure_input@
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
 
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -12,7 +10,7 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
- SET_MAKE@
+
 SHELL = @SHELL@
 
 srcdir = @srcdir@
@@ -33,9 +31,13 @@
 mandir = @mandir@
 includedir = @includedir@
 oldincludedir = /usr/include
+
+DESTDIR =
+
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
+
 top_builddir = ..
 
 ACLOCAL = @ACLOCAL@
@@ -43,16 +45,12 @@
 AUTOMAKE = @AUTOMAKE@
 AUTOHEADER = @AUTOHEADER@
 
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
 INSTALL_DATA = @INSTALL_DATA@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_HEADER = $(INSTALL_DATA)
 transform = @program_transform_name@
+
 NORMAL_INSTALL = :
 PRE_INSTALL = :
 POST_INSTALL = :
@@ -61,10 +59,7 @@
 POST_UNINSTALL = :
 host_alias = @host_alias@
 host_triplet = @host@
-
-EXEEXT = @EXEEXT@
-OBJEXT = @OBJEXT@
-PATH_SEPARATOR = @PATH_SEPARATOR@
+AMDEPBACKSLASH = @AMDEPBACKSLASH@
 AMTAR = @AMTAR@
 AS = @AS@
 AWK = @AWK@
@@ -84,6 +79,7 @@
 ECHO = @ECHO@
 EEL_REQUIRED = @EEL_REQUIRED@
 ENABLE_PROFILER = @ENABLE_PROFILER@
+EXEEXT = @EXEEXT@
 GCONFTOOL = @GCONFTOOL@
 GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
 GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
@@ -123,11 +119,13 @@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
 MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
 MEDUSA_REQUIRED = @MEDUSA_REQUIRED@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MUSIC_COMPONENT_CFLAGS = @MUSIC_COMPONENT_CFLAGS@
 MUSIC_COMPONENT_LIBS = @MUSIC_COMPONENT_LIBS@
 OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
 ORBIT_CFLAGS = @ORBIT_CFLAGS@
 ORBIT_CONFIG = @ORBIT_CONFIG@
 ORBIT_IDL = @ORBIT_IDL@
@@ -142,133 +140,117 @@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 XML_REQUIRED = @XML_REQUIRED@
-X_CFLAGS = @X_CFLAGS@
-X_EXTRA_LIBS = @X_EXTRA_LIBS@
-X_LIBS = @X_LIBS@
-X_PRE_LIBS = @X_PRE_LIBS@
 am__include = @am__include@
 am__quote = @am__quote@
 install_sh = @install_sh@
+
 NULL = 
 
-DESKTOP_IN_FILES = applications.desktop.in		\
-			starthere.desktop.in		\
-			sysconfig.desktop.in		\
-			preferences.desktop.in		\
-			serverconfig.desktop.in		\
-			starthere-link.desktop.in	\
-			$(NULL)
+DESKTOP_IN_FILES = applications.desktop.in					starthere.desktop.in					sysconfig.desktop.in					preferences.desktop.in					serverconfig.desktop.in					starthere-link.desktop.in				$(NULL)
 
 
-DIRECTORY_IN_FILES = serverconfig.directory.in	\
-			starthere.directory.in		\
-			sysconfig.directory.in		\
-			$(NULL)
+DIRECTORY_IN_FILES = serverconfig.directory.in				starthere.directory.in					sysconfig.directory.in					$(NULL)
 
 
 DESKTOP_FILES = $(DESKTOP_IN_FILES:.in=)
 DIRECTORY_FILES = $(DIRECTORY_IN_FILES:.directory.in=.directory)
 
 startheredir = $(sysconfdir)/X11/starthere
-starthere_DATA = applications.desktop	\
-			sysconfig.desktop	\
-			preferences.desktop	\
-			serverconfig.desktop	\
-			$(NULL)
+starthere_DATA = applications.desktop				sysconfig.desktop				preferences.desktop				serverconfig.desktop				$(NULL)
 
 
 nautilusdatadir = $(datadir)/nautilus
 
-nautilusdata_DATA = \
-	browser.xml 			\
-	static_bookmarks.xml 		\
-	nautilus-extras.placeholder 	\
-	nautilus-suggested.placeholder 	\
-	starthere.desktop		\
-	starthere-link.desktop		\
-	$(NULL)
-
-
-EXTRA_DIST = $(nautilusdata_DATA) \
-	$(DESKTOP_IN_FILES)			\
-	$(DESKTOP_FILES)			\
-	$(DIRECTORY_IN_FILES)			\
-	$(DIRECTORY_FILES)			\
-	$(NULL)
-
-
-SUBDIRS = \
-	emblems \
-	patterns \
-	$(NULL)
+nautilusdata_DATA =  	browser.xml 				static_bookmarks.xml 			nautilus-extras.placeholder 		nautilus-suggested.placeholder 		starthere-link.desktop			$(NULL)
+
+
+initialdesktopdir = $(nautilusdatadir)/initial-desktop
+
+initialdesktop_DATA =  	starthere.desktop
+
+
+EXTRA_DIST = $(nautilusdata_DATA) 	$(initialdesktop_DATA) 	$(DESKTOP_IN_FILES)				$(DESKTOP_FILES)				$(DIRECTORY_IN_FILES)				$(DIRECTORY_FILES)				$(NULL)
+
+
+SUBDIRS =  	emblems 	patterns 	$(NULL)
 
-subdir = data
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-DIST_SOURCES =
-DATA = $(nautilusdata_DATA) $(starthere_DATA)
+CONFIG_HEADER = ../config.h ../_AM_File, ../[$2], ../[$3])]
+CONFIG_CLEAN_FILES = 
+DATA =  $(initialdesktop_DATA) $(nautilusdata_DATA) $(starthere_DATA)
+
+DIST_COMMON =  Makefile.am Makefile.in
 
 
-RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
-	uninstall-info-recursive all-recursive install-data-recursive \
-	install-exec-recursive installdirs-recursive install-recursive \
-	uninstall-recursive check-recursive installcheck-recursive
-DIST_COMMON = Makefile.am Makefile.in
-DIST_SUBDIRS = $(SUBDIRS)
-all: all-recursive
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
 .SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  data/Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile
 
-mostlyclean-libtool:
-	-rm -f *.lo
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
-clean-libtool:
-	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-nautilusdataDATA_INSTALL = $(INSTALL_DATA)
+install-initialdesktopDATA: $(initialdesktop_DATA)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(initialdesktopdir)
+	@list='$(initialdesktop_DATA)'; for p in $$list; do \
+	  if test -f $(srcdir)/$$p; then \
+	    echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(initialdesktopdir)/$$p"; \
+	    $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(initialdesktopdir)/$$p; \
+	  else if test -f $$p; then \
+	    echo " $(INSTALL_DATA) $$p $(DESTDIR)$(initialdesktopdir)/$$p"; \
+	    $(INSTALL_DATA) $$p $(DESTDIR)$(initialdesktopdir)/$$p; \
+	  fi; fi; \
+	done
+
+uninstall-initialdesktopDATA:
+	@$(NORMAL_UNINSTALL)
+	list='$(initialdesktop_DATA)'; for p in $$list; do \
+	  rm -f $(DESTDIR)$(initialdesktopdir)/$$p; \
+	done
+
 install-nautilusdataDATA: $(nautilusdata_DATA)
 	@$(NORMAL_INSTALL)
 	$(mkinstalldirs) $(DESTDIR)$(nautilusdatadir)
 	@list='$(nautilusdata_DATA)'; for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  f="`echo $$p | sed -e 's|^.*/||'`"; \
-	  echo " $(nautilusdataDATA_INSTALL) $$d$$p $(DESTDIR)$(nautilusdatadir)/$$f"; \
-	  $(nautilusdataDATA_INSTALL) $$d$$p $(DESTDIR)$(nautilusdatadir)/$$f; \
+	  if test -f $(srcdir)/$$p; then \
+	    echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(nautilusdatadir)/$$p"; \
+	    $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(nautilusdatadir)/$$p; \
+	  else if test -f $$p; then \
+	    echo " $(INSTALL_DATA) $$p $(DESTDIR)$(nautilusdatadir)/$$p"; \
+	    $(INSTALL_DATA) $$p $(DESTDIR)$(nautilusdatadir)/$$p; \
+	  fi; fi; \
 	done
 
 uninstall-nautilusdataDATA:
 	@$(NORMAL_UNINSTALL)
-	@list='$(nautilusdata_DATA)'; for p in $$list; do \
-	  f="`echo $$p | sed -e 's|^.*/||'`"; \
-	  echo " rm -f $(DESTDIR)$(nautilusdatadir)/$$f"; \
-	  rm -f $(DESTDIR)$(nautilusdatadir)/$$f; \
+	list='$(nautilusdata_DATA)'; for p in $$list; do \
+	  rm -f $(DESTDIR)$(nautilusdatadir)/$$p; \
 	done
-starthereDATA_INSTALL = $(INSTALL_DATA)
+
 install-starthereDATA: $(starthere_DATA)
 	@$(NORMAL_INSTALL)
 	$(mkinstalldirs) $(DESTDIR)$(startheredir)
 	@list='$(starthere_DATA)'; for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  f="`echo $$p | sed -e 's|^.*/||'`"; \
-	  echo " $(starthereDATA_INSTALL) $$d$$p $(DESTDIR)$(startheredir)/$$f"; \
-	  $(starthereDATA_INSTALL) $$d$$p $(DESTDIR)$(startheredir)/$$f; \
+	  if test -f $(srcdir)/$$p; then \
+	    echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(startheredir)/$$p"; \
+	    $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(startheredir)/$$p; \
+	  else if test -f $$p; then \
+	    echo " $(INSTALL_DATA) $$p $(DESTDIR)$(startheredir)/$$p"; \
+	    $(INSTALL_DATA) $$p $(DESTDIR)$(startheredir)/$$p; \
+	  fi; fi; \
 	done
 
 uninstall-starthereDATA:
 	@$(NORMAL_UNINSTALL)
-	@list='$(starthere_DATA)'; for p in $$list; do \
-	  f="`echo $$p | sed -e 's|^.*/||'`"; \
-	  echo " rm -f $(DESTDIR)$(startheredir)/$$f"; \
-	  rm -f $(DESTDIR)$(startheredir)/$$f; \
+	list='$(starthere_DATA)'; for p in $$list; do \
+	  rm -f $(DESTDIR)$(startheredir)/$$p; \
 	done
 
 # This directory's subdirectories are mostly independent; you can cd
@@ -277,8 +259,13 @@
 # (1) if the variable is set in `config.status', edit `config.status'
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@set fnord $$MAKEFLAGS; amf=$$2; \
+
+ SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive  \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+	@set fnord $(MAKEFLAGS); amf=$$2; \
 	dot_seen=no; \
 	target=`echo $@ | sed s/-recursive//`; \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -298,18 +285,13 @@
 
 mostlyclean-recursive clean-recursive distclean-recursive \
 maintainer-clean-recursive:
-	@set fnord $$MAKEFLAGS; amf=$$2; \
+	@set fnord $(MAKEFLAGS); amf=$$2; \
 	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
+	rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+	  rev="$$subdir $$rev"; \
+	  test "$$subdir" != "." || dot_seen=yes; \
 	done; \
-	rev="$$rev ."; \
+	test "$$dot_seen" = "no" && rev=". $$rev"; \
 	target=`echo $@ | sed s/-recursive//`; \
 	for subdir in $$rev; do \
 	  echo "Making $$target in $$subdir"; \
@@ -326,174 +308,144 @@
 	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
 	done
 
-ETAGS = etags
-ETAGSFLAGS =
-
 tags: TAGS
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
-	mkid -fID $$unique
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
 
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
 	tags=; \
 	here=`pwd`; \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
+   if test "$$subdir" = .; then :; else \
 	    test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
-	  fi; \
+   fi; \
 	done; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
-	test -z "$(ETAGS_ARGS)$$tags$$unique" \
-	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	     $$tags $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags  $$unique $(LISP))
+
+mostlyclean-tags:
+
+clean-tags:
 
 distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+	-rm -f TAGS ID
 
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = data
 
 distdir: $(DISTFILES)
-	@list='$(DISTFILES)'; for file in $$list; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu data/Makefile
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
 	  if test -d $$d/$$file; then \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
 	  else \
 	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
-	    || exit 1; \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
 	  fi; \
 	done
-	list='$(SUBDIRS)'; for subdir in $$list; do \
+	for subdir in $(SUBDIRS); do \
 	  if test "$$subdir" = .; then :; else \
 	    test -d $(distdir)/$$subdir \
 	    || mkdir $(distdir)/$$subdir \
 	    || exit 1; \
-	    (cd $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$(top_distdir)" \
-	        distdir=../$(distdir)/$$subdir \
-	        distdir) \
+	    chmod 777 $(distdir)/$$subdir; \
+	    (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
 	      || exit 1; \
 	  fi; \
 	done
+info-am:
+info: info-recursive
+dvi-am:
+dvi: dvi-recursive
 check-am: all-am
 check: check-recursive
-all-am: Makefile $(DATA)
-installdirs: installdirs-recursive
-installdirs-am:
-	$(mkinstalldirs) $(DESTDIR)$(nautilusdatadir) $(DESTDIR)$(startheredir)
-
-install: install-recursive
+installcheck-am:
+installcheck: installcheck-recursive
+install-exec-am:
 install-exec: install-exec-recursive
+
+install-data-am: install-initialdesktopDATA install-nautilusdataDATA \
+		install-starthereDATA install-data-local
 install-data: install-data-recursive
-uninstall: uninstall-recursive
 
 install-am: all-am
 	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
+install: install-recursive
+uninstall-am: uninstall-initialdesktopDATA uninstall-nautilusdataDATA \
+		uninstall-starthereDATA
+uninstall: uninstall-recursive
+all-am: Makefile $(DATA)
+all-redirect: all-recursive
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs: installdirs-recursive
+installdirs-am:
+	$(mkinstalldirs)  $(DESTDIR)$(initialdesktopdir) \
+		$(DESTDIR)$(nautilusdatadir) $(DESTDIR)$(startheredir)
+
+
 mostlyclean-generic:
 
 clean-generic:
 
 distclean-generic:
 	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
 
 maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
+mostlyclean-am:  mostlyclean-tags mostlyclean-generic
 
-distclean: distclean-recursive
-
-distclean-am: clean-am distclean-generic distclean-libtool \
-	distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-info: info-recursive
-
-info-am:
+mostlyclean: mostlyclean-recursive
 
-install-data-am: install-data-local install-nautilusdataDATA \
-	install-starthereDATA
+clean-am:  clean-tags clean-generic mostlyclean-am
 
-install-exec-am:
+clean: clean-recursive
 
-install-info: install-info-recursive
+distclean-am:  distclean-tags distclean-generic clean-am
+	-rm -f libtool
 
-install-man:
+distclean: distclean-recursive
 
-installcheck-am:
+maintainer-clean-am:  maintainer-clean-tags maintainer-clean-generic \
+		distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
 
 maintainer-clean: maintainer-clean-recursive
 
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-uninstall-am: uninstall-info-am uninstall-nautilusdataDATA \
-	uninstall-starthereDATA
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
-	clean-generic clean-libtool clean-recursive distclean \
-	distclean-generic distclean-libtool distclean-recursive \
-	distclean-tags distdir dvi dvi-am dvi-recursive info info-am \
-	info-recursive install install-am install-data install-data-am \
-	install-data-local install-data-recursive install-exec \
-	install-exec-am install-exec-recursive install-info \
-	install-info-am install-info-recursive install-man \
-	install-nautilusdataDATA install-recursive \
-	install-starthereDATA install-strip installcheck \
-	installcheck-am installdirs installdirs-am \
-	installdirs-recursive maintainer-clean maintainer-clean-generic \
-	maintainer-clean-recursive mostlyclean mostlyclean-generic \
-	mostlyclean-libtool mostlyclean-recursive tags tags-recursive \
-	uninstall uninstall-am uninstall-info-am \
-	uninstall-info-recursive uninstall-nautilusdataDATA \
-	uninstall-recursive uninstall-starthereDATA
+.PHONY: uninstall-initialdesktopDATA install-initialdesktopDATA \
+uninstall-nautilusdataDATA install-nautilusdataDATA \
+uninstall-starthereDATA install-starthereDATA install-data-recursive \
+uninstall-data-recursive install-exec-recursive \
+uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+all-recursive check-recursive installcheck-recursive info-recursive \
+dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-local install-data-am install-data install-am \
+install uninstall-am uninstall all-redirect all-am all installdirs-am \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
 
 
 @INTLTOOL_DESKTOP_RULE@
@@ -506,6 +458,7 @@
 	$(INSTALL_DATA) starthere.directory $(DESTDIR)$(sysconfdir)/X11/starthere/.directory
 	$(INSTALL_DATA) sysconfig.directory $(DESTDIR)$(sysconfdir)/X11/sysconfig/.directory
 	$(INSTALL_DATA) serverconfig.directory $(DESTDIR)$(sysconfdir)/X11/serverconfig/.directory
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:


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