help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

can't always get make to auto create build directory


From: LMHmedchem
Subject: can't always get make to auto create build directory
Date: Tue, 28 Jun 2016 09:08:51 -0700 (PDT)

Hello,

I have a make file that gathers some local information and uses it (in
theory) to create a locally named build directory if it doesn't exist.



The test print code prints what I would expect,


When I run this from "make -f makefile al" I get an error,



If I manually create the build directory,
bld_CYGWIN_NT-5.1_2.3.i686_gcc-4.9.3, the compiler continues and creates the
first object, main.o. I have had this issue off and on and can't seem to
identify where the problem is. In some cases, the directory doesn't get
created and in others it does. I use the same syntax for mkdir in every make
file, so I'm not sure where I am going wrong. It's not the end of the world
to have to manually create a directory but I am trying to set up some of
this to be automated based on whatever system I am booted into. The "@
mkdir" statement is indented with a tab if that isn't clear with this
formatting.

For now, I have replaced the make command,


with some shell commands,


This seems to work. The code creates the directory when it is not present
and does nothing when it is. There are no error messages to deal with.

I would prefer to get this working with make commands instead of going to
the shell but I do need to get this working with some solution. Can anyone
point out why my make commands fail to create the directory when it doesn't
exist? Is the shell method above a reasonable solution, meaning will it
likely work on most platforms?

Suggestions would be appreciated.

*LMHmedchem*



--
View this message in context: 
http://gnu-make.2324884.n4.nabble.com/can-t-always-get-make-to-auto-create-build-directory-tp17226.html
Sent from the Gnu - Make - Help mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]