]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
format_mp3: Re-work menuselect/build issues
authorSean Bright <sean.bright@gmail.com>
Tue, 30 May 2017 14:34:34 +0000 (10:34 -0400)
committerSean Bright <sean.bright@gmail.com>
Tue, 30 May 2017 14:51:00 +0000 (10:51 -0400)
Rather than removing format_mp3 from ALL_C_MODS (which caused format_mp3
to not show up in menuselect), use .PHONY targets when the necessary
source files are not present.

ASTERISK-23951
Reported by: Tzafrir Cohen

Change-Id: I0a7512c51acc9e86043671795020b0de725bd9e8

addons/Makefile

index be5cd5e2f320e0073dd3d9401343afa486f54da5..3d4045d8fce0c15108bef9a727d7d1a5cfe23713 100644 (file)
@@ -30,12 +30,9 @@ ALL_C_MODS:=app_mysql \
             cdr_mysql \
             chan_mobile \
             chan_ooh323 \
+            format_mp3 \
             res_config_mysql
 
-ifneq ($(wildcard mp3/Makefile),)
-       ALL_C_MODS += format_mp3
-endif
-
 all: check_mp3 _all
 
 check_mp3:
@@ -64,7 +61,9 @@ clean::
        if [ -f mp3/Makefile ] ; then $(MAKE) -C mp3 clean ; fi
        rm -f $(addprefix ooh323c/src/,$(H323OBJS))
 
+ifneq ($(wildcard mp3/Makefile),)
 format_mp3.so: mp3/common.o mp3/dct64_i386.o mp3/decode_ntom.o mp3/layer3.o mp3/tabinit.o mp3/interface.o
+endif
 
 chan_ooh323.o: _ASTCFLAGS+=$(H323CFLAGS)
 chan_ooh323.so: _ASTCFLAGS+=$(H323CFLAGS)
@@ -72,3 +71,7 @@ chan_ooh323.so: $(addprefix ooh323c/src/,$(H323OBJS)) chan_ooh323.o ooh323cDrive
 $(addprefix ooh323c/src/,$(H323OBJS)) chan_ooh323.o ooh323cDriver.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,chan_ooh323)
 
 .PHONY: check_mp3
+
+ifeq ($(wildcard mp3/Makefile),)
+.PHONY: format_mp3.o format_mp3.so
+endif