[patch] make check-c++ bits

DJ Delorie dj@redhat.com
Mon Feb 19 19:14:00 GMT 2001


We should be careful, adding language-centric targets like this, to
indicate languages (c, c++, java, f77) and compilers (gcc, g++, gcj,
g77) appropriately and correctly.  "check-g++" should check the
compiler, but "check-c++" should check all appropriate c++-related
things, regardless of which Makefile you're using.  That doesn't mean
that all those targets must be there, but if they *are* there, we
should be careful to choose the appropriate names according to whether
the target is compiler-specific, or language-specific.

So although "make check-c++" does different things in top vs gcc, it
semantically means the same thing - check all available c++ things.  A
"make check-g++" target in top (not that I'd advise one), for example,
should only test the compiler, even though the c++ libraries are
subdirectories of top.

I'm wondering if we should have a top-level "check-languages" that
checks all gcc-based compilers and all their runtimes, for people who
have builds that include things besides gcc (like gdb, cygwin, etc).
How many others of gcc's runtimes have testsuites?


> This allows one to do a 'make check-c++' at the top level of a build
> directory and test g++ and libstdc++-v3. 
> 
> I'm not quite sure this is the best way to do this, but it does work. 
>
> 2001-02-19  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>
> 
> 	* Makefile.in (check-c++): New rule.

Approved, but...

+ 	  (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++; cd $(r)); \

You shouldn't need the "cd $(r)" here.  The outer () forces a
subshell, which isolates the first cd from the main shell.  Unless you
know something the rest of us don't know. ;-)



More information about the Gcc-patches mailing list