X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2Fghc.mk;h=007ce4bb5d7570438fa4dea25eb2f5938411293f;hb=05ca104ec33806ed3830eaa3963701e03dfd0d43;hp=50107eda37f8142ea9de4c6e785fcbeb06803f13;hpb=a2a67cd520b9841114d69a87a423dabcb3b4368e;p=ghc-hetmet.git diff --git a/includes/ghc.mk b/includes/ghc.mk index 50107ed..007ce4b 100644 --- a/includes/ghc.mk +++ b/includes/ghc.mk @@ -20,7 +20,7 @@ includes_H_PLATFORM = includes/ghcplatform.h # # All header files # -includes_H_FILES = $(filter-out $(includes_H_CONFIG) $(includes_H_PLATFORM),$(wildcard includes/*.h)) +includes_H_FILES = $(filter-out $(includes_H_CONFIG) $(includes_H_PLATFORM),$(wildcard includes/*.h includes/*/*.h includes/*/*/*.h)) # # Options @@ -172,8 +172,6 @@ endif # --------------------------------------------------------------------------- # Install all header files -INSTALL_HEADERS += $(includes_H_FILES) $(includes_H_CONFIG) $(includes_H_PLATFORM) - $(eval $(call clean-target,includes,,\ $(includes_H_CONFIG) $(includes_H_PLATFORM) \ $(includes_GHCCONSTANTS) $(includes_DERIVEDCONSTANTS))) @@ -182,3 +180,16 @@ $(eval $(call all-target,includes,,\ $(includes_H_CONFIG) $(includes_H_PLATFORM) \ $(includes_GHCCONSTANTS) $(includes_DERIVEDCONSTANTS))) +includes_subdirs = $(sort $(subst includes/,,$(foreach d,$(includes_H_FILES),$(dir $(d))))) + +install: install_includes + +.PHONY: install_includes +install_includes : + $(INSTALL_DIR) $(DESTDIR)$(ghcheaderdir) + for d in $(includes_subdirs); do \ + $(INSTALL_DIR) $(DESTDIR)$(ghcheaderdir)/$$d; \ + done + for i in $(subst includes/,,$(includes_H_FILES) $(includes_H_CONFIG) $(includes_H_PLATFORM)); do \ + $(INSTALL_HEADER) $(INSTALL_OPTS) includes/$$i $(DESTDIR)$(ghcheaderdir)/$$i; \ + done