Hello, Am Montag, 14. September 2015 schrieb John Johansen: > Rework build depedencies to the full list of headers so that if > a file is updated to include a header the make file doesn't need > to be updated as well.
Good idea, but you accidently dropped some dependencies - see below for details. Using a *.h wildcard for HDRS might be a good idea, but (if you like the idea at all) that's something for a follow-up patch. > Signed-off-by: John Johansen <[email protected]> > --- > parser/Makefile | 52 > ++++++++++++++++++++++++++-------------------------- 1 file changed, > 26 insertions(+), 26 deletions(-) > > diff --git a/parser/Makefile b/parser/Makefile > index b748d99..0024b17 100644 > --- a/parser/Makefile > +++ b/parser/Makefile ... > -parser_misc.o: parser_misc.c parser.h parser_yacc.h profile.h > cap_names.h $(APPARMOR_H) > +parser_misc.o: parser_misc.c $(HDRS) parser_yacc.h and cap_names.h are not part of HDRS, therefore please keep them as dependencies or add them to HDRS. Adding to HDRS might be a good idea especially for parser_yacc.h because you accidently dropped it from quite some targets (see below), so updating HDRS is a) the cleaner solution and b) less work ;-) > -parser_main.o: parser_main.c parser.h parser_version.h policy_cache.h > libapparmor_re/apparmor_re.h $(APPARMOR_H) > +parser_main.o: parser_main.c $(HDRS) libapparmor_re/apparmor_re.h > $(APPARMOR_H) parser_version.h is not part of HDRS. > -dbus.o: dbus.cc dbus.h parser.h immunix.h parser_yacc.h rule.h > $(APPARMOR_H) > +dbus.o: dbus.cc $(HDRS) $(APPARMOR_H) > $(CXX) $(EXTRA_CXXFLAGS) -c -o $@ $< parser_yacc.h is not part of HDRS. > -signal.o: signal.cc signal.h parser.h immunix.h parser_yacc.h rule.h > $(APPARMOR_H) +signal.o: signal.cc $(HDRS) $(APPARMOR_H) > $(CXX) $(EXTRA_CXXFLAGS) -c -o $@ $< parser_yacc.h is not part of HDRS. > -ptrace.o: ptrace.cc ptrace.h parser.h immunix.h parser_yacc.h rule.h > $(APPARMOR_H) > +ptrace.o: ptrace.cc $(HDRS) $(APPARMOR_H) > $(CXX) $(EXTRA_CXXFLAGS) -c -o $@ $< parser_yacc.h is not part of HDRS. > -network.o: network.c network.h parser.h immunix.h parser_yacc.h > rule.h af_names.h $(APPARMOR_H) > +network.o: network.c $(HDRS) $(APPARMOR_H) > $(CXX) $(EXTRA_CXXFLAGS) -c -o $@ $< parser_yacc.h is not part of HDRS. > -af_rule.o: af_rule.cc af_rule.h network.h parser.h profile.h > immunix.h parser_yacc.h rule.h $(APPARMOR_H) > +af_rule.o: af_rule.cc $(HDRS) $(APPARMOR_H) > $(CXX) $(EXTRA_CXXFLAGS) -c -o $@ $< parser_yacc.h is not part of HDRS. > -af_unix.o: af_unix.cc af_unix.h network.h af_rule.h parser.h > profile.h immunix.h parser_yacc.h $(APPARMOR_H) > +af_unix.o: af_unix.cc $(HDRS) $(APPARMOR_H) > $(CXX) $(EXTRA_CXXFLAGS) -c -o $@ $< parser_yacc.h is not part of HDRS. > -rule.o: rule.cc rule.h policydb.h > +rule.o: rule.cc $(HDRS) > $(CXX) $(EXTRA_CXXFLAGS) -c -o $@ $< policydb.h is not part of HDRS, so please keep it here. With parser_yacc.h, cap_names.h and policydb.h added to HDRS or kept as dependency in the targets listed above, Acked-by: Christian Boltz <[email protected]> (No need to send an updated patch - I don't even want to check this again ;-) Regards, Christian Boltz -- I wonder how we ended up with baseurl and extra_url, now we are missing one with a "-" like "data-dir" to violate consistency and the principle of least surprise in all possible ways. [Duncan Mac-Vicar Prett in bnc#449842] -- AppArmor mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
