diff options
author | Lauri Leukkunen <lle@rahina.org> | 2006-08-27 20:02:27 +0300 |
---|---|---|
committer | Lauri Leukkunen <lleukkun@leka.rahina.org> | 2006-08-27 20:02:27 +0300 |
commit | 1eadc4554a2c50ce89fdf888c5244da4e466b0ee (patch) | |
tree | eb2a8bfd266ca2ba096e676dc91a0ee735e9f36f /llbuild | |
parent | 0bee06b3bd4d86c6ca928f51d661231f22fd98d7 (diff) |
* llbuild update
Diffstat (limited to 'llbuild')
-rw-r--r-- | llbuild/Makefile.include | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/llbuild/Makefile.include b/llbuild/Makefile.include index ee26c04..d26afc2 100644 --- a/llbuild/Makefile.include +++ b/llbuild/Makefile.include @@ -20,13 +20,15 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. - # Make sure this file is only included once per make invocation ifndef _LL_BUILD_MAKEFILE_INCLUDE _LL_BUILD_MAKEFILE_INCLUDE=1 +#$(warning Hello!) -include $(TOPDIR)/.config +LLBUILD ?= $(TOPDIR)/llbuild + built_in_target := built-in.o filter_subdirs := $(shell for d in $(obj-default) ; do if [ -d $$d ]; then echo $$d; fi; done) @@ -35,20 +37,20 @@ filter_objects := $(shell for f in $(obj-default) ; do if [ -d $$f ]; then echo clean_subdirs := $(foreach dir,$(filter_subdirs),$(CURDIR)/$(dir)) subdir_deps := $(patsubst %,%.subdir.d,$(clean_subdirs)) -LOCK ?= $(TOPDIR)/llbuild/llflock $@.lock +LOCK ?= $(LLBUILD)/llflock $@.lock %.subdir.d: @if [ ! -e $@.lock ]; then touch $@.lock; fi - @$(LOCK) /bin/sh -c "if [ ! -e $@ ]; then $(MAKE) --no-print-directory -C $(patsubst %.subdir.d,%,$@) -f $(TOPDIR)/llbuild/Makefile.build ll_subdir && touch $@; fi;" + @$(LOCK) /bin/sh -c "if [ ! -e $@ ]; then $(MAKE) --no-print-directory -C $(patsubst %.subdir.d,%,$@) -f $(LLBUILD)/Makefile.build ll_subdir && touch $@; fi;" ll_mainlevel: @find $(TOPDIR) -name "*.subdir.d.lock" -o -name "*.subdir.d" | xargs rm -f - @$(MAKE) --no-print-directory -f $(TOPDIR)/llbuild/Makefile.build $(subdir_deps) + @$(MAKE) --no-print-directory -f $(LLBUILD)/Makefile.build $(subdir_deps) ll_subdir: $(subdir_deps) - @$(MAKE) --no-print-directory -f $(TOPDIR)/llbuild/Makefile.build $(built_in_target) $(extra_targets) + @$(MAKE) --no-print-directory -f $(LLBUILD)/Makefile.build $(built_in_target) $(extra_targets) ifeq ("$(strip $(filter_objects))", "") $(built_in_target): @@ -67,7 +69,7 @@ define ll_pretty_run echo $$run_cmd; echo $(OPT_CURDIR)/$$run_output; \ false; \ else \ - echo [$$run_alias] [$(OPT_CURDIR)/$@] $^; \ + echo "[$$run_alias] [$(OPT_CURDIR)/$@] $$run_sources"; \ echo "$$run_output" | grep " warning: "; \ true ; \ fi @@ -80,25 +82,29 @@ endef endif define ll_pretty_build_c - @run_cmd="$(CC) $(CFLAGS) -Wp,-MD,$(dir $(@))/.$(notdir $(@)).d -o $@ -c $<"; \ + @run_sources="$<"; \ + run_cmd="$(CC) $(CFLAGS) -Wp,-MD,$(dir $(@))/.$(notdir $(@)).d -o $@ -c $<"; \ run_alias="CC"; \ $(ll_pretty_run) endef define ll_pretty_link_builtin - @run_cmd="$(LD) -r -nostartfiles -o $@ $^"; \ + @run_sources="$^"; \ + run_cmd="$(LD) -r -nostartfiles -o $@ $^"; \ run_alias="LD"; \ $(ll_pretty_run) endef define ll_pretty_link_shared_library - @run_cmd="$(CC) $(LDFLAGS) -shared -o $@ $^ $(LIBS)"; \ + @run_sources="$^"; \ + run_cmd="$(CC) $(LDFLAGS) -shared -o $@ $^ $(LIBS)"; \ run_alias="SHLIB"; \ $(ll_pretty_run) endef define ll_pretty_link_shared_binary - @run_cmd="$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)"; \ + @run_sources="$^"; \ + run_cmd="$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)"; \ run_alias="BIN";\ $(ll_pretty_run) endef @@ -119,14 +125,14 @@ endif .PHONY: build $(subdirs) define ll_clean - +@$(MAKE) --no-print-directory -C $(TOPDIR)/llbuild MAKEFLAGS= MAKEFILES= clean + +@$(MAKE) --no-print-directory -C $(LLBUILD) MAKEFLAGS= MAKEFILES= clean rm -rf $(CLEAN_FILES) find . -name "*.[oasd]" -o -name ".*.d" -o -name "*.*~" -o -name "*~" -o -name "*.lock" | xargs rm -rf endef define ll_toplevel_build - +@$(MAKE) --no-print-directory -C $(TOPDIR)/llbuild MAKEFLAGS= MAKEFILES= - +@$(MAKE) --no-print-directory -f $(TOPDIR)/llbuild/Makefile.build ll_mainlevel + +@$(MAKE) --no-print-directory -C $(LLBUILD) MAKEFLAGS= MAKEFILES= + +@$(MAKE) --no-print-directory -f $(LLBUILD)/Makefile.build ll_mainlevel endef endif |