diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2005-04-27 05:46:32 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2005-04-27 05:46:32 +0000 |
commit | ac639e80c3c51f9f66a34c66cc2703d3c7f63d77 (patch) | |
tree | 7792d02e25b39db67b8afc2f7e17845e00db5bef | |
parent | 7acd3abe3354efe19a2956e62465b267880c901e (diff) |
during 'make install', remove any headers from the destination include/asterisk directory that are no longer present in the source directory (bug #4035)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rwxr-xr-x | Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -466,6 +466,9 @@ update: echo "Not CVS"; \ fi +NEWHEADERS=$(subst include/asterisk/,,$(wildcard include/asterisk/*.h)) +OLDHEADERS=$(filter-out $(NEWHEADERS),$(subst $(DESTDIR)$(ASTHEADERDIR)/,,$(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h))) + bininstall: all mkdir -p $(DESTDIR)$(MODULES_DIR) mkdir -p $(DESTDIR)$(ASTSBINDIR) @@ -486,6 +489,9 @@ bininstall: all for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done install -d $(DESTDIR)$(ASTHEADERDIR) install -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR) + if [ -n "$(OLDHEADERS)" ]; then \ + rm -f $(addprefix $(DESTDIR)$(ASTHEADERDIR)/,$(OLDHEADERS)) ;\ + fi rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv |