[llvm-commits] [llvm] r169568 - /llvm/trunk/utils/unittest/googletest/Makefile

Alexey Samsonov samsonov at google.com
Thu Dec 6 18:00:03 PST 2012


On Thu, Dec 6, 2012 at 5:50 PM, NAKAMURA Takumi <geek4civic at gmail.com>wrote:

> 2012/12/7 Alexey Samsonov <samsonov at google.com>:
> > Thank you (and sorry for the breakage)!
> >
> > I looked at Makefile.common which has lines:
> > # 4. Source - If specified, this sets the source code filenames.  If this
> > #    is not set, it defaults to be all of the .cpp, .c, .y, and .l files
> > #    in the current directory.
>
> It's odd. Fixed in r169569. (I have confirmed to Eric, thanks)
>
> > Should we s/Source/SOURCES here?
>
> Sure. FYI;
>
> * http://llvm.org/docs/MakefileGuide.html#variables
>
> Variables are also used internally by the LLVM Makefile System.
> Variable names that contain only the upper case alphabetic letters and
> underscore are intended for use by the end user.
>
> * http://llvm.org/docs/MakefileGuide.html#control-variables
>
> SOURCES (optional)Specifies the list of source files in the current
> directory to be built. Source files of any type may be specified
> (programs, documentation, config files, etc.). If not specified, the
> makefile system will infer the set of source files from the files
> present in the current directory.
>
> * in Makefile.rules
>
> #----------------------------------------------------------
> # Get the list of source files and compute object file
> # names from them.
> #----------------------------------------------------------
>
> ifndef SOURCES
>   Sources := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.cpp \
>              $(PROJ_SRC_DIR)/*.cc $(PROJ_SRC_DIR)/*.c))
> else
>   Sources := $(SOURCES)
> endif
>
>
Thanks for the links and reference! (and, once again, sorry for breaking
all the bots).


>
> --
> HTH, Takumi
>
>
> > On Thu, Dec 6, 2012 at 5:25 PM, NAKAMURA Takumi <geek4civic at gmail.com>
> > wrote:
> >>
> >> Author: chapuni
> >> Date: Thu Dec  6 19:25:45 2012
> >> New Revision: 169568
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=169568&view=rev
> >> Log:
> >> unittest/googletest/Makefile: Unbreak out-of-tree build.
> >>
> >>   - Use SOURCES instead of Source. See Makefile.rules and
> >> MakefileGuide.html.
> >>   - Don't assume the current directory. $(wildcard *.cc) doesn't match
> >> anything on corresponding build directory.
> >>
> >> Modified:
> >>     llvm/trunk/utils/unittest/googletest/Makefile
> >>
> >> Modified: llvm/trunk/utils/unittest/googletest/Makefile
> >> URL:
> >>
> http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/Makefile?rev=169568&r1=169567&r2=169568&view=diff
> >>
> >>
> ==============================================================================
> >> --- llvm/trunk/utils/unittest/googletest/Makefile (original)
> >> +++ llvm/trunk/utils/unittest/googletest/Makefile Thu Dec  6 19:25:45
> 2012
> >> @@ -36,6 +36,6 @@
> >>
> >>  NO_INSTALL = 1
> >>
> >> -Source = $(filter-out gtest-all.cc,$(wildcard *.cc))
> >> +SOURCES = $(filter-out gtest-all.cc, $(notdir $(wildcard
> >> $(PROJ_SRC_DIR)/*.cc)))
> >>
> >>  include $(LEVEL)/Makefile.common
> >>
> >>
> >> _______________________________________________
> >> llvm-commits mailing list
> >> llvm-commits at cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >
> >
> >
> >
> > --
> > Alexey Samsonov, MSK
> >
>



-- 
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121206/b6dbc294/attachment.html>


More information about the llvm-commits mailing list