diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-09-10 12:18:31 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-09-10 12:18:31 +0000 |
commit | 05ca104ec33806ed3830eaa3963701e03dfd0d43 (patch) | |
tree | 818e63c1507b73673ba94dd5ccb22e2f5a15852b /includes/ghc.mk | |
parent | 1e436f2bb208a6c990743afaf17b7c2a93c31742 (diff) | |
download | haskell-05ca104ec33806ed3830eaa3963701e03dfd0d43.tar.gz |
fix installation of header files (#3451)
Diffstat (limited to 'includes/ghc.mk')
-rw-r--r-- | includes/ghc.mk | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/includes/ghc.mk b/includes/ghc.mk index 50107eda37..007ce4bb5d 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 |