From fb759c7b90e58babee49ecac16cc446871ec47cb Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Thu, 14 Apr 2016 17:00:08 -0700 Subject: [PATCH] examples: add DESTDIR support for install. --- src/examples/ecore/Makefile.am | 6 +++--- src/examples/ecore_avahi/Makefile.am | 10 +++++----- src/examples/edje/Makefile.am | 8 ++++---- src/examples/eet/Makefile.am | 6 +++--- src/examples/eina/Makefile.am | 6 +++--- src/examples/eina_cxx/Makefile.am | 4 ++-- src/examples/eio/Makefile.am | 6 +++--- src/examples/eldbus/Makefile.am | 6 +++--- src/examples/elementary/Makefile.am | 9 +++++++-- src/examples/elocation/Makefile.am | 6 +++--- src/examples/emile/Makefile.am | 6 +++--- src/examples/emotion/Makefile.am | 6 +++--- src/examples/eolian_cxx/Makefile.am | 6 +++--- src/examples/ephysics/Makefile.am | 6 +++--- src/examples/ethumb_client/Makefile.am | 6 +++--- src/examples/evas/Makefile.am | 6 +++--- 16 files changed, 54 insertions(+), 49 deletions(-) diff --git a/src/examples/ecore/Makefile.am b/src/examples/ecore/Makefile.am index a8af94f..379f5e0 100644 --- a/src/examples/ecore/Makefile.am +++ b/src/examples/ecore/Makefile.am @@ -331,12 +331,12 @@ clean-local: rm -f $(EXTRA_PROGRAMS) install-examples: - $(MKDIR_P) $(datadir)/ecore/examples - cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(datadir)/ecore/examples + $(MKDIR_P) $(DESTDIR)$(datadir)/ecore/examples + cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(DESTDIR)$(datadir)/ecore/examples uninstall-local: for f in $(SRCS) $(DATA_FILES); do \ - rm -f $(datadir)/ecore/examples/$$f ; \ + rm -f $(DESTDIR)$(datadir)/ecore/examples/$$f ; \ done if ALWAYS_BUILD_EXAMPLES diff --git a/src/examples/ecore_avahi/Makefile.am b/src/examples/ecore_avahi/Makefile.am index fc4b581..793f24b 100644 --- a/src/examples/ecore_avahi/Makefile.am +++ b/src/examples/ecore_avahi/Makefile.am @@ -36,10 +36,10 @@ clean-local: rm -f $(EXTRA_PROGRAMS) install-examples: - $(MKDIR_P) $(datadir)/ecore_avahi/examples - $(install_sh_DATA) -c $(srcdir)/ecore_avahi_browse_example.c $(datadir)/ecore_avahi/examples - $(install_sh_DATA) -c $(srcdir)/ecore_avahi_example.c $(datadir)/ecore_avahi/examples + $(MKDIR_P) $(DESTDIR)$(datadir)/ecore_avahi/examples + $(install_sh_DATA) -c $(srcdir)/ecore_avahi_browse_example.c $(DESTDIR)$(datadir)/ecore_avahi/examples + $(install_sh_DATA) -c $(srcdir)/ecore_avahi_example.c $(DESTDIR)$(datadir)/ecore_avahi/examples uninstall-local: - rm -f $(datadir)/ecore_avahi/examples/ecore_avahi_example.c - rm -f $(datadir)/ecore_avahi/examples/ecore_avahi_browse_example.c + rm -f $(DESTDIR)$(datadir)/ecore_avahi/examples/ecore_avahi_example.c + rm -f $(DESTDIR)$(datadir)/ecore_avahi/examples/ecore_avahi_browse_example.c diff --git a/src/examples/edje/Makefile.am b/src/examples/edje/Makefile.am index 8ffc20a..d0624df 100644 --- a/src/examples/edje/Makefile.am +++ b/src/examples/edje/Makefile.am @@ -209,13 +209,13 @@ clean-local: rm -f $(EXTRA_PROGRAMS) $(EDJS) $(CODEGEN_GENERATED) install-examples: $(EDJS) - $(MKDIR_P) $(datadir)/edje/examples - cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DIST_EDCS) $(DATA_FILES) $(datadir)/edje/examples - cd $(builddir) && $(install_sh_DATA) -c $(EDJS) $(datadir)/edje/examples + $(MKDIR_P) $(DESTDIR)$(datadir)/edje/examples + cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DIST_EDCS) $(DATA_FILES) $(DESTDIR)$(datadir)/edje/examples + cd $(builddir) && $(install_sh_DATA) -c $(EDJS) $(DESTDIR)$(datadir)/edje/examples uninstall-local: for f in $(SRCS) $(DIST_EDCS) $(DATA_FILES); do \ - rm -f $(datadir)/edje/examples/$$f ; \ + rm -f $(DESTDIR)$(datadir)/edje/examples/$$f ; \ done if ALWAYS_BUILD_EXAMPLES diff --git a/src/examples/eet/Makefile.am b/src/examples/eet/Makefile.am index bd5eb78..c2fc688 100644 --- a/src/examples/eet/Makefile.am +++ b/src/examples/eet/Makefile.am @@ -50,12 +50,12 @@ clean-local: rm -f $(EXTRA_PROGRAMS) install-examples: - $(MKDIR_P) $(datadir)/eet/examples - cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(datadir)/eet/examples + $(MKDIR_P) $(DESTDIR)$(datadir)/eet/examples + cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(DESTDIR)$(datadir)/eet/examples uninstall-local: for f in $(SRCS) $(DATA_FILES); do \ - rm -f $(datadir)/eet/examples/$$f ; \ + rm -f $(DESTDIR)$(datadir)/eet/examples/$$f ; \ done if ALWAYS_BUILD_EXAMPLES diff --git a/src/examples/eina/Makefile.am b/src/examples/eina/Makefile.am index 3d27bb5..56eb277 100644 --- a/src/examples/eina/Makefile.am +++ b/src/examples/eina/Makefile.am @@ -163,12 +163,12 @@ clean-local: rm -f $(EXTRA_PROGRAMS) install-examples: - $(MKDIR_P) $(datadir)/eina/examples - cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(datadir)/eina/examples + $(MKDIR_P) $(DESTDIR)$(datadir)/eina/examples + cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(DESTDIR)$(datadir)/eina/examples uninstall-local: for f in $(SRCS) $(DATA_FILES); do \ - rm -f $(datadir)/eina/examples/$$f ; \ + rm -f $(DESTDIR)$(datadir)/eina/examples/$$f ; \ done if ALWAYS_BUILD_EXAMPLES diff --git a/src/examples/eina_cxx/Makefile.am b/src/examples/eina_cxx/Makefile.am index 939d879..5bf319c 100644 --- a/src/examples/eina_cxx/Makefile.am +++ b/src/examples/eina_cxx/Makefile.am @@ -30,11 +30,11 @@ clean-local: install-examples: $(MKDIR_P) $(datadir)/eina_cxx/examples - cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(datadir)/eina_cxx/examples + cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(DESTDIR)$(datadir)/eina_cxx/examples uninstall-local: for f in $(SRCS) $(DATA_FILES); do \ - rm -f $(datadir)/eina_cxx/examples/$$f ; \ + rm -f $(DESTDIR)$(datadir)/eina_cxx/examples/$$f ; \ done if ALWAYS_BUILD_EXAMPLES diff --git a/src/examples/eio/Makefile.am b/src/examples/eio/Makefile.am index ba3bf69..4f5dbcd 100644 --- a/src/examples/eio/Makefile.am +++ b/src/examples/eio/Makefile.am @@ -59,12 +59,12 @@ clean-local: rm -f $(EXTRA_PROGRAMS) install-examples: - $(MKDIR_P) $(datadir)/eio/examples - cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(datadir)/eio/examples + $(MKDIR_P) $(DESTDIR)$(datadir)/eio/examples + cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(DESTDIR)$(datadir)/eio/examples uninstall-local: for f in $(SRCS) $(DATA_FILES); do \ - rm -f $(datadir)/eio/examples/$$f ; \ + rm -f $(DESTDIR)$(datadir)/eio/examples/$$f ; \ done if ALWAYS_BUILD_EXAMPLES diff --git a/src/examples/eldbus/Makefile.am b/src/examples/eldbus/Makefile.am index 65e6254..0bb7a99 100644 --- a/src/examples/eldbus/Makefile.am +++ b/src/examples/eldbus/Makefile.am @@ -90,12 +90,12 @@ clean-local: rm -f $(EXTRA_PROGRAMS) install-examples: - $(MKDIR_P) $(datadir)/eldbus/examples - cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(datadir)/eldbus/examples + $(MKDIR_P) $(DESTDIR)$(datadir)/eldbus/examples + cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(DESTDIR)$(datadir)/eldbus/examples uninstall-local: for f in $(SRCS) $(DATA_FILES); do \ - rm -f $(datadir)/eldbus/examples/$$f ; \ + rm -f $(DESTDIR)$(datadir)/eldbus/examples/$$f ; \ done if ALWAYS_BUILD_EXAMPLES diff --git a/src/examples/elementary/Makefile.am b/src/examples/elementary/Makefile.am index 482893d..3fe1a8b 100644 --- a/src/examples/elementary/Makefile.am +++ b/src/examples/elementary/Makefile.am @@ -581,5 +581,10 @@ EXTRA_DIST = dict.txt layout_example.edc theme_example.edc codegen_example.edc e examples: $(examples_PROGRAMS) install-examples: - $(MKDIR_P) $(datadir)/elementary/examples - cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(datadir)/elementary/examples + $(MKDIR_P) $(DESTDIR)$(datadir)/elementary/examples + cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DESTDIR)$(datadir)/elementary/examples + +uninstall-local: + for f in $(SRCS); do \ + rm -f $(DESTDIR)$(datadir)/elementary/examples/$$f ; \ + done diff --git a/src/examples/elocation/Makefile.am b/src/examples/elocation/Makefile.am index 8998212..5c08d0c 100644 --- a/src/examples/elocation/Makefile.am +++ b/src/examples/elocation/Makefile.am @@ -45,12 +45,12 @@ clean-local: rm -f $(EXTRA_PROGRAMS) install-examples: - $(MKDIR_P) $(datadir)/elocation/examples - cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(datadir)/elocation/examples + $(MKDIR_P) $(DESTDIR)$(datadir)/elocation/examples + cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(DESTDIR)$(datadir)/elocation/examples uninstall-local: for f in $(SRCS) $(DATA_FILES); do \ - rm -f $(datadir)/elocation/examples/$$f ; \ + rm -f $(DESTDIR)$(datadir)/elocation/examples/$$f ; \ done if ALWAYS_BUILD_EXAMPLES diff --git a/src/examples/emile/Makefile.am b/src/examples/emile/Makefile.am index 3377a87..11a6cd5 100644 --- a/src/examples/emile/Makefile.am +++ b/src/examples/emile/Makefile.am @@ -38,12 +38,12 @@ clean-local: rm -f $(EXTRA_PROGRAMS) install-examples: - $(MKDIR_P) $(datadir)/emile/examples - cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(datadir)/emile/examples + $(MKDIR_P) $(DESTDIR)$(datadir)/emile/examples + cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(DESTDIR)$(datadir)/emile/examples uninstall-local: for f in $(SRCS) $(DATA_FILES); do \ - rm -f $(datadir)/emile/examples/$$f ; \ + rm -f $(DESTDIR)$(datadir)/emile/examples/$$f ; \ done if ALWAYS_BUILD_EXAMPLES diff --git a/src/examples/emotion/Makefile.am b/src/examples/emotion/Makefile.am index 15bde92..c5027e8 100644 --- a/src/examples/emotion/Makefile.am +++ b/src/examples/emotion/Makefile.am @@ -49,12 +49,12 @@ clean-local: rm -f $(EXTRA_PROGRAMS) install-examples: - $(MKDIR_P) $(datadir)/emotion/examples - cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(datadir)/emotion/examples + $(MKDIR_P) $(DESTDIR)$(datadir)/emotion/examples + cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(DESTDIR)$(datadir)/emotion/examples uninstall-local: for f in $(SRCS) $(DATA_FILES); do \ - rm -f $(datadir)/emotion/examples/$$f ; \ + rm -f $(DESTDIR)$(datadir)/emotion/examples/$$f ; \ done if ALWAYS_BUILD_EXAMPLES diff --git a/src/examples/eolian_cxx/Makefile.am b/src/examples/eolian_cxx/Makefile.am index cb11ac1..ebc13c2 100644 --- a/src/examples/eolian_cxx/Makefile.am +++ b/src/examples/eolian_cxx/Makefile.am @@ -158,12 +158,12 @@ clean-local: rm -f $(EXTRA_PROGRAMS) $(GENERATED) install-examples: - $(MKDIR_P) $(datadir)/eolian_cxx/examples - cd $(abs_srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(datadir)/eolian_cxx/examples + $(MKDIR_P) $(DESTDIR)$(datadir)/eolian_cxx/examples + cd $(abs_srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(DESTDIR)$(datadir)/eolian_cxx/examples uninstall-local: for f in $(SRCS) $(DATA_FILES); do \ - rm -f $(datadir)/eolian_cxx/examples/$$f ; \ + rm -f $(DESTDIR)$(datadir)/eolian_cxx/examples/$$f ; \ done if ALWAYS_BUILD_EXAMPLES diff --git a/src/examples/ephysics/Makefile.am b/src/examples/ephysics/Makefile.am index fe9bd51..7287c14 100644 --- a/src/examples/ephysics/Makefile.am +++ b/src/examples/ephysics/Makefile.am @@ -81,12 +81,12 @@ clean-local: rm -f $(EXTRA_PROGRAMS) install-examples: - $(MKDIR_P) $(datadir)/ephysics/examples - cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(datadir)/ephysics/examples + $(MKDIR_P) $(DESTDIR)$(datadir)/ephysics/examples + cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DESTDIR)$(datadir)/ephysics/examples uninstall-local: for f in $(SRCS) ; do \ - rm -f $(datadir)/ephysics/examples/$$f ; \ + rm -f $(DESTDIR)$(datadir)/ephysics/examples/$$f ; \ done if ALWAYS_BUILD_EXAMPLES diff --git a/src/examples/ethumb_client/Makefile.am b/src/examples/ethumb_client/Makefile.am index 86f0a20..65ba6a7 100644 --- a/src/examples/ethumb_client/Makefile.am +++ b/src/examples/ethumb_client/Makefile.am @@ -50,12 +50,12 @@ clean-local: rm -f $(EXTRA_PROGRAMS) install-examples: - $(MKDIR_P) $(datadir)/ethumb_client/examples - cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(datadir)/ethumb_client/examples + $(MKDIR_P) $(DESTDIR)$(datadir)/ethumb_client/examples + cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(DESTDIR)$(datadir)/ethumb_client/examples uninstall-local: for f in $(SRCS) $(DATA_FILES); do \ - rm -f $(datadir)/ethumb_client/examples/$$f ; \ + rm -f $(DESTDIR)$(datadir)/ethumb_client/examples/$$f ; \ done if ALWAYS_BUILD_EXAMPLES diff --git a/src/examples/evas/Makefile.am b/src/examples/evas/Makefile.am index 76a3d98..7b61f4f 100644 --- a/src/examples/evas/Makefile.am +++ b/src/examples/evas/Makefile.am @@ -442,12 +442,12 @@ clean-local: rm -f $(EXTRA_PROGRAMS) $(EDJS) install-examples: - $(MKDIR_P) $(datadir)/evas/examples - cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(EDCS) $(DATA_FILES) $(datadir)/evas/examples + $(MKDIR_P) $(DESTDIR)$(datadir)/evas/examples + cd $(srcdir) && $(install_sh_DATA) -c $(SRCS) $(EDCS) $(DATA_FILES) $(DESTDIR)$(datadir)/evas/examples uninstall-local: for f in $(SRCS) $(EDCS) $(DATA_FILES); do \ - rm -f $(datadir)/evas/examples/$$f ; \ + rm -f $(DESTDIR)$(datadir)/evas/examples/$$f ; \ done EXTRA_DIST = $(EDCS) $(DATA_FILES) -- 2.7.4