config: Put the -D option as first argument to INSTALL_DATA

Message ID 20250108114330.1097084-1-mark@klomp.org
State Committed
Headers
Series config: Put the -D option as first argument to INSTALL_DATA |

Commit Message

Mark Wielaard Jan. 8, 2025, 11:43 a.m. UTC
  INSTALL_DATA uses the install program to install files. The GNU
coreutils implementation of install takes options anywhere. Other
implementations of install might take options only before the source
and destination arguments.

	* config/Makefile.am (all-local): Move -D option before
	file and directory arguments.

Signed-off-by: Mark Wielaard <mark@klomp.org>
---
 config/Makefile.am | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
  

Comments

Aaron Merey Jan. 10, 2025, 10:31 p.m. UTC | #1
Hi Mark,

On Wed, Jan 8, 2025 at 6:45 AM Mark Wielaard <mark@klomp.org> wrote:
>
> INSTALL_DATA uses the install program to install files. The GNU
> coreutils implementation of install takes options anywhere. Other
> implementations of install might take options only before the source
> and destination arguments.
>
>         * config/Makefile.am (all-local): Move -D option before
>         file and directory arguments.
>
> Signed-off-by: Mark Wielaard <mark@klomp.org>
> ---
>  config/Makefile.am | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/config/Makefile.am b/config/Makefile.am
> index 2dcbe94eaef1..11693ed47dad 100644
> --- a/config/Makefile.am
> +++ b/config/Makefile.am
> @@ -42,9 +42,9 @@ all-local:
>         sed -i 's/{prefix}/prefix/g' profile.fish
>
>  install-data-local:
> -       $(INSTALL_DATA) profile.sh -D $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.sh
> -       $(INSTALL_DATA) profile.csh -D $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.csh
> -       $(INSTALL_DATA) profile.fish -D $(DESTDIR)$(datadir)/fish/vendor_conf.d/debuginfod.fish
> +       $(INSTALL_DATA) -D profile.sh $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.sh
> +       $(INSTALL_DATA) -D profile.csh $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.csh
> +       $(INSTALL_DATA) -D profile.fish $(DESTDIR)$(datadir)/fish/vendor_conf.d/debuginfod.fish
>         mkdir -p $(DESTDIR)$(sysconfdir)/debuginfod
>         if [ -n "@DEBUGINFOD_URLS@" ]; then \
>                 echo "@DEBUGINFOD_URLS@" > $(DESTDIR)$(sysconfdir)/debuginfod/elfutils.urls; \
> --
> 2.47.1
>

LGTM.

Aaron
  

Patch

diff --git a/config/Makefile.am b/config/Makefile.am
index 2dcbe94eaef1..11693ed47dad 100644
--- a/config/Makefile.am
+++ b/config/Makefile.am
@@ -42,9 +42,9 @@  all-local:
 	sed -i 's/{prefix}/prefix/g' profile.fish
 
 install-data-local:
-	$(INSTALL_DATA) profile.sh -D $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.sh
-	$(INSTALL_DATA) profile.csh -D $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.csh
-	$(INSTALL_DATA) profile.fish -D $(DESTDIR)$(datadir)/fish/vendor_conf.d/debuginfod.fish
+	$(INSTALL_DATA) -D profile.sh $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.sh
+	$(INSTALL_DATA) -D profile.csh $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.csh
+	$(INSTALL_DATA) -D profile.fish $(DESTDIR)$(datadir)/fish/vendor_conf.d/debuginfod.fish
 	mkdir -p $(DESTDIR)$(sysconfdir)/debuginfod
 	if [ -n "@DEBUGINFOD_URLS@" ]; then \
 		echo "@DEBUGINFOD_URLS@" > $(DESTDIR)$(sysconfdir)/debuginfod/elfutils.urls; \