Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Nov 2011 20:51:41 -0500
From:      Ryan Stone <rysto32@gmail.com>
To:        Paul Ambrose <ambrosehua@gmail.com>
Cc:        freebsd-current <freebsd-current@freebsd.org>
Subject:   Re: config(8) does not add post-processing for source file with compile-with command in sys/conf/files
Message-ID:  <CAFMmRNyvDGJB=vUV=JXYtELxo=U21PiOAH_m_6hRmCQ9pJj26g@mail.gmail.com>
In-Reply-To: <CAMwoQQ7Qa29eZnEKDmeVjx723AOejSWm%2BffgffEP3ZUUUuvzGA@mail.gmail.com>
References:  <CAMwoQQ7Qa29eZnEKDmeVjx723AOejSWm%2BffgffEP3ZUUUuvzGA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 18, 2011 at 10:21 PM, Paul Ambrose <ambrosehua@gmail.com> wrote:
> when I digged the a PR(bin/160275), I found in_proto.c and
> if_ethersubr.c ( see sys/conf/files ) does not get
> ${NORMAL_CTFCONVERT} post-processing in Makefile
> (/usr/obj/usr/src/sys/MYKERNEL/Makefile) generated by config(8), so
> the objs does not contain ctf section

Here's a second attempt at this one.  I think that this version is
much cleaner than the other options in this thread.  If it survives a
make universe I intend to commit this:

Index: usr.sbin/config/mkmakefile.c
===================================================================
--- usr.sbin/config/mkmakefile.c        (revision 227341)
+++ usr.sbin/config/mkmakefile.c        (working copy)
@@ -762,16 +762,21 @@
                                break;
                        }
                        snprintf(cmd, sizeof(cmd),
-                           "${%s_%c%s}\n\t@${NORMAL_CTFCONVERT}", ftype,
+                           "${%s_%c%s}\n", ftype,
                            toupper(och),
                            ftp->f_flags & NOWERROR ? "_NOWERROR" : "");
                        compilewith = cmd;
                }
                *cp = och;
                if (strlen(ftp->f_objprefix))
-                       fprintf(f, "\t%s $S/%s\n\n", compilewith, np);
+                       fprintf(f, "\t%s $S/%s\n", compilewith, np);
                else
-                       fprintf(f, "\t%s\n\n", compilewith);
+                       fprintf(f, "\t%s\n", compilewith);
+
+               if (!(ftp->f_flags & NO_OBJ))
+                       fprintf(f, "\t@${NORMAL_CTFCONVERT}\n\n");
+               else
+                       fprintf(f, "\n");
        }
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFMmRNyvDGJB=vUV=JXYtELxo=U21PiOAH_m_6hRmCQ9pJj26g>