Skip to content

Commit

Permalink
Makefile: added new Makefile target 'compat' and first compatibility …
Browse files Browse the repository at this point in the history
…patches

For now 'compat' is not integrated into the standard 'make' build process,
so you have to call it separately via 'make compat'.

The first compatibility patches substitute two bash expression that were
introduced in bash4, so that bee is compatible to systems with bash prior
version 4.
  • Loading branch information
Tobias Dreyer committed Apr 27, 2012
1 parent fb9c22c commit f9b4e9e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ sed-rules = -e 's,@PREFIX@,${PREFIX},g' \
-e 's,@BEE_VERSION@,${BEE_VERSION},g' \
-e 's,@DATADIR@,${DATADIR},g'

sed-compat-bashlt4 = -e 'sx\$${\([a-zA-Z_]*\),,}x\$$(tr A-Z a-z <<<\$${\1})xg' \
-e 'sx\$${\([a-zA-Z_]*\)^^}x\$$(tr a-z A-Z <<<\$${\1})xg'


PROGRAMS_C=beeversion beesep beecut beeuniq beesort beegetopt
PROGRAMS_SHELL=bee beesh
PROGRAMS_PERL=beefind.pl
Expand All @@ -68,12 +72,20 @@ BEE_MANPAGES=bee.1 bee-check.1 bee-init.1 bee-install.1 bee-list.1 bee-query.1 b
CONFIG_TEMPLATES=fallback
CONFIG_FILES=skiplist beerc

COMPAT_BASHLT4=buildtypes/autogen.sh buildtypes/configure.sh buildtypes/make.sh \
src/beesh.sh.in src/bee-check.sh.in

.SUFFIXES: .in .sh .sh.in .pl

all: build

build: shellscripts perlscripts cprograms manpages

compat: compat-bashlt4

compat-bashlt4:
$(call quiet-command, sed ${sed-compat-bashlt4} -i ${COMPAT_BASHLT4}, "SED $@" )

SHELLSCRIPTS=$(PROGRAMS_SHELL) $(HELPER_BEE_SHELL)

BEEVERSION_OBJECTS=beeversion.o bee_version_parse.o bee_version_compare.o bee_version_output.o
Expand Down

0 comments on commit f9b4e9e

Please sign in to comment.