Linux makefile and shell file calls another instance of Detailed

Linux makefile and shell file calls another instance of Detailed

This article introduces the relevant information Linux makefile and shell file calls Detailed examples of each, can refer a friend in need

Call inside the makefile shell file:

 

1

2

3

4

5

6

7

#!/bin/bash

cd ctemplate-2.1

./configure

sudo make -f install

cd ../

cd TemplateProcesser

make

Description: ./ configure file is a shell script file that calls the shell within the shell file is easy; there is the Makefile is called within TemplateProcesser directory, direct: make 

Calling shell script files within the makefile:

 

1

2

3

4

5

6

SHELL := /bin/bash

test:

@pwd

cd ./TemplateProcesser && pwd

sh ./build.sh

@pwd

Description: build.sh shell script file.

 

1

2

3

4

调用perl文件

/usr/bin/perl *.pl

调用python文件

/usr/bin/env *.py

 

Guess you like

Origin blog.csdn.net/ll148305879/article/details/92795067