changeset 658:a019c0e28b28 trunk

[svn] If the makefile has a HEADERS variable, then install them to the INCLUDEDIR.
author nenolod
date Wed, 22 Feb 2006 17:07:25 -0800
parents 0fd4f4a28ce1
children bb0d818a6ed6
files mk/objective.mk
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mk/objective.mk	Wed Feb 22 17:04:47 2006 -0800
+++ b/mk/objective.mk	Wed Feb 22 17:07:25 2006 -0800
@@ -6,9 +6,11 @@
 OBJECTIVE_LIBS_NOINST = none
 OBJECTIVE_BINS = none
 SUBDIRS = none
+HEADERS = none
+
 LIBDIR = $(libdir)
 BINDIR = $(bindir)
-
+INCLUDEDIR = $(includedir)
 CFLAGS += -DHAVE_CONFIG_H
 
 default: all
@@ -29,6 +31,12 @@
 			$(INSTALL) -d -m 755 $(DESTDIR)/$$i; \
 		done; \
 	fi
+	@if test "$(HEADERS)" != "none"; then \
+		for i in $(HEADERS); do \
+			printf "%10s     %-20s\n" INSTALL $$i; \
+			$(INSTALL) $(INSTALL_OVERRIDE) $$i $(DESTDIR)/$(INCLUDEDIR)/$$i; \
+		done; \
+	fi
 	@if test "$(OBJECTIVE_LIBS)" != "none"; then \
 		for i in $(OBJECTIVE_LIBS); do \
 			printf "%10s     %-20s\n" INSTALL $$i; \
@@ -61,7 +69,7 @@
 
 build:
 	$(MAKE) build-prehook
-	@if test "$(SUBDIRS)" != "none"; then \
+	+@if test "$(SUBDIRS)" != "none"; then \
 		for i in $(SUBDIRS); do \
 			echo "[building subobjective: $$i]"; \
 			(cd $$i; $(MAKE); cd ..); \