Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!uunet!taumet!steve From: steve@taumet.com (Stephen Clamage) Newsgroups: comp.lang.c++ Subject: Re: Wisdom for handling C++ files with suffix .cc Message-ID: <767@taumet.com> Date: 14 Jun 91 14:22:47 GMT References: <1991Jun13.200637.16078@watson.ibm.com>,<1991Jun13.185016.22785@johnny5.uucp> Organization: Taumetric Corporation, San Diego Lines: 40 garvey@johnny5.uucp (Joe Garvey) writes: >It seems there are different convensions for naming programs. >GNU's libg++ has *.hP and *.ccP extensions. ------------- oasis@watson.ibm.com (GA.Hoffman) writes: >I just received a bunch of c++ files with suffix .cc, >CC wants .C or some such ... is there conventional wisdom >on handling this in makefiles? I'm currently making a >link during the compile, file by file to a file with the >desired suffix. ------------- There are no real standards in this area. Different compilers allow or require different sorts of file name endings. Some people want to have different endings to distinguish C from C++ files so that makefiles can invoke the right compiler. When I need to use source files with different compilers requiring different endings, I just rename the files. (They are usually on different machines anyway.) If you want to run the same files through different compilers on the same machine, makeing links is not a bad way to handle it, provided you do it with attention to some details. Editing a file or replacing it via SCCS or RCS will often break the link, leaving two different files which are supposed to be the same file. Symbolic links solve that problem if your system supports them. You can also create rules in your makefile to handle the naming problems. You can use different file endings to call on different compilers, and create a temporary link to satisfy a compiler's requirements. -- Steve Clamage, TauMetric Corp, steve@taumet.com