From: Michal Sojka Date: Mon, 21 Feb 2011 15:50:57 +0000 (+0100) Subject: Update Makefile.rules to have bin_SCRIPTS support X-Git-Url: https://rtime.felk.cvut.cz/gitweb/frescor/frsh-forb.git/commitdiff_plain/2901b8114bffdb4f9610dc5c556d9cab2c49bee2 Update Makefile.rules to have bin_SCRIPTS support --- diff --git a/build/aquosa/Makefile.rules b/build/aquosa/Makefile.rules index 37e018c1..59b23a88 100644 --- a/build/aquosa/Makefile.rules +++ b/build/aquosa/Makefile.rules @@ -4,7 +4,7 @@ # (C) Copyright 2006, 2007, 2008, 2009, 2010 by Michal Sojka - Czech Technical University, FEE, DCE # # Homepage: http://rtime.felk.cvut.cz/omk/ -# Version: 0.2-47-g1d14a3e +# Version: 0.2-48-gee527d4 # # The OMK build system is distributed under the GNU General Public # License. See file COPYING for details. @@ -34,6 +34,7 @@ # bin_PROGRAMS .. list of the require binary programs # utils_PROGRAMS .. list of the development utility programs # test_PROGRAMS .. list of the testing programs +# bin_SCRIPTS .. list of scripts to be copied to _compiled/bin # kernel_MODULES .. list of the kernel side modules/applications # rtlinux_MODULES .. list of RT-Linux the kernel side modules/applications # xxx_SOURCES .. list of specific target sources @@ -690,6 +691,13 @@ $(2)/$(1)$(3): $$($(1)_OBJS) @echo >>$(USER_OBJS_DIR)/$(1).exe.d endef +# Usage: $(call SCRIPT_template,,) +define SCRIPT_template +$(2)/$(1): $$(SOURCES_DIR)/$(1) + @$(QUIET_CMD_ECHO) " CP $$@" + $(Q)cp $$^ $$@ +endef + # Syntax: $(call LIBRARY_template,) define LIBRARY_template @@ -749,7 +757,10 @@ endef library-pass-local: $(addprefix $(USER_INCLUDE_DIR)/,$(cmetric_include_HEADERS)) \ $(lib_LIBRARIES:%=$(USER_LIB_DIR)/lib%.a) $(shared_LIBRARIES:%=$(OMK_WORK_DIR)/lib%.$(SOLIB_EXT).omkvar) -binary-pass-local: $(bin_PROGRAMS:%=$(USER_BIN_DIR)/%$(EXE_SUFFIX)) $(utils_PROGRAMS:%=$(USER_UTILS_DIR)/%$(EXE_SUFFIX)) $(test_PROGRAMS:%=$(USER_TESTS_DIR)/%$(EXE_SUFFIX)) +binary-pass-local: $(bin_PROGRAMS:%=$(USER_BIN_DIR)/%$(EXE_SUFFIX)) \ + $(utils_PROGRAMS:%=$(USER_UTILS_DIR)/%$(EXE_SUFFIX)) \ + $(test_PROGRAMS:%=$(USER_TESTS_DIR)/%$(EXE_SUFFIX)) \ + $(bin_SCRIPTS:%=$(USER_BIN_DIR)/%) # Special rules for CMETRIC generated headers @@ -772,6 +783,9 @@ $(foreach prog,$(test_PROGRAMS),$(eval $(call PROGRAM_template,$(prog),$(USER_TE $(foreach prog,$(bin_PROGRAMS),$(eval $(call PROGRAM_template,$(prog),$(USER_BIN_DIR),$(EXE_SUFFIX)))) +$(foreach script,$(bin_SCRIPTS),$(eval $(call SCRIPT_template,$(script),$(USER_BIN_DIR)))) + + $(foreach lib,$(lib_LIBRARIES),$(eval $(call LIBRARY_template,$(lib)))) $(foreach lib,$(shared_LIBRARIES),$(eval $(call SOLIB_template,$(lib)))) @@ -1114,7 +1128,7 @@ kernel-modpost-pass: fi $(eval $(call omk_pass_template, library-pass,$(USER_OBJS_DIR),USER_RULE_TEMPLATES=y,$(lib_LIBRARIES)$(shared_LIBRARIES))) -$(eval $(call omk_pass_template, binary-pass, $(USER_OBJS_DIR),USER_RULE_TEMPLATES=y,$(bin_PROGRAMS)$(utils_PROGRAMS)$(test_PROGRAMS))) +$(eval $(call omk_pass_template, binary-pass, $(USER_OBJS_DIR),USER_RULE_TEMPLATES=y,$(bin_PROGRAMS)$(utils_PROGRAMS)$(test_PROGRAMS)$(bin_SCRIPTS))) $(eval $(call omk_pass_template,clean,$(USER_OBJS_DIR),,always)) $(eval $(call omk_pass_template,install,$(USER_OBJS_DIR),,always))