[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Determine if variable exists on make side from sh side
From: |
PATTON, BILLY \(SBCSI\) |
Subject: |
RE: Determine if variable exists on make side from sh side |
Date: |
Mon, 10 Apr 2006 14:05:37 -0500 |
Here's where I'm at now:
REFRESH+ldb+celltools+pub := dogs
all :
@list=REFRESH+ldb+celltools+pub ;\
echo "list = '$$list'" ;\
echo "contents = '$($$list)'" ; \
def=$(origin $$list); \
echo "def = $$def" ; \
if ! [ "$$def" = "undefined" ] ; then \
echo "if defined"; \
else \
echo "else undefined" ; \
fi
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On Behalf
> Of PATTON, BILLY (SBCSI)
> Sent: Monday, April 10, 2006 1:03 PM
> To: address@hidden
> Subject: Determine if variable exists on make side from sh side
>
>
> Here is what I have:
>
> all :
> @list=REFRESH+ldb+celltools+pub ;\
> if ! [ -z "$($list)" ] ; then \
> echo "list = '$$list'"; \
> fi
>
>
> I need to determine if the variable REFRESH+ldb+celltools+pub exists
> in the make world. This name is normally generated for values passed
> in to a define.
> I believe that the -z will tell if a sh variable has no
> value, but that
> refers to a sh variable.
> I need for sh functions to determine if a make variable exists.
>
>
>
> _______________________________________________
> Help-make mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-make
>