| Author |
makefile too simple to see
|
|
|
| Here is my makefile
MKDIR := mkdir -p -m 777
TOP_DIR := dogs
COPY := /usr/bin/cp
define makedir
if ! [ -d $1 ] ; then \
$(MKDIR) $1 ; \
else \
echo "Directory '$1' exists"; \
fi
endef
..PHONY all build
all : build
build :
$(call makedir, $(TOP_DIR)/SourceTree)
$(call makedir, $(TOP_DIR)/ProductTree)
| |
| Måns Rullgård 2006-02-21, 5:54 pm |
| "billy" <bp1497@att.com> writes:
> Here is my makefile
And what do you want us to do with it?
> MKDIR := mkdir -p -m 777
> TOP_DIR := dogs
> COPY := /usr/bin/cp
>
> define makedir
> if ! [ -d $1 ] ; then \
> $(MKDIR) $1 ; \
> else \
> echo "Directory '$1' exists"; \
> fi
> endef
mkdir -p already does exactly that.
> .PHONY all build
>
> all : build
>
> build :
> $(call makedir, $(TOP_DIR)/SourceTree)
> $(call makedir, $(TOP_DIR)/ProductTree)
>
--
Måns Rullgård
mru@inprovide.com
| |
|
| I want to call the define, like a subroutine from many places. I dont
want to repeat it many times. mkdir is just the first function. After
I get this to work I will add more functionality to it. It will do a
sed to a file after checking it out of pvcs.
| |
| Måns Rullgård 2006-02-21, 5:54 pm |
| "billy" <bp1497@att.com> writes:
> I want to call the define, like a subroutine from many places. I dont
> want to repeat it many times. mkdir is just the first function. After
> I get this to work I will add more functionality to it. It will do a
> sed to a file after checking it out of pvcs.
Did you say PVCS? Do yourself a huge favor and bury that abomination
under at least 12 feet of cement right now.
--
Måns Rullgård
mru@inprovide.com
| |
|
| not my option. I'm just a lowly contractor 
|
|
|
|