aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-04-27 16:27:53 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-04-27 16:27:53 +0000
commite9fb35ccfbe3b494c77eaa368d62a5e6aef74497 (patch)
tree35402d1f985acd1d0f3c9db51c6674f658641f6e
parentb9ae86b5ab2b83ab508acef5d63d88ee44e90d6a (diff)
'make install' will now warn the user if their modules directory contains modules not installed by the newly-installed Asterisk
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5520 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xMakefile23
1 files changed, 21 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index c004c6b5a..227042d1f 100755
--- a/Makefile
+++ b/Makefile
@@ -466,8 +466,11 @@ update:
echo "Not CVS"; \
fi
-NEWHEADERS=$(subst include/asterisk/,,$(wildcard include/asterisk/*.h))
-OLDHEADERS=$(filter-out $(NEWHEADERS),$(subst $(DESTDIR)$(ASTHEADERDIR)/,,$(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h)))
+NEWHEADERS=$(notdir $(wildcard include/asterisk/*.h))
+OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h)))
+
+NEWMODS=$(notdir $(wildcard */*.so))
+OLDMODS=$(filter-out $(NEWMODS),$(notdir $(wildcard $(DESTDIR)$(MODULES_DIR)/*.so)))
bininstall: all
mkdir -p $(DESTDIR)$(MODULES_DIR)
@@ -531,6 +534,22 @@ bininstall: all
@echo " + **Note** This requires that you have +"
@echo " + doxygen installed on your local system +"
@echo " +-------------------------------------------+"
+ @if [ -n "$(OLDMODS)" ]; then \
+ echo " WARNING WARNING WARNING" ;\
+ echo "" ;\
+ echo " Your Asterisk modules directory, located at" ;\
+ echo " $(DESTDIR)$(MODULES_DIR)" ;\
+ echo " contains modules that were not installed by this " ;\
+ echo " version of Asterisk. Please ensure that these" ;\
+ echo " modules are compatible with this version before" ;\
+ echo " attempting to run Asterisk." ;\
+ echo "" ;\
+ for f in $(OLDMODS); do \
+ echo " $$f" ;\
+ done ;\
+ echo "" ;\
+ echo " WARNING WARNING WARNING" ;\
+ fi
install: all datafiles bininstall