diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2016-01-04 23:04:58 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2016-01-04 23:04:58 +0100 |
commit | 73e83f270afd9c662a16297f6a6cae297bcae9ae (patch) | |
tree | 57892e50f1fefa4a8156acc2626d69b074476436 /mk/lang-c.mk | |
parent | m + makefile + configure (diff) | |
download | libhaiku-73e83f270afd9c662a16297f6a6cae297bcae9ae.tar.gz libhaiku-73e83f270afd9c662a16297f6a6cae297bcae9ae.tar.bz2 libhaiku-73e83f270afd9c662a16297f6a6cae297bcae9ae.tar.xz |
install and uninstall header files
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r-- | mk/lang-c.mk | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mk/lang-c.mk b/mk/lang-c.mk index 554c9c4..91bc86e 100644 --- a/mk/lang-c.mk +++ b/mk/lang-c.mk @@ -55,7 +55,10 @@ # library, sould should also define # _SO_VERSION_$(LIBRARY) and _SO_MAJOR_$(LIBRARY) # with the full version number and the major -# version number, respectively. +# version number, respectively. Additionally, +# list all header files that shall be installed +# in _H, these should not contain the 'src/' prefix +# or the '.h' suffix. ifdef _C_STD @@ -267,6 +270,8 @@ install-lib-c: $(foreach B,$(_LIB),bin/$(B).so) $(Q)$(foreach B,$(_LIB),$(LN) -sf -- "$(B).so.$(_SO_VERSION_$(B))" "$(DESTDIR)$(LIBDIR)/$(B).so.$(_SO_MAJOR_$(B))" &&) $(TRUE) $(Q)$(foreach B,$(_LIB),$(INSTALL_PROGRAM) $(foreach B,$(_LIB),bin/$(B).so) -- "$(DESTDIR)$(LIBDIR)/$(B).so.$(_SO_VERSION_$(B))" &&) $(TRUE) $(Q)$(foreach B,$(_LIB),$(LN) -sf -- "$(B).so.$(_SO_VERSION_$(B))" "$(DESTDIR)$(LIBDIR)/$(B).so" &&) $(TRUE) + $(Q)$(INSTALL_DIR) -- $(foreach H,$(_H),"$(DESTDIR)$(INCLUDEDIR)/$(shell dirname "$(H)")") + $(Q)$(foreach H,$(_H),$(INSTALL_DATA) "src/$(H).h" -- "$(DESTDIR)$(INCLUDEDIR)/$(H).h" &&) $(TRUE) @$(ECHO_EMPTY) @@ -295,8 +300,8 @@ uninstall-lib-c: -$(Q)$(RM) -- $(foreach B,$(_LIB),"$(DESTDIR)$(LIBDIR)/$(B).so") -$(Q)$(RM) -- $(foreach B,$(_LIB),"$(DESTDIR)$(LIBDIR)/$(B).so.$(_SO_MAJOR_$(B))") -$(Q)$(RM) -- $(foreach B,$(_LIB),"$(DESTDIR)$(LIBDIR)/$(B).so.$(_SO_VERSION_$(B))") + -$(Q)$(RM) -- $(foreach H,$(_H),"$(DESTDIR)$(INCLUDEDIR)/$(H).h") + -$(Q)$(foreach H,$(_H),if [ ! "$(shell echo "$(H)" | cut -d / -f 1)" = "$(H)" ]; then $(RMDIR) -- "$(DESTDIR)$(INCLUDEDIR)/$(shell dirname "$(H)")"; fi;) endif -# TODO install/uninstall header files - |