From 70168207abc7f5c2b6a0fc766e03e8bf2b633009 Mon Sep 17 00:00:00 2001 From: Gautier Hattenberger Date: Wed, 16 Jan 2013 23:23:03 +0100 Subject: [PATCH] [conf] remove duplicates after setting all flags and sources --- sw/airborne/Makefile | 2 ++ sw/tools/gen_aircraft.ml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sw/airborne/Makefile b/sw/airborne/Makefile index 6103d785be..0368bc2c50 100644 --- a/sw/airborne/Makefile +++ b/sw/airborne/Makefile @@ -33,6 +33,8 @@ ifneq ($(MAKECMDGOALS),clean) include $(PAPARAZZI_HOME)/var/$(AIRCRAFT)/Makefile.ac $(TARGET).srcs += $($(TARGET).EXTRA_SRCS) include ../../conf/Makefile.local + $(TARGET).CFLAGS := $(sort $($(TARGET).CFLAGS)) + $(TARGET).srcs := $(sort $($(TARGET).srcs)) # check if ARCHDIR is set ifeq ($($(TARGET).ARCHDIR), ) diff --git a/sw/tools/gen_aircraft.ml b/sw/tools/gen_aircraft.ml index 964f416901..6c77423962 100644 --- a/sw/tools/gen_aircraft.ml +++ b/sw/tools/gen_aircraft.ml @@ -87,7 +87,7 @@ let dump_module_section = fun xml f -> List.iter (fun target -> fprintf f "%s.CFLAGS += -I modules -I arch/$(ARCH)/modules\n" target) target_list; **) (** include modules directory for ALL targets and not just the defined ones **) - fprintf f "$(TARGET).CFLAGS += -I modules -I arch/$(ARCH)/modules\n"; + fprintf f "$(TARGET).CFLAGS += -Imodules -Iarch/$(ARCH)/modules\n"; List.iter (fun dir -> let dir_name = (String.uppercase dir)^"_DIR" in fprintf f "%s = modules/%s\n" dir_name dir) dir_list; (* parse each module *) List.iter (fun m ->