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

ifeq in an if statement



Hi,

In one package I would like to prevent some binary being strip-ped if
DEB_BUILD_OPTIONS
instruct so.
It's fine if the strip line is:
	@$(STRIP) $(DESTDIR)/sbin/$(GRADM_BIN)
I add the following:
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
        @$(STRIP) $(DESTDIR)/sbin/$(GRADM_BIN)
endif
Works fine. But there's an other strip:
        @if [ -f $(GRADM_PAM) ] ; then \
                echo "Installing gradm_pam..." ; \
                $(INSTALL) -m 4755 $(GRADM_PAM) $(DESTDIR)/sbin ; \
                $(STRIP) $(DESTDIR)/sbin/$(GRADM_PAM) ; \
        fi
If I add findstring like:
        @if [ -f $(GRADM_PAM) ] ; then \
                echo "Installing gradm_pam..." ; \
                $(INSTALL) -m 4755 $(GRADM_PAM) $(DESTDIR)/sbin ; \
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
                $(STRIP) $(DESTDIR)/sbin/$(GRADM_PAM) ; \
endif
        fi
I get:
/bin/sh: -c: line 3: syntax error near unexpected token `,'
/bin/sh: -c: line 3: `ifeq (,)'
make[1]: *** [install] Error 2

What do I miss?

Regards,
Laszlo/GCS


Reply to: