Login | Register
My pages Projects Community openCollabNet

Discussions > dev > make/sh ugliness

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

make/sh ugliness

Author edk
Full name Ed Korthof
Date 2000-12-18 16:52:30 PST
Message hi --

while trying to make our software work on SuSE i encounter issues
similar to the ones which i encountered on Solaris, with makefiles.
specifically, blocks like the following
        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).

there are two solutions which i can suggest. my preference is to remove
blocks like these -- joist has never had any httpd conf files, and it's
never likely to need any. afaict the block above was added for symetry
w/ helm. to quote kmaples -- i'd rather have fewer confusing and unused
blocks of code to wade through when tracking something down.

but i can see how taking out & adding back such blocks is a bit annoying
-- it'd be nice if all you had to do to change the behavior was to
change the Makefile.config. an alternate is changing the block above
to:

        for f in "$(HTTPD_CONF_FILES)"; do \
          if [ -z "$f" ] ; then break ; fi ; \
          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; \

this works on SuSE and Solaris; it may or may not work on other OSes.
it's ugly in its own way.

really -- i'd rather switch to ant. right now. but i don't have time
to do any such thing; so i just want to have a pattern to apply for the
short term, for making our software work with OSes other than RH.

thanks --

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

« Previous message in topic | 1 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: