[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Proposed patch: Unroll installation loops
From: |
Matthias Neeracher |
Subject: |
Proposed patch: Unroll installation loops |
Date: |
Sun, 29 Aug 2004 22:48:45 -0700 |
lilypond uses the $(foreach) facility of gnumake in several places in
its installation. While I'm sure this is a little bit more efficient,
it creates problems on MacOS, where due to the fink build setup, paths
are often about 30 characters longer: Since foreach creates a single
shell line for the whole installation command, the resulting line
sometimes exceeded the maximum permissible argument size.
I therefore had to rewrite the $(foreach) statements in terms of
regular shell "for" loops. This code has been in use in MacOS X
lilypond for a few months.
Matthias
diff -ru
lilypond-2.3.13-orig/stepmake/stepmake/install-out-targets.make
lilypond-2.3.13/stepmake/stepmake/install-out-targets.make
---
lilypond-2.3.13-orig/stepmake/stepmake/install-out-targets.make 2004
-08-29 17:07:03.000000000 -0700
+++
lilypond-2.3.13/stepmake/stepmake/install-out-targets.make 2004-08-29
17:07:25.000000000 -0700
@@ -6,13 +6,13 @@
# urg, parameterise
local-install-outfiles: $(INSTALLATION_OUT_FILES) $(foreach suff,
$(INSTALLATION_OUT_SUFFIXES), $(INSTALLATION_OUT_FILES$(suff)))
-$(INSTALL) -d $(INSTALLATION_OUT_DIR)
- $(foreach i, $(INSTALLATION_OUT_FILES), \
- $(INSTALL) -m 644 $(i) $(INSTALLATION_OUT_DIR)/ && ) true
+ for i in $(INSTALLATION_OUT_FILES) ; do \
+ $(INSTALL) -m 644 $$i $(INSTALLATION_OUT_DIR)/; done
$(foreach suff, $(INSTALLATION_OUT_SUFFIXES), \
($(INSTALL) -d $(INSTALLATION_OUT_DIR$(suff))/ || true) && \
- $(foreach i, $(INSTALLATION_OUT_FILES$(suff)), \
- $(INSTALL) -m 644 $(i) $(INSTALLATION_OUT_DIR$(suff))/ && ) true &&
) true
-
+ for i in $(INSTALLATION_OUT_FILES$(suff)); do \
+ $(INSTALL) -m 644 $$i $(INSTALLATION_OUT_DIR$(suff))/; \
+ done && ) true
local-uninstall: local-uninstall-outfiles local-uninstall-files
diff -ru lilypond-2.3.13-orig/stepmake/stepmake/install-targets.make
lilypond-2.3.13/stepmake/stepmake/install-targets.make
---
lilypond-2.3.13-orig/stepmake/stepmake/install-targets.make 2004-08-29
17:07:03.000000000 -0700
+++ lilypond-2.3.13/stepmake/stepmake/install-targets.make 2004-08-29
17:07:25.000000000 -0700
@@ -7,12 +7,13 @@
local-install-files: $(INSTALLATION_FILES)
$(PRE_INSTALL)
-$(INSTALL) -d $(INSTALLATION_DIR)
- $(foreach i, $(INSTALLATION_FILES),\
- $(INSTALL) -m 644 $(i) $(INSTALLATION_DIR)/ &&)true
+ for i in $(INSTALLATION_FILES) ; do \
+ $(INSTALL) -m 644 $$i $(INSTALLATION_DIR)/; done
$(foreach suff, $(INSTALLATION_SUFFIXES), \
($(INSTALL) -d $(INSTALLATION_DIR$(suff)) || true) && \
- $(foreach i, $(INSTALLATION_FILES$(suff)), \
- $(INSTALL) -m 644 $(i) $(INSTALLATION_DIR$(suff))/ && )
&& ) true
+ for i in $(INSTALLATION_FILES$(suff)) ; do \
+ $(INSTALL) -m 644 $$i $(INSTALLATION_DIR$(suff))/ ; \
+ done && ) true
$(POST_INSTALL)
local-uninstall: local-uninstall-outfiles local-uninstall-files
- Proposed patch: Unroll installation loops,
Matthias Neeracher <=