[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Running case commands with the shell function?
From: |
Mark Piffer |
Subject: |
Re: Running case commands with the shell function? |
Date: |
Wed, 31 Oct 2018 17:48:16 +0100 |
Am Do., 21. Sep. 2017 um 09:36 Uhr schrieb Sébastien Hinderer <
address@hidden>:
> Thanks a lot, Rakesh, will take this other remark into account.
>
> Best wishes,
>
> Sébastien.
>
> _______________________________________________
> Help-make mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-make
Sorry for dropping in so late - had a lot to do lately.
If you want, you can use the GNUmake table toolkit at
https://github.com/markpiffer/gmtt which is now
implementing more than only tables. Your code can be glob-matched this way
(I hope you get the idea):
----------------------------------------------
include gmtt/gmtt.mk
# lags := \
# $(shell \
# case "$(TARGET)" in \
# i386-*-openbsd5.[5-9]*|i386-*-openbsd[6-9].*) \
# echo "-ccopt -nopie";; \
# *);; \
# esac \
# )
$(info $(call
glob-match,i386-whatever-openbsd5.7.8-experimental,i386-*-openbsd5.[5-9]*))
$(info $(call
glob-match,i386-whatever-openbsd5.4.8-experimental,i386-*-openbsd5.[5-9]*))
TARGET := i386-whatever-openbsd5.7.8-experimental
$(info $(TARGET): $(if $(or $(call
glob-match,$(TARGET),i386-*-openbsd5.[5-9]*),\
$(call
glob-match,$(TARGET),i386-*-openbsd[6-9].*)), -ccopt -nopie, nothing!))
TARGET := i386-whatever-openbsd5.4.8-experimental
$(info $(TARGET): $(if $(or $(call
glob-match,$(TARGET),i386-*-openbsd5.[5-9]*),\
$(call
glob-match,$(TARGET),i386-*-openbsd[6-9].*)), -ccopt -nopie, nothing!))
------------------------------------------
glob-match doesn't support '|' in the expression yet - I will be grateful
if someone can point me to
a glob syntax which is generally accepted and standard, maybe the missing
operators could be
implemented in finite time.
best regards,
Mark
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Running case commands with the shell function?,
Mark Piffer <=