Re: PACKAGE_NAME, PACKAGE_VERSION etc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Balint Joo wrote:

[snip]

> Neither of these are very "auto"
> 
> Sorry, but I am still unsatisfied...

If none of the other suggestions fullfills your needs, you can do
it manually. Provided you want to install your myconfig.h containing
the macros MY_MACRO_1 and MY_MACRO_2 into $prefix/include/mylib,
you may add the following to your Makefile.am:

all-local: myconfig.h

myconfig.h: config.h
	echo "Creating myconfig.h"
	rm -fR myconfig.h
	grep -e "MY_MACRO_1\|MY_MACRO_2" > myconfig.h

install-data-local: all-local
	echo "Creating myconfig.h"
	$(mkinstalldirs) $(includedir)/mylib
	$(INSTALL_DATA) myconfig.h $(includedir)/mylib/myconfig.h

I hope the code above is correct.


Andreas



[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux