aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile17
-rw-r--r--agi/Makefile2
-rw-r--r--apps/Makefile2
-rw-r--r--cdr/Makefile2
-rw-r--r--channels/Makefile2
-rw-r--r--codecs/Makefile2
-rw-r--r--formats/Makefile2
-rw-r--r--funcs/Makefile2
-rw-r--r--pbx/Makefile2
-rw-r--r--res/Makefile2
-rw-r--r--utils/Makefile2
11 files changed, 19 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index 8b3268371..e03fe7177 100644
--- a/Makefile
+++ b/Makefile
@@ -13,8 +13,6 @@
.EXPORT_ALL_VARIABLES:
-.PHONY: sounds clean clean-depend dist-clean all depend
-
# Create OPTIONS variable
OPTIONS=
@@ -273,6 +271,7 @@ SUBDIRS_CLEAN_DEPEND:=$(SUBDIRS:%=%-clean-depend)
MOD_SUBDIRS_DEPEND:=$(MOD_SUBDIRS:%=%-depend)
OTHER_SUBDIRS_DEPEND:=$(OTHER_SUBDIRS:%=%-depend)
SUBDIRS_DEPEND:=$(MOD_SUBDIRS_DEPEND) $(OTHER_SUBDIRS_DEPEND)
+SUBDIRS_UNINSTALL:=$(SUBDIRS:%=%-uninstall)
OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
translate.o file.o pbx.o cli.o md5.o term.o \
@@ -371,10 +370,10 @@ _all: all
all: cleantest config.status menuselect.makeopts depend asterisk $(SUBDIRS)
-$(MOD_SUBDIRS): FORCE
+$(MOD_SUBDIRS):
@CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $@
-$(OTHER_SUBDIRS): FORCE
+$(OTHER_SUBDIRS):
@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $@
config.status: configure
@@ -816,8 +815,6 @@ TAGS: .tags-depend .tags-sources
etags: TAGS
-FORCE:
-
%_env:
$(MAKE) -C $(shell echo $@ | sed "s/_env//g") env
@@ -837,7 +834,10 @@ cleantest:
$(MAKE) defaults.h;\
fi
-_uninstall:
+$(SUBDIRS_UNINSTALL):
+ @$(MAKE) -C $(@:-uninstall=) uninstall
+
+_uninstall: $(SUBDIRS_UNINSTALL)
rm -f $(DESTDIR)$(MODULES_DIR)/*
rm -f $(DESTDIR)$(ASTSBINDIR)/*asterisk*
rm -f $(DESTDIR)$(ASTSBINDIR)/astgenkey
@@ -845,7 +845,6 @@ _uninstall:
rm -rf $(DESTDIR)$(ASTHEADERDIR)
rm -rf $(DESTDIR)$(ASTDATADIR)/firmware
rm -rf $(DESTDIR)$(ASTMANDIR)/man8
- for x in $(SUBDIRS); do $(MAKE) -C $$x uninstall || exit 1 ; done
$(MAKE) -C sounds uninstall
uninstall: _uninstall
@@ -883,3 +882,5 @@ mxml/libmxml.a:
makeopts.xml: $(foreach dir,$(MOD_SUBDIRS),$(dir)/*.c) build_tools/cflags.xml sounds/sounds.xml
@echo "Generating list of available modules ..."
@build_tools/prep_moduledeps > $@
+
+.PHONY: sounds clean clean-depend dist-clean all _all depend cleantest uninstall _uninstall uninstall-all dont-optimize valgrind $(SUBDIRS_INSTALL) $(SUBDIRS_CLEAN) $(SUBDIRS_CLEAN_DEPEND) $(SUBDIRS_DEPEND) $(SUBDIRS_UNINSTALL)
diff --git a/agi/Makefile b/agi/Makefile
index d73f2382c..e7a210742 100644
--- a/agi/Makefile
+++ b/agi/Makefile
@@ -11,7 +11,7 @@
# the GNU General Public License
#
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi
diff --git a/apps/Makefile b/apps/Makefile
index 012858202..3601da45c 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -11,7 +11,7 @@
# the GNU General Public License
#
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
ifneq ($(wildcard ../menuselect.makeopts),)
include ../menuselect.makeopts
diff --git a/cdr/Makefile b/cdr/Makefile
index 1b4df7978..cfc6fbfa5 100644
--- a/cdr/Makefile
+++ b/cdr/Makefile
@@ -11,7 +11,7 @@
# the GNU General Public License
#
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
ifneq ($(wildcard ../menuselect.makeopts),)
include ../menuselect.makeopts
diff --git a/channels/Makefile b/channels/Makefile
index 93429b6b4..a231ded1f 100644
--- a/channels/Makefile
+++ b/channels/Makefile
@@ -11,7 +11,7 @@
# the GNU General Public License
#
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
ifneq ($(wildcard ../menuselect.makeopts),)
include ../menuselect.makeopts
diff --git a/codecs/Makefile b/codecs/Makefile
index 1528ee374..d6e304be2 100644
--- a/codecs/Makefile
+++ b/codecs/Makefile
@@ -11,7 +11,7 @@
# the GNU General Public License
#
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
ifneq ($(wildcard ../menuselect.makeopts),)
include ../menuselect.makeopts
diff --git a/formats/Makefile b/formats/Makefile
index 1a306d2f2..8440aa0dd 100644
--- a/formats/Makefile
+++ b/formats/Makefile
@@ -11,7 +11,7 @@
# the GNU General Public License
#
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
ifneq ($(wildcard ../menuselect.makeopts),)
include ../menuselect.makeopts
diff --git a/funcs/Makefile b/funcs/Makefile
index b4310f9bf..6172ed318 100644
--- a/funcs/Makefile
+++ b/funcs/Makefile
@@ -11,7 +11,7 @@
# the GNU General Public License
#
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
ifneq ($(wildcard ../menuselect.makeopts),)
include ../menuselect.makeopts
diff --git a/pbx/Makefile b/pbx/Makefile
index 795911c94..74168c070 100644
--- a/pbx/Makefile
+++ b/pbx/Makefile
@@ -11,7 +11,7 @@
# the GNU General Public License
#
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
ifneq ($(wildcard ../menuselect.makeopts),)
include ../menuselect.makeopts
diff --git a/res/Makefile b/res/Makefile
index 6b7dd3b0c..9ee5a2e62 100644
--- a/res/Makefile
+++ b/res/Makefile
@@ -11,7 +11,7 @@
# the GNU General Public License
#
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
ifneq ($(wildcard ../menuselect.makeopts),)
include ../menuselect.makeopts
diff --git a/utils/Makefile b/utils/Makefile
index 2432ad2fe..4e3aa5e83 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -11,7 +11,7 @@
# the GNU General Public License
#
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
UTILS:=astman smsq stereorize streamplayer aelparse