1
vote
3answers
160 views

Using makefile assignments from a shell script

For example: srcdir = ../libc # Src directory prefix = /usr/local // Installation path The first line is from a makefile and second from config.make. I need to access the variable in a ...
1
vote
3answers
293 views

I want to run commands like make, make install, python setup install without changing directories

I have written a script which will download software from the internet to the current user's home directory and then untar it. And then I have to make and make install it and in some software I have ...
1
vote
3answers
1k views

How to run a Python script in Makefile

I want to write a Makefile to find specific files and run a Python script on each file. The Python script accepts sys.stdin input. find $(W)/$(OVE) -name "*.xml" -print | \ while read x ; do \ cat ...
0
votes
1answer
2k views

Looping over directory entries in bash and saving to an array

(See update at the foot of the question). This is a followup question to "Make directory copies using find". This question involved manipulating a bunch of directories, This got too complicated to ...
1
vote
1answer
685 views

Autocompletion for Makefile rules in tcsh

I'm using tcsh in a SUSE 11 box and I realized that when typing makeTab it allows me to auto-complete the rules available within the Makefile, not the files that are inside the current directory. ...
6
votes
4answers
2k views

how can a makefile detect whether a command is available in the local machine?

I began to use org-mode for planning out my tasks in GTD-style system. Putting every org files in a directory of a Dropbox folder, I run emacs to edit / manage these files from three different local ...
3
votes
1answer
511 views

How to save the results from ls to a command?

I want the results from an ls to be saved in a var inside a makefile the command is simply the following: ls text* and the result suppose to be something like : text1.txt What i put in my script ...
4
votes
3answers
657 views

What is a subshell (in the context of the documentation of make)?

I'm reading a book about the make command and there is a paragraph: If any of the prerequisites has an associated rule, make attempts to update those first. Next, the target file is considered. ...
4
votes
4answers
148 views

Make mistakenly thinks rule succeeded because of 0-sized file generated by output redirect

In a makefile, I have several rules that look like this: out.txt: foo.sh input.txt ./foo.sh -i input.txt > out.txt If foo.sh fails, then out.txt will be created as a 0-sized file. If I run ...