Skip to content

Commit

Permalink
add dependencies for modules compilation and protection flags USE_MOD…
Browse files Browse the repository at this point in the history
…ULES to avoid compilation issues (some people report problems but I don't know exactly what)
  • Loading branch information
gautierhattenberger committed Apr 1, 2009
1 parent aa5c420 commit 4b9b4f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile.ac
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ $(MAKEFILE_AC) : $(CONF)/$(AIRFRAME_XML)
@echo BUILD $@
$(Q)$(TOOLS)/extract_makefile.out $< $(MODULES_DIR) > $@

$(MODULES_H) : $(CONF)/$(AIRFRAME_XML) $(TOOLS)/gen_modules.out
$(MODULES_H) : $(CONF)/$(AIRFRAME_XML) $(TOOLS)/gen_modules.out $(CONF)/modules/*.xml
@echo BUILD $@
$(Q)$(TOOLS)/gen_modules.out $(MODULES_DIR) $(MODULES_C) $< > $@
$(Q)chmod a+r $@
Expand Down
4 changes: 4 additions & 0 deletions sw/tools/gen_modules.ml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ let () =
try
let xml = start_and_begin xml_file h_name in
begin_c_out xml_file "modules" out_c;
fprintf out_h "#ifdef USE_MODULES\n\n";
fprintf out_c "#ifdef USE_MODULES\n\n";
fprintf out_h "#define MODULES_IDLE 0\n";
fprintf out_h "#define MODULES_RUN 1\n";
fprintf out_h "#define MODULES_START 2\n";
Expand All @@ -266,6 +268,8 @@ let () =
parse_modules modules_list out_c;
end
else print_empty_functions ();
fprintf out_h "\n#endif // USE_MODULES\n";
fprintf out_c "\n#endif // USE_MODULES\n";
finish h_name;
close_out out_c;
with
Expand Down

0 comments on commit 4b9b4f2

Please sign in to comment.