Skip to content

Commit

Permalink
Makefile: allow to create buildtype from buildtype.in
Browse files Browse the repository at this point in the history
  • Loading branch information
mariux committed Apr 30, 2012
1 parent 08c2edb commit 7d587f4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ HELPER_BEE_C=bee-dep

LIBRARY_SHELL=beelib.config.sh

HELPER_BEESH_SHELL=configure cmake autogen perl-module perl-module-makemaker make python-module
BUILDTYPES=configure cmake autogen perl-module perl-module-makemaker make python-module

HELPER_HOOKS_SHELL=update-mime-database glib-compile-schemas mkfontdir-mkfontscale gtk-update-icon-cache \
ldconfig update-desktop-database gdk-pixbuf-query-loaders mandb systemd-tmpfiles
Expand All @@ -79,12 +79,12 @@ COMPAT_BASHLT4=buildtypes/autogen.sh buildtypes/configure.sh buildtypes/make.sh

all: build

build: shellscripts perlscripts cprograms manpages
build: shellscripts buildtypes perlscripts cprograms manpages

compat: compat-bashlt4

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

SHELLSCRIPTS=$(PROGRAMS_SHELL) $(HELPER_BEE_SHELL)

Expand All @@ -97,6 +97,7 @@ BEEDEP_OBJECTS=bee-dep.o graph.o hash.o beedep_tree.o node.o
BEEGETOPT_OBJECTS=bee_getopt.o beegetopt.o

shellscripts: $(addsuffix .sh,$(SHELLSCRIPTS)) $(LIBRARY_SHELL)
buildtypes: $(addsuffix .sh,$(addprefix buildtypes/,$(BUILDTYPES)))
perlscripts: $(PROGRAMS_PERL)
cprograms: $(PROGRAMS_C) ${HELPER_BEE_C}
manpages: ${BEE_MANPAGES}
Expand Down Expand Up @@ -134,6 +135,9 @@ beegetopt: $(addprefix src/, ${BEEGETOPT_OBJECTS})
%.1: manpages/%.1.in
$(call quiet-command,sed ${sed-rules} $< >$@,"SED $@")

buildtypes/%: buildtypes/%.in
$(call quiet-command,sed ${sed-rules} $< >$@,"SED $@")

clean:
$(call quiet-command,rm -f $(addsuffix .sh,${SHELLSCRIPTS}) $(LIBRARY_SHELL),"RM <various>.sh")
$(call quiet-command,rm -f ${PROGRAMS_PERL},"RM ${PROGRAMS_PERL}")
Expand Down Expand Up @@ -176,7 +180,7 @@ install-dir-beeshlib:
${DESTDIR}${LIBEXECDIR}/bee/%: % install-dir-beeshlib
$(call quiet-install,0755,$<,$@)

install-buildtypes: $(addsuffix .sh,$(addprefix ${DESTDIR}${LIBEXECDIR}/bee/beesh.d/,${HELPER_BEESH_SHELL}))
install-buildtypes: $(addsuffix .sh,$(addprefix ${DESTDIR}${LIBEXECDIR}/bee/beesh.d/,${BUILDTYPES}))

install-dir-buildtypes:
$(call quiet-installdir,0755,${DESTDIR}${LIBEXECDIR}/bee/beesh.d)
Expand Down

0 comments on commit 7d587f4

Please sign in to comment.