[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PROPOSAL] changing policy on compiling with -g .. a better way



> However, have you looked at the cost of this proposal? This entails
> that one massage upstream Makefiles (or several Makefiles) to take
> not of an environment variable to add debugging flags. That is more
> difficult than a static, one time edit of the Makefiles involved to
> add the -g and the strip commands.
> 
> Please note that you may have to take additional action to pass
> these variables to a sub-make. Except by explicit request, `make'
> exports a variable only if it is either defined in the environment
> initially or set on the command line, and if its name consists only
> of letters, numbers, and underscores.

In most cases, it should be possible to specify new CFLAGS on the
command line when calling the upstream Makefile. This way, the change
is also passed down to sub-makes.

So you can define your own CFLAGS in debian/rules (with or without -g,
depending on BUILD_DEBUG) and call

	make CFLAGS="$(CFLAGS)" all

This should work for the big mass of packages. Only a minority should
require real changes in the upstream Makefiles.

Roman


Reply to: