Mail Archives: cygwin/2002/07/20/15:12:56
--0-790665163-1027192369=:8545
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
First off, I'm not the best at shell programming, but I usually get by.
That being said, it is possible that the problem I'm having is because of
a mistake that bash never caught before. The place that this occurs is in
the install section of my berkeley db Makefile. Specifically it is a
snippet which will convert the file name from "foo.exe" to
"xxn.n_foo.exe", upon installation. Anyhow, what happens is make bombs
out saying:
Installing DB utilities: /usr/src/v1/db-3.1.17/.inst/usr/bin ...
Syntax error: end of file unexpected (expecting "fi")
make: *** [install_utilities] Error 2
If anyone can confirm that this is a valid bash script (and therefore a
bug with bash) or point out where I'm going awry (and therefore a bug with
me), I'd greatly appreciate it. If someone can suggest a better way of
achieving the desired effect, I'd love that too. At the very least I hope
that a fresh pair of eyes might catch something I possible missed...
Attached is the script and a trial run with "make -n install". Thanks in
advance!
Cheers,
Nicholas
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
--0-790665163-1027192369=:8545
Content-Type: text/plain; name="install-stuff.txt"
Content-Description: install-stuff.txt
Content-Disposition: inline; filename="install-stuff.txt"
The script snippet in question is:
@echo "Installing DB utilities: $(DESTDIR)$(bindir) ..."
@test -d $(DESTDIR)$(bindir) || \
($(mkdir) -p $(DESTDIR)$(bindir) && $(chmod) $(dmode) $(DESTDIR)$(bindir))
@list='$(PROGS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
|| test -f $$p1 \
; then \
p1=`echo "$$p1" | sed -e 's,^.*/,,'`; \
f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALLER) $$p $(DESTDIR)$(bindir)/$$f"; \
(cd $(DESTDIR)$(bindir) && $(rm) -f $$f); \
$(INSTALLER) $$p $(DESTDIR)$(bindir)/$$f && \
(cd $(DESTDIR)$(bindir) && $(chmod) $(emode) $$f) && \
(cd $(DESTDIR)$(bindir) && (test ! -f $(strip) || $(strip) $$f)); \
else :; fi; \
done
When running "make -n install" this is how that script translates:
echo "Installing DB utilities: /usr/src/v1/db-3.1.17/.inst/usr/bin ..."
test -d /usr/src/v1/db-3.1.17/.inst/usr/bin || \
(/usr/bin/mkdir -p /usr/src/v1/db-3.1.17/.inst/usr/bin && /usr/bin/chmod 755 /usr/src/v1/db-3.1.17/.inst/usr/bin)
list='db_archive.exe db_checkpoint.exe db_deadlock.exe db_dump.exe db_load.exe db_printlog.exe db_recover.exe db_stat.exe db_upgrade.exe db_verify.exe'; for p in $list; do \
p1=`echo $p|sed 's/.exe$//'`; \
if test -f $p \
|| test -f $p1 \
; then \
p1=`echo "$p1" | sed -e 's,^.*/,,'`; \
f=`echo $p1|sed 's,^db_,db3.1_,;s/$/.exe/'`; \
echo " /usr/bin/sh ./libtool --mode=install /usr/bin/install -c $p /usr/src/v1/db-3.1.17/.inst/usr/bin/$f"; \
(cd /usr/src/v1/db-3.1.17/.inst/usr/bin && /usr/bin/rm -f $f); \
/usr/bin/sh ./libtool --mode=install /usr/bin/install -c $p /usr/src/v1/db-3.1.17/.inst/usr/bin/$f && \
(cd /usr/src/v1/db-3.1.17/.inst/usr/bin && /usr/bin/chmod 755 $f) && \
(cd /usr/src/v1/db-3.1.17/.inst/usr/bin && (test ! -f /usr/bin/strip || /usr/bin/strip $f)); \
else :; fi; \
done
--0-790665163-1027192369=:8545
Content-Type: text/plain; charset=us-ascii
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
--0-790665163-1027192369=:8545--
- Raw text -