aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-04-27 05:46:32 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-04-27 05:46:32 +0000
commit09b8abb779013d41d9f70af75b88cf70ba8ee195 (patch)
tree7792d02e25b39db67b8afc2f7e17845e00db5bef /Makefile
parent8e1296be7e342d81550ef10a021828e1691ab81b (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: http://svn.digium.com/svn/asterisk/trunk@5517 f38db490-d61c-443f-a65b-d21fe96a405b
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