From b78b0a7f09eb2c276cb62645c5f2481f205329a0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 6 Sep 2006 09:28:16 +0000 Subject: [PATCH] remove bs; oops, didn't mean to commit that git-svn-id: https://svn.musicpd.org/mpd/trunk@4738 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- bs.mk | 60 ---------------------------- bs/bs-lib.sh | 50 ----------------------- bs/deftypes-cross.sh | 33 --------------- bs/deftypes.c | 18 --------- bs/dep-alsa.sh | 78 ------------------------------------ bs/dep-input.sh | 46 --------------------- bs/dep-output.sh | 78 ------------------------------------ bs/deps.sh | 27 ------------- bs/features.sh | 2 - bs/mkconfig_header.sh | 93 ------------------------------------------- bs/mkdep.sh | 21 ---------- 11 files changed, 506 deletions(-) delete mode 100644 bs.mk delete mode 100644 bs/bs-lib.sh delete mode 100644 bs/deftypes-cross.sh delete mode 100644 bs/deftypes.c delete mode 100644 bs/dep-alsa.sh delete mode 100644 bs/dep-input.sh delete mode 100644 bs/dep-output.sh delete mode 100644 bs/deps.sh delete mode 100644 bs/features.sh delete mode 100755 bs/mkconfig_header.sh delete mode 100755 bs/mkdep.sh diff --git a/bs.mk b/bs.mk deleted file mode 100644 index 2fadffc94..000000000 --- a/bs.mk +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/make -f -# default target -all: - -export CPP CC CPPFLAGS CFLAGS LD LDFLAGS UNAME_S UNAME_M HOST TARGET O - -# output directory can be set with O:=dir -ifeq ($(O),) - O := . -endif - -UNAME_S := $(shell uname -s 2>/dev/null || echo unknown) -UNAME_M := $(shell uname -m 2>/dev/null || echo unknown) -HOST := $(UNAME_S)-$(UNAME_M) -TARGET := $(HOST) - -include src/Makefile.am - -CFLAGS += -I $(O)/src -mpd_SRC := $(addprefix src/,$(filter %.c,$(mpd_SOURCES))) -mpd_HDR := $(addprefix src/,$(filter %.h,$(mpd_SOURCES))) -mpd_OBJ := $(subst .c,.o,$(addprefix $(O)/,$(mpd_SRC))) -mpd_DEP := $(subst .o,.d,$(mpd_OBJ)) -DIRS := $(O)/src/inputPlugins $(O)/src/audioOutputs -HDR_DEP_HACK := $(addprefix $(0), $(mpd_HDR)) -export HDR_DEP_HACK - -dbg: - @echo mpd_OBJ $(mpd_OBJ) - @echo mpd_SRC $(mpd_SRC) - @echo mpd_DEP $(mpd_DEP) - -dep: $(mpd_DEP) - @echo $(mpd_DEP) - -$(O)/deftypes: bs/deftypes.c - $(CC) $(CFLAGS) -o $@+ $< - if test "$(HOST)" != "$(TARGET)"; then \ - cp bs/deftypes-cross.sh $@+ && chmod +x $@+; fi - mv $@+ $@ - -$(O)/config.h: $(O)/deftypes $(O)/config.mk - @-test -f $@ && mv $@ $@~ - ./bs/mkconfig_header.sh > $@+ && $(O)/deftypes >> $@+ && mv $@+ $@ - -config: $(O)/config.h -$(O)/config.mk: - @mkdir -p $(DIRS) && >> $@ - --include $(O)/config.mk - -$(O)/src/%.d: src/%.c $(O)/config.h - ./bs/mkdep.sh $< > $@+ && mv $@+ $@ - -include $(mpd_OBJ:.o=.d) - -$(O)/src/%.o: $(O)/src/%.d $(O)/config.h $(O)/config.mk - $(CC) $(CPPFLAGS) $(CFLAGS) -o $@+ $< && mv $@+ $@ - - diff --git a/bs/bs-lib.sh b/bs/bs-lib.sh deleted file mode 100644 index 8b13653f2..000000000 --- a/bs/bs-lib.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -# common shell functions and variable setup for the bs build system, -# expect variables to be set and exported in bs.mk - -test -z "$CC" && CC=cc -test -z "$CPP" && CPP='cc -E' -test -z "$PKGCONFIG" && PKGCONFIG=pkg-config - -p () -{ - echo >&2 "$@" -} - -run_cc () -{ - $CC $CPPFLAGS $CFLAGS $LDFLAGS \ - $cppflags $cflags $ldflags -o t.o t.c >/dev/null 2>&1 -} - -test_header () -{ - cat > t.c < -int main (void) { return 0; } -EOF - run_cc -} - -dep_paths () -{ - name=$1 - eval "cflags=`echo '$'`${name}_cflags" - eval "ldflags=`echo '$'`${name}_ldflags" - eval "pfx=`echo '$'`${name}_pfx" - if test -n "$pfx"; then - cflags="$cflags -I$pfx/include" - ldflags="$ldflags -L$pfx/lib" - fi -} - -test_compile () -{ - h=shift - cat > t.c < -int main () { $@ return 0; } -EOF - run_cc -} - diff --git a/bs/deftypes-cross.sh b/bs/deftypes-cross.sh deleted file mode 100644 index a5f78a816..000000000 --- a/bs/deftypes-cross.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -cat < - -int main(int argc, char argv[]) -{ - long one = 1; - puts( *((char *)(&one)) ? "/* #undef WORDS_BIGENDIAN */" - : "#define WORDS_BIGENDIAN" ); - printf( "#define SIZEOF_INT %ld\n" - "#define SIZEOF_LONG %ld\n" - "#define SIZEOF_LONG_LONG %ld\n" - "#define SIZEOF_SHORT %ld\n", - (long int)(sizeof(int)), - (long int)(sizeof(long)), - (long int)(sizeof(long long)), - (long int)(sizeof(short)) ); - - return 0; -} diff --git a/bs/dep-alsa.sh b/bs/dep-alsa.sh deleted file mode 100644 index 0354d3a6a..000000000 --- a/bs/dep-alsa.sh +++ /dev/null @@ -1,78 +0,0 @@ -t_alsa () -{ - dep_paths alsa - if test_header 'alsa/asoundlib'; then - ldflags="-lasound -lm -ldl -lpthread" - echo t - fi -} - -t_ao () -{ - dep_paths ao - if test_header 'ao/ao'; then - ldflags="-ld -lao" - echo t - fi -} - -t_fifo () -{ - echo t -} - -t_mvp () -{ - echo t -} - -t_oss () -{ - dep_paths oss - test_header 'sys/soundcard' && echo t -} - -t_pulse () -{ - dep_paths pulse - test_header 'pulse/simple' && echo 't' -} - -t_shout () -{ - dep_paths shout - ok= - if test "$PKGCONFIG" != "no" && `$PKGCONFIG --exists shout`; then - cflags="`$PKGCONFIG --variable=cflags_only shout`" - cflags="$cflags `$PKGCONFIG --variable=cppflags shout`" - ldflags="`$PKGCONFIG --libs shout`" - ok=t - else - test -z "$sc" && sc="`which shoutconfig`" - if test `$sc --package` = "libshout"; then - cflags="`$sc --cflags-only`" - cflags="$cflags `$sc --cppflags shout`" - ldflags="$ldflags `$sc --libs`" - ok=t - fi - fi - # freebsd 6.1 + shout 2.2 port seems to leave pthread out - case "$uname_s" in - freebsd*) - case "$cflags" in - *-D_THREAD_SAFE*) - ldflags="$ldflags -lpthread" - ;; - esac - ;; - esac - - echo $ok -} - -t_sun () -{ - dep_paths sun - test_header 'sys/audioio' && echo t -} - diff --git a/bs/dep-input.sh b/bs/dep-input.sh deleted file mode 100644 index ece570875..000000000 --- a/bs/dep-input.sh +++ /dev/null @@ -1,46 +0,0 @@ -t_aac () -{ - dep_paths aac - if test_header 'faad' && test_header 'mp4ff'; then - ldflags="-lfaad -lmp4ff" - echo t - fi -} - -audiofile () -{ - dep_paths audiofile - if test_header 'audiofile'; then - ldflags="-lm -laudiofile" - echo t - fi - -} - -flac () -{ -} - -oggvorbis () -{ -} - -oggflac () -{ -} - -mod () -{ -} - -mpc () -{ -} - -mp3 () -{ -} - -tremor () -{ -} diff --git a/bs/dep-output.sh b/bs/dep-output.sh deleted file mode 100644 index 2e885540c..000000000 --- a/bs/dep-output.sh +++ /dev/null @@ -1,78 +0,0 @@ -t_alsa () -{ - dep_paths alsa - if test_header 'alsa/asoundlib'; then - ldflags="$ldflags -lasound -lm -ldl -lpthread" - echo t - fi -} - -t_ao () -{ - dep_paths ao - if test_header 'ao/ao'; then - ldflags="$ldflags -ld -lao" - echo t - fi -} - -t_fifo () -{ - echo t -} - -t_mvp () -{ - echo t -} - -t_oss () -{ - dep_paths oss - test_header 'sys/soundcard' && echo t -} - -t_pulse () -{ - dep_paths pulse - test_header 'pulse/simple' && echo 't' -} - -t_shout () -{ - dep_paths shout - ok= - if test "$PKGCONFIG" != "no" && `$PKGCONFIG --exists shout`; then - cflags="$cflags `$PKGCONFIG --variable=cflags_only shout`" - cflags="$cflags `$PKGCONFIG --variable=cppflags shout`" - ldflags="$ldflags `$PKGCONFIG --libs shout`" - ok=t - else - test -z "$sc" && sc="`which shoutconfig`" - if test `$sc --package` = "libshout"; then - cflags="$cflags `$sc --cflags-only`" - cflags="$cflags `$sc --cppflags shout`" - ldflags="$ldflags `$sc --libs`" - ok=t - fi - fi - # freebsd 6.1 + shout 2.2 port seems to leave pthread out - case "$uname_s" in - freebsd*) - case "$cflags" in - *-D_THREAD_SAFE*) - ldflags="$ldflags -lpthread" - ;; - esac - ;; - esac - - echo $ok -} - -t_sun () -{ - dep_paths sun - test_header 'sys/audioio' && echo t -} - diff --git a/bs/deps.sh b/bs/deps.sh deleted file mode 100644 index f2a86bc6c..000000000 --- a/bs/deps.sh +++ /dev/null @@ -1,27 +0,0 @@ -output_deps=' -alsa=t -ao=f -fifo=f -mvp=f -oss=t -pulse=t -shout=t -sun=t -' - -input_deps=' -aac=t -audiofile=t -flac=t -oggvorbis=t -oggflac=t -mod=f -mpc=t -mp3=t -tremor=f -' - -other_deps=' -id3=t -iconv=t -' diff --git a/bs/features.sh b/bs/features.sh deleted file mode 100644 index 48000a02c..000000000 --- a/bs/features.sh +++ /dev/null @@ -1,2 +0,0 @@ -. bs/bs-lib.sh - diff --git a/bs/mkconfig_header.sh b/bs/mkconfig_header.sh deleted file mode 100755 index 0f3f0d0e3..000000000 --- a/bs/mkconfig_header.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/sh - -# basic package info -p=mpd -v=0.12.0 -b=warren.dukes@gmail.com - -. bs/bs-lib.sh - -cat < t.c < -int main () { char *cs = nl_langinfo(CODESET); return 0; } -EOF -run_cc -test $? -eq 0 && echo '#define HAVE_LANGINFO_CODESET 1' - -# the only feature (non-external library) feature we currently have -if test x$want_ipv6 != xno; then - cat > t.c < -#include -#include -#ifdef PF_INET6 -#ifdef AF_INET6 -AP_maGiC_VALUE -#endif -#endif -EOF - if $CPP t.c 2>&1 | grep AP_maGiC_VALUE >/dev/null 2>&1; then - echo '#define HAVE_IPV6 1' - fi -fi - -rm -f t.o t.c diff --git a/bs/mkdep.sh b/bs/mkdep.sh deleted file mode 100755 index fb3ce12a7..000000000 --- a/bs/mkdep.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -f="$1" -d="`dirname $1`" -t=.tmp.$$ - -# -MM is gcc-specific... -$CC -MM $CPPFLAGS $CFLAGS "$f" > $t - -if test $? -ne 0; then - # ok, maybe -M is supported... - $CC -M $CPPFLAGS $CFLAGS "$f" > "$t" - - # guess not, fudge the dependencies by using all headers - if test $? -ne 0; then - echo "$O/$f: $f $O/config.h $HDR_DEP_HACK" | sed -e 's#c:#o:#' - exec rm -f $t - fi -fi - -sed -e 's#.c$#.o#' -e "1s#^#$O/$d/&#" < $t -exec rm -f $t