我正在尝试编写一个 makefile 规则来复制目录,维护其结构,并且由于我们的 makefile 中的所有其他规则都使用install,我希望保持一致。
在联机帮助页中,它说:
概要
Run Code Online (Sandbox Code Playgroud)install [OPTION]... [-T] SOURCE DEST install [OPTION]... SOURCE... DIRECTORY install [OPTION]... -t DIRECTORY SOURCE... install [OPTION]... -d DIRECTORY... -d, --directory treat all arguments as directory names; create all components of the specified directories
好的,这听起来像我需要的……但这些标志没有意义。您如何指定要安装到的目标目录?
我尝试通过在本地硬盘上创建任意目录结构来进行基本测试:
~>tree test
test
??? a
? ??? b
? ??? c
? ??? e.txt
??? d
4 directories, 1 file
Run Code Online (Sandbox Code Playgroud)
然后运行install -d并查看创建的内容:
~>install -d test test2
~>tree test2
test2
0 directories, 0 files
Run Code Online (Sandbox Code Playgroud)
什么都没有发生! …
coreutils ×1