c++ - makefile/nmake : strip out folder bits from the file list -
I have a mess file (using NMAK and VC ++ 2005):
CPP_obbs = $ (CPP_SOURCE: .cpp = .obj) $ (TARGET) $$ (CPP_OBJS) $ (link) $ (ldebug) $ (lflags) / DLL \ $ (LIBPATHS) \ $ out: $ @ $ (CPP_OBJS $ (Consિઝ)
Link to problem problem fails because $ (CPP_objects) extends into the list of files where each file name is a folder name (by the way it uses CPPICRCR Is produced with) Taking added. And since all .obj files are in the current folder (the result of the compilation) - link.exe fails to detect .obj.
I want something like this: (I found it here :)
`$ (notdir NAMES ...) extract 'everyone but the directory of each file name in the NAMES- If the file name does not have any slashes, then it has not been left unchanged. Otherwise, everything is removed through the last slash.
But this thing is not working for NMKE which comes with VC ++ 2005
Any idea how far this issue removes is greatly appreciated Thanks.
$ (notdir)
is not working for you because it If you are using NMKE, then make GNU facility.
It is not completely clear to you that what you are trying to do, but the short answer to your question is to use the NMAKE automatic variable with the file modifier. In this case there is a list of all prerequisites for the $ (**)
target, and the directory names will be expunged by adding the F
modifier. For example:
CPP_SOURCE = Subdir / Fu. Cop sub-DD / bar CPP CPP_OBJS = $ (CPP_SOURCE: CPP = .object) All: $ (CPP_obbs) @Ateo Unloaded: $ (* *) @echo FileName: $ (** F)
< / Pre>Assume that you have a file with
subdir
file withfoo.obj
andbar.obj
, it prints Is:duplicated: subdir / foo.obj subtitles / bar.obj only file name: foo.obj bar.obj
Hope that helps is.
Comments
Post a Comment