[Cbe-oss-dev] [PATCH] libspe2: add pkg-config file to libspe2

Geoff Levand geoffrey.levand at am.sony.com
Fri May 11 02:58:23 EST 2007


Jeremy Kerr wrote:
> Luca,
> 
>> +libspe2.pc:
>> +�������echo -e \
>> +�������prefix=$(prefix) \\n\
>> +�������exec_prefix=$(exec_prefix) \\n\
>> +�������libdir=$(libdir) \\n\
>> +�������includedir=$(includedir) \\n\
> 
> [snip]
> 
> That's a little too much work for a makefile. I think adding a 
> libspe2.pc.in file, and using 'sed' to set the variables would be much 
> cleaner.

Something like this should work (untested):

edit = sed \
        -e 's, at prefix\@,$(prefix),g' \
        -e 's, at exec_prefix\@,$(exec_prefix),g' \
	...

libspe2.pc: Makefile $(srcdir)/libspe2.pc.in
	rm -f $@ $@.tmp
	$(edit) $(srcdir)/$@.in >$@.tmp
	mv $@.tmp $@

Then just use the tags @prefix\@, etc. in libspe2.pc.in.  It's a
pretty standard way.

-Geoff




More information about the cbe-oss-dev mailing list