httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject [PATCH?] Escaping and make question
Date Tue, 10 Apr 2001 02:00:38 GMT
Here is a question for any make guru out there: is the following patch
valid?

(Let me setup my case for this patch...This is occurring with some
test/ programs I have in my local tree...)

For example, in my Makefile, I have PROGRAMS set to:

PROGRAMS = foo bar baz

This seems to be a valid use of the PROGRAMS environment variable.
In this provided example, the test target builds $(PROGRAMS).  Okay.

But, when I do "make install", only foo is installed.  Looking at
build/install.sh, the first non-option parameter is the src, and
the LAST non-option parameter is set to be the dst (overriden each time).
With the " in PROGRAMS, make tries to execute (excuse paths):

build/install.sh foo bar baz /my/bin/dir

If I understand everything, this isn't correct, shouldn't it invoke: 

build/install.sh foo /my/bin/dir
build/install.sh bar /my/bin/dir
build/install.sh baz /my/bin/dir

Please correct me if I am misunderstanding something.  This patch
removes the double quotes.  If someone has a filename with a space, this
will probably break that.  Thoughts for getting around that? 

Or, should install.sh be modified to accept multiple src arguments?

Thanks.  -- justin

Index: build/rules.mk
===================================================================
RCS file: /home/cvspublic/httpd-2.0/build/rules.mk,v
retrieving revision 1.47
diff -u -r1.47 rules.mk
--- build/rules.mk	2001/04/03 00:29:42	1.47
+++ build/rules.mk	2001/04/10 01:47:29
@@ -173,7 +173,7 @@
 install-p: $(targets) $(install_targets)
 	@if test -n '$(PROGRAMS)'; then \
 		test -d $(bindir) || $(MKINSTALLDIRS) $(bindir); \
-		for i in "$(PROGRAMS)"; do \
+		for i in $(PROGRAMS); do \
 			$(INSTALL_PROGRAM) $$i $(bindir); \
 		done; \
 	fi


Mime
View raw message