New build path variable
[freeradius.git] / src / include / Makefile
index 80a5721..f30450f 100644 (file)
@@ -4,9 +4,16 @@
 # Version:     $Id$
 #
 
+HEADERS        = autoconf.h conf.h conffile.h detail.h dhcp.h event.h hash.h heap.h \
+       ident.h libradius.h md4.h md5.h missing.h modcall.h modules.h \
+       packet.h rad_assert.h radius.h radiusd.h radpaths.h \
+       radutmp.h realms.h sha1.h stats.h sysutmp.h token.h \
+       udpfromto.h vmps.h vqp.h
+
 include ../../Make.inc
 .PHONY: all clean distclean install
 
+.PHONY: all clean distclean install reconfig
 all: radpaths.h
 
 radpaths.h: build-radpaths-h
@@ -15,19 +22,12 @@ radpaths.h: build-radpaths-h
 distclean:
        rm -f radpaths.h
 
-clean:
+reconfig clean:
 
 install:
        $(INSTALL) -d -m 755 $(R)$(includedir)/freeradius
-       $(INSTALL) -m 644 hash.h $(R)$(includedir)/freeradius
-       $(INSTALL) -m 644 libradius.h $(R)$(includedir)/freeradius
-       $(INSTALL) -m 644 md4.h $(R)$(includedir)/freeradius
-       $(INSTALL) -m 644 md5.h $(R)$(includedir)/freeradius
-       $(INSTALL) -m 644 missing.h $(R)$(includedir)/freeradius
-       $(INSTALL) -m 644 packet.h $(R)$(includedir)/freeradius
-       $(INSTALL) -m 644 radius.h $(R)$(includedir)/freeradius
-       $(INSTALL) -m 644 radpaths.h $(R)$(includedir)/freeradius
-       $(INSTALL) -m 644 sha1.h $(R)$(includedir)/freeradius
-       $(INSTALL) -m 644 token.h $(R)$(includedir)/freeradius
-       $(INSTALL) -m 644 udpfromto.h $(R)$(includedir)/freeradius
-       sed -i 's/^#include <freeradius-devel/#include <freeradius/' $(R)$(includedir)/freeradius/libradius.h
+       for i in $(HEADERS); do \
+               sed 's/^#include <freeradius-devel/#include <freeradius/' $$i > .inst.$$$$ ; \
+               $(INSTALL) -m 644 .inst.$$$$   $(R)$(includedir)/freeradius/$$i; \
+               rm -f .inst.$$$$ ; \
+       done