give me all examples of $(origin V) with different return value
时间: 2024-02-17 15:04:53 浏览: 29
Sure, here are some examples of $(origin V) with different return values:
1. If V is not defined:
```
$(origin V) // returns "undefined"
```
2. If V is defined in a makefile:
```
V = hello
$(origin V) // returns "file"
```
3. If V is defined in the command line:
```
make V=world
$(origin V) // returns "command line"
```
4. If V is defined by an automatic variable:
```
%.o: %.c
$(origin $@) // returns "automatic"
```
5. If V is defined as a default definition:
```
V ?= default_value
$(origin V) // returns "default"
```
6. If V is defined as an environment variable:
```
export V=environment_value
$(origin V) // returns "environment"
```
7. If V is defined using the override directive:
```
override V=override_value
$(origin V) // returns "override"
```
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)