This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/4] Makefile: Replace old suffix rules with pattern rules


On 11/16/2016 04:08 PM, Simon Marchi wrote:
> From: Simon Marchi <simon.marchi@polymtl.ca>
> 
> As mentioned here [1], suffix rules are obsolete and have been
> superseeded with pattern rules.  People (myself included, before writing
> this patch) are more likely to know what pattern rules are than suffix
> rules.
> 
> AFAIK, .SUFFIXES targets are only used for those rules, and can be
> removed as well.
> 
> New in v2:
> 
>   - Replace rule in gdbserver/Makefile.in as well.
> 
> [1] https://www.gnu.org/software/make/manual/html_node/Suffix-Rules.html
> 
> gdb/ChangeLog:
> 
> 	* Makefile.in (.c.o): Replace rule with ...
> 	(%.o: %.c): ... this one.
> 	(.po.gmo): Replace rule with ...
> 	(%.gmo: %.po): ... this one.
> 	(.po.pox): Replace rule with ...
> 	(%.pox: %.po): ... this one.
> 	(.y.c): Replace rule with ...
> 	(%.c: %.y): ... this one.
> 	(.l.c): Replace rule with ...
> 	(%.c: %.l): ... this one.
> 	(.SUFFIXES): Remove all instances.
> 
> gdb/gdbserver/ChangeLog:
> 
> 	* Makefile.in (.c.o): Replace rule with ...
> 	(%.o: %.c): ... this one.

IMO, whether to explicitly remove default suffixes from the
the implicit rule suffixes list for efficiency is a separate
subject, since we're not currently doing it either.

Just to be sure none of the default suffix rules is necessary,
can you confirm:

1. that "make -r" (from scratch) still works.

2. that "make -r diststuff" in the gdb build dir still works.

If the above work, then this is OK with me to push in.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]