[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: more style: sharing variable setting include/source files with scrip
From: |
Jaap Fieret |
Subject: |
Re: more style: sharing variable setting include/source files with scripts |
Date: |
Fri, 1 Nov 2019 08:55:55 +0100 |
FREE
Jaap
> Op 31 okt. 2019 om 16:25 heeft Robert P. J. Day <address@hidden> het volgende
> geschreven:
>
>
> i *think* i know that this will work, but i'd like to make sure.
> in current project, there are *numerous* files named "config.include"
> that are included from numerous Makefiles to set common variables.
> those included files are in Makefile format, thusly:
>
> DEFAULT_CONFIG_DIR:=$(REPO_ROOT)/tools/default
> BOARD_CONFIG_DIR:=$(BOARD_DIR)/project-spec/configs
> CONFIGS_WORK_DIR:=$(REPO_ROOT)/configs/$(BOARD)
> IMAGE_WORK_DIR:=$(REPO_ROOT)/image/$(BOARD)
> BOOTIMG_WORK_DIR:=$(REPO_ROOT)/bootimg/$(BOARD)
> KERNEL_WORK_DIR:=$(REPO_ROOT)/kernel/$(BOARD)
>
> AFAICT, all of the settings are immediate expansion, nothing is
> deferred -- they're pretty much for (as you can see) setting variables
> to identify working directories.
>
> obvious problem is that all of that information would be useful for
> shell scripts as well, but that format is, of course, not compatible
> with scripts. so my suggestion was, for files like that, rewrite them
> all as (with curly braces):
>
> DEFAULT_CONFIG_DIR=${REPO_ROOT}/tools/default
> BOARD_CONFIG_DIR=${BOARD_DIR}/project-spec/configs
> CONFIGS_WORK_DIR=${REPO_ROOT}/configs/${BOARD}
> IMAGE_WORK_DIR=${REPO_ROOT}/image/${BOARD}
> BOOTIMG_WORK_DIR=${REPO_ROOT}/bootimg/${BOARD}
> KERNEL_WORK_DIR=${REPO_ROOT}/kernel/${BOARD}
>
> at which point, they should be includable in Makefiles and sourceable
> from scripts, yes?
>
> do i understand that correctly?
>
> rday
>
> --
>
> ========================================================================
> Robert P. J. Day Ottawa, Ontario, CANADA
> http://crashcourse.ca
>
> Twitter: http://twitter.com/rpjday
> LinkedIn: http://ca.linkedin.com/in/rpjday
> ========================================================================
>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: more style: sharing variable setting include/source files with scripts,
Jaap Fieret <=