[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
exporting functions?
From: |
Erik Rull |
Subject: |
exporting functions? |
Date: |
Thu, 04 Nov 2010 18:04:56 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.15) Gecko/20101027 Lightning/1.0b1 SeaMonkey/2.0.10 |
Hi all,
I have a base Makefile that calls sub makefiles.
In the base file there is the following part:
assert_target_dir=$(assert_target_dir_cmd)
define assert_target_dir_cmd
mkdir -p /home/user/target$(1)
endef
export assert_target_dir assert_target_dir_cmd
install:
$(call assert_target_dir,/sbin)
+ make -f Makefile.install
in Makefile.install:
.PHONY: all
all:
$(call assert_target_dir,/etc)
[...]
What happens when I call make install:
mkdir -p /home/user/target/sbin
make -f Makefile.install
mkdir -p /home/user/target
^^ here is /etc missing!
so basically the funtion gets "exported" but it seems to be not possible to
give a parameter with the $(call ...)
What's wrong here? Am I doing something wrong? or is it not possible to
define and export functions in such way?
Any ideas how to solve my issue?
Thanks a lot!
Best regards,
Erik
- exporting functions?,
Erik Rull <=