[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Help with # in variables and targets
From: |
PATTON, BILLY \(SBCSI\) |
Subject: |
RE: Help with # in variables and targets |
Date: |
Fri, 14 Apr 2006 07:13:17 -0500 |
This seem to work :
xxx := abc\#
define abc
$(1) :
endef
$(warning $(call abc,$(subst #,\#,$(xxx))))
So the # is only a valid comment mark at particular locations.
# $(subst #,\#,$(xxx)))) -> here only one # is recognized as a comment
$(subst #,\#,$(xxx)))) -> no # is recognized as comment.
Guess I didn't remember reading that part about comments.
But I like what it does :)
Good work guys :)
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On Behalf
> Of PATTON, BILLY (SBCSI)
> Sent: Friday, April 14, 2006 6:56 AM
> To: address@hidden
> Subject: Help with # in variables and targets
>
>
> I have this list:
> real_refresh+ldb+infgn+pub :=
> /home/pvcs/pvcs_arch/infgn/pub/ac_error.msv\#
>
> Then I have a rule that's get created through
>
> define refresh_proj_bb_sub_mangled
> $(1)+$(2)+$(3)+$(4)+$(5) :
> endef
> # @if [ $(4) = extra ] ; then \
> # $(CD) $(SRC_TREE)/$(2)/$(3) || exit $? ; \
> # else \
> # $(CD) $(SRC_TREE)/$(2)/$(3)/$(4) || exit $? ;\
> # fi ; \
> # $(EXEC_LOG) -proj $(2) -bb $(3) $(PVCS_GET) -v$(3)$(PVCS_VER)
> $(5) || exit $? ; \
> # name=`$(UMPVCS) $(5)` || exit $? ; \
> # $(TOUCH) $$$$name || exit $?
> $(foreach flow,refresh real_refresh,\
> $(foreach sub,pub shr extra,\
> $(foreach proj,$(PROJECTS),\
> $(foreach bb,$(bb+$(proj)),\
> $(foreach mang,$($(flow)+$(proj)+$(bb)+$(sub)), \
> $(warning $(call
> refresh_proj_bb_sub_mangled,$(flow),$(proj),$(bb),$(sub),$(man
> g))))))))
>
> The warning is showing what is happening when the eval gets finished:
> make.refresh:83:
> real_refresh+ldb+infgn+pub+/home/pvcs/pvcs_arch/infgn/pub/ac_e
> rror.msv#
> :
>
> The \ from the \# has disappeared.
>
> Will I need to do :
> $(substr \#,\\\#,$(whatever))
>
>
> _______________________________________________
> Help-make mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-make
>