@@ -8,6 +8,12 @@ ifneq (,$(filter install, $(MAKECMDGOALS)))
8
8
override PROFILE: =release
9
9
endif
10
10
11
+ # Needed for the foreach loops to split each loop into a separate command
12
+ define newline
13
+
14
+
15
+ endef
16
+
11
17
PROFILE_CMD :=
12
18
ifeq ($(PROFILE ) ,release)
13
19
PROFILE_CMD = --release
@@ -340,41 +346,43 @@ distclean: clean
340
346
manpages : build-coreutils
341
347
mkdir -p $(BUILDDIR ) /man/
342
348
$(foreach prog, $(INSTALLEES ) , \
343
- $(BUILDDIR ) /coreutils manpage $(prog ) > $(BUILDDIR ) /man/$(PROG_PREFIX )$(prog ) .1; \
349
+ $(BUILDDIR ) /coreutils manpage $(prog ) > $(BUILDDIR ) /man/$(PROG_PREFIX )$(prog ) .1 $( newline ) \
344
350
)
345
351
346
352
completions : build-coreutils
347
353
mkdir -p $(BUILDDIR ) /completions/zsh $(BUILDDIR ) /completions/bash $(BUILDDIR ) /completions/fish
348
354
$(foreach prog, $(INSTALLEES ) , \
349
- $(BUILDDIR ) /coreutils completion $(prog ) zsh > $(BUILDDIR ) /completions/zsh/_$(PROG_PREFIX )$(prog ) ; \
350
- $(BUILDDIR ) /coreutils completion $(prog ) bash > $(BUILDDIR ) /completions/bash/$(PROG_PREFIX )$(prog ) ; \
351
- $(BUILDDIR ) /coreutils completion $(prog ) fish > $(BUILDDIR ) /completions/fish/$(PROG_PREFIX )$(prog ) .fish; \
355
+ $(BUILDDIR ) /coreutils completion $(prog ) zsh > $(BUILDDIR ) /completions/zsh/_$(PROG_PREFIX )$(prog ) $( newline ) \
356
+ $(BUILDDIR ) /coreutils completion $(prog ) bash > $(BUILDDIR ) /completions/bash/$(PROG_PREFIX )$(prog ) $( newline ) \
357
+ $(BUILDDIR ) /coreutils completion $(prog ) fish > $(BUILDDIR ) /completions/fish/$(PROG_PREFIX )$(prog ) .fish $( newline ) \
352
358
)
353
359
354
360
install : build manpages completions
355
361
mkdir -p $(INSTALLDIR_BIN )
356
362
ifeq (${MULTICALL}, y)
357
363
$(INSTALL) $(BUILDDIR)/coreutils $(INSTALLDIR_BIN)/$(PROG_PREFIX)coreutils
358
- cd $(INSTALLDIR_BIN) && $(foreach prog, $(filter-out coreutils, $(INSTALLEES)), \
359
- ln -fs $(PROG_PREFIX)coreutils $(PROG_PREFIX)$(prog) &&) :
364
+ $(foreach prog, $(filter-out coreutils, $(INSTALLEES)), \
365
+ cd $(INSTALLDIR_BIN) && ln -fs $(PROG_PREFIX)coreutils $(PROG_PREFIX)$(prog) $(newline) \
366
+ )
360
367
$(if $(findstring test,$(INSTALLEES)), cd $(INSTALLDIR_BIN) && ln -fs $(PROG_PREFIX)coreutils $(PROG_PREFIX)[)
361
368
else
362
369
$(foreach prog, $(INSTALLEES), \
363
- $(INSTALL) $(BUILDDIR)/$(prog) $(INSTALLDIR_BIN)/$(PROG_PREFIX)$(prog);)
370
+ $(INSTALL) $(BUILDDIR)/$(prog) $(INSTALLDIR_BIN)/$(PROG_PREFIX)$(prog) $(newline) \
371
+ )
364
372
$(if $(findstring test,$(INSTALLEES)), $(INSTALL) $(BUILDDIR)/test $(INSTALLDIR_BIN)/$(PROG_PREFIX)[)
365
373
endif
366
374
mkdir -p $(DESTDIR)$(DATAROOTDIR)/man/man1
367
375
$(foreach prog, $(INSTALLEES), \
368
- $(INSTALL) $(BUILDDIR)/man/$(PROG_PREFIX)$(prog).1 $(DESTDIR)$(DATAROOTDIR)/man/man1/; \
376
+ $(INSTALL) $(BUILDDIR)/man/$(PROG_PREFIX)$(prog).1 $(DESTDIR)$(DATAROOTDIR)/man/man1/ $(newline) \
369
377
)
370
378
371
379
mkdir -p $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions
372
380
mkdir -p $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions
373
381
mkdir -p $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d
374
382
$(foreach prog, $(INSTALLEES), \
375
- $(INSTALL) $(BUILDDIR)/completions/zsh/_$(PROG_PREFIX)$(prog) $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions/; \
376
- $(INSTALL) $(BUILDDIR)/completions/bash/$(PROG_PREFIX)$(prog) $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions/; \
377
- $(INSTALL) $(BUILDDIR)/completions/fish/$(PROG_PREFIX)$(prog).fish $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d/; \
383
+ $(INSTALL) $(BUILDDIR)/completions/zsh/_$(PROG_PREFIX)$(prog) $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions/ $(newline) \
384
+ $(INSTALL) $(BUILDDIR)/completions/bash/$(PROG_PREFIX)$(prog) $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions/ $(newline) \
385
+ $(INSTALL) $(BUILDDIR)/completions/fish/$(PROG_PREFIX)$(prog).fish $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d/ $(newline) \
378
386
)
379
387
380
388
uninstall :
0 commit comments