Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [joist-dev] make/sh ugliness

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

Re: [joist-dev] make/sh ugliness

Author edk
Full name Ed Korthof
Date 2000-12-18 17:28:27 PST
Message On Mon, Dec 18, 2000 at 05:09:03PM -0800, Jon Stevens wrote:
> on 12/18/2000 4:52 PM, "Ed Korthof" <edk at collab dot net> wrote:
>
> > for f in $(HTTPD_CONF_FILES); do \
> > echo " $${f}"; \
> > if [ -f $(HTTPD_CONF_DIR)/$${f} ]; then \
> > mv $(HTTPD_CONF_DIR)/$${f} $(HTTPD_CONF_DIR)/$${f}.orig; \
> > fi; \
> > cp -f $${f}* $(HTTPD_CONF_DIR); \
> > done; \
> > dies unpleasantly if $(HTTPD_CONF_FILES) is empty, as it is in
> > joist/conf/Makefile (HTTPD_CONF_FILES is empty in the corresponding
> > Makefile.config).
>
> Ok, so then why not:
>
> if [ ! -z "$(HTTPD_CONF_FILES)" ] ; then
> for f in $(HTTPD_CONF_FILES); do \
> echo " $${f}"; \
> if [ -f $(HTTPD_CONF_DIR)/$${f} ]; then \
> mv $(HTTPD_CONF_DIR)/$${f} $(HTTPD_CONF_DIR)/$${f}.orig; \
> fi; \
> cp -f $${f}* $(HTTPD_CONF_DIR); \
> done; \
> fi
>
> ??. Or am I missing the point.

that would work. i find it kind of ugly (in the same was as the second
solution which i outlined, though less so); but i can live with it. i
still don't think that including this block in Makefile is all that
helpful, when there's no reason to believe we'll ever use it; and it may
be confusing.

but i don't care enough to argue those now; unless someone else has a
strong opinion, i'll use the pattern jon outlined.

cheers --

ed
--
   +=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=
   | Ed Korthof | edk at collab dot net | 650-228-2527 |
   +=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=

« Previous message in topic | 3 of 5 | Next message in topic »

Messages

Show all messages in topic

make/sh ugliness edk Ed Korthof 2000-12-18 16:52:30 PST
     Re: [joist-dev] make/sh ugliness Jon Stevens <jon at latchkey dot com> Jon Stevens <jon at latchkey dot com> 2000-12-18 17:09:03 PST
         Re: [joist-dev] make/sh ugliness edk Ed Korthof 2000-12-18 17:28:27 PST
             Re: [joist-dev] make/sh ugliness Jon Stevens <jon at latchkey dot com> Jon Stevens <jon at latchkey dot com> 2000-12-18 17:35:51 PST
                 Re: [joist-dev] make/sh ugliness edk Ed Korthof 2000-12-18 17:46:30 PST
Messages per page: