Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #67456

Re: Adding compilation arguments to 4000 make files. . .

From Ralf Fassel <ralfixx@gmx.de>
Newsgroups comp.lang.c++
Subject Re: Adding compilation arguments to 4000 make files. . .
Date 2019-08-08 17:54 +0200
Message-ID <yga36ibveji.fsf@akutech.de> (permalink)
References <ea8b6885-d11b-47b5-af6f-10ca3b171ba6@googlegroups.com>

Show all headers | View raw


* Frederick Gotham <cauldwell.thomas@gmail.com>
| I want to recompile the entire firmware, passing "-funwind-tables" to
| the compiler, and passing "-rdynamic" to the linker.
>
| If all of my four thousand Makefiles were written properly, all I
| would have to do is:
>
| export CPPFLAGS=-funwind-tables
| export LDEXTRAFLAGS=-rdynamic
>
| Unfortunately, not all four thousand Makefiles are written
| properly. Some of them have a line like "CPPFLAGS=-Wall", i.e. they
| use = instead of +=, and so this gets rid of my own special arguments.
>
| I'm thinking maybe I should replace the compiler binary file, and also
| the linker binary file, with a one-liner script like this:
>
| g++ -funwind-tables -rdynamic $*
>
| Any suggestions on how best to do this?

  cd /top/of/source/tree
  find . -name Makefile | xargs sed -i.bak -e 's/CPPFLAGS *=/CPPFLAGS +=/'

Probably anchor the matches against beginning of line or somesuch.

Untested, of course.

HTH
R'

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Adding compilation arguments to 4000 make files. . . Frederick Gotham <cauldwell.thomas@gmail.com> - 2019-08-08 07:10 -0700
  Re: Adding compilation arguments to 4000 make files. . . Ralf Fassel <ralfixx@gmx.de> - 2019-08-08 17:54 +0200
  Re: Adding compilation arguments to 4000 make files. . . Szyk Cech <szykcech@spoko.pl> - 2019-08-08 18:35 +0200
  Re: Adding compilation arguments to 4000 make files. . . Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-08-08 19:02 +0000
    Re: Adding compilation arguments to 4000 make files. . . scott@slp53.sl.home (Scott Lurndal) - 2019-08-08 19:56 +0000
      Re: Adding compilation arguments to 4000 make files. . . Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-08-09 14:01 +0000
        Re: Adding compilation arguments to 4000 make files. . . scott@slp53.sl.home (Scott Lurndal) - 2019-08-09 14:36 +0000
          Re: Adding compilation arguments to 4000 make files. . . Ian Collins <ian-news@hotmail.com> - 2019-08-10 09:43 +1200
          Re: Adding compilation arguments to 4000 make files. . . David Brown <david.brown@hesbynett.no> - 2019-08-10 17:06 +0200
  Re: Adding compilation arguments to 4000 make files. . . Frederick Gotham <cauldwell.thomas@gmail.com> - 2019-08-09 06:46 -0700

csiph-web