[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dh_make debian/rules clean target

On Thu, Sep 12, 2002 at 06:11:27PM -0500, Adam Heath wrote:
> if $(wildcard /usr/share/misc/config.sub)
> 	cp -f /usr/share/misc/config.sub config.sub
> endif
> if $(wildcard /usr/share/misc/config.guess)
> 	cp -f /usr/share/misc/config.guess config.guess
> endif

Uhm ... I can't figure out how the above code can work; sh conditional
are like "if ... fi", while Makefile conditional are like "ifeq ...
My better approximations are:

  # using bash conditionals

	if ! [ -z "$(wildcard /usr/share/misc/config.sub)" ]; then	\
		cp -f /usr/share/misc/config.sub config.sub \


  # using make conditionals

  ifneq ($(wildcard /usr/share/misc/config.sub),)
    cp -f /usr/share/misc/config.sub config.sub


Stefano Zacchiroli - undergraduate student of CS @ Univ. Bologna, Italy
zack@cs.unibo.it | ICQ# 33538863 | http://www.cs.unibo.it/~zacchiro
"I know you believe you understood what you think I said, but I am not
sure you realize that what you heard is not what I meant!" -- G.Romney

Attachment: pgpbUYrQAZ4cA.pgp
Description: PGP signature

Reply to: