tags:

views:

86

answers:

2

Suppose I have a encrypted Makefile on hand, I want to write a Perl program to decrypt it and run make -f with it. Is this possible without writting the decrypted Makefile back to harddisk?

A: 

You could try setting LD_PRELOAD when you run make to give make some fake fopen/fclose functions that read the makefile out of memory.

Artelius
+7  A: 

Have your program write the decrypted Makefile to stdout and pipe it to make -.

See man make, the part that says:

If makefile is `-', the standard input is read.

Catalin Iacob