summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2005-04-27 05:46:32 +0000
committerKevin P. Fleming <kpfleming@digium.com>2005-04-27 05:46:32 +0000
commitac639e80c3c51f9f66a34c66cc2703d3c7f63d77 (patch)
tree7792d02e25b39db67b8afc2f7e17845e00db5bef /Makefile
parent7acd3abe3354efe19a2956e62465b267880c901e (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
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 79bb3b26f..c004c6b5a 100755
--- a/Makefile
+++ b/Makefile
@@ -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