diff --git a/Makefile b/Makefile index 0efddaa275..3730842a9f 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ MISC=sw/ground_segment/misc LOGALIZER=sw/logalizer SIMULATOR=sw/simulator EXT=sw/ext -MAKE=make PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) +MAKE:=$(MAKE) PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) CONF=$(PAPARAZZI_SRC)/conf STATICINCLUDE =$(PAPARAZZI_HOME)/var/include MESSAGES_H=$(STATICINCLUDE)/messages.h @@ -252,7 +252,7 @@ cleanspaces: distclean : dist_clean dist_clean : - @echo "Warning: This removes all non-repository files. This means you will loose your aircraft list, your maps, your logfiles, ... if you want this, then run: make dist_clean_irreversible" + @echo "Warning: This removes all non-repository files. This means you will loose your aircraft list, your maps, your logfiles, ... if you want this, then run: $(MAKE) dist_clean_irreversible" dist_clean_irreversible: clean rm -rf conf/srtm_data @@ -270,7 +270,7 @@ test_all_example_airframes: $(MAKE) AIRCRAFT=EasyStar_ETS clean_ac ap sim test_all_example_airframes2: - for ap in `grep name conf/conf.xml.example | sed -e 's/.*name=\"//' | sed -e 's/"//'`; do echo "Making $$ap"; make -C ./ AIRCRAFT=$$ap clean_ac ap.compile; done + for ap in `grep name conf/conf.xml.example | sed -e 's/.*name=\"//' | sed -e 's/"//'`; do echo "Making $$ap"; $(MAKE) -C ./ AIRCRAFT=$$ap clean_ac ap.compile || exit 1; done commands: paparazzi sw/simulator/launchsitl diff --git a/Makefile.ac b/Makefile.ac index 3d04b1aa22..d738526d7f 100644 --- a/Makefile.ac +++ b/Makefile.ac @@ -51,7 +51,7 @@ SETTINGS_FILE=$(SETTINGS:settings%=%) #TUNING_FILE=$(subst ,_,$(SETTINGS:settings/%.xml=%)).h TUNING_H=$(AC_GENERATED)/tuning.h SUPERVISION=./paparazzi -MAKE=make PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) +MAKE:=$(MAKE) PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) MODULES_H=$(AC_GENERATED)/modules.h AIRCRAFT_MD5=$(AIRCRAFT_CONF_DIR)/aircraft.md5 @@ -138,7 +138,7 @@ $(MODULES_H) : $(CONF)/$(AIRFRAME_XML) $(TOOLS)/gen_modules.out $(CONF)/modules/ $(SETTINGS_MODULES) : $(MODULES_H) %.ac_h : $(TOOLS)/gen_aircraft.out - $(Q)if (expr "$(AIRCRAFT)"); then : ; else echo "AIRCRAFT undefined: type 'make AIRCRAFT=AircraftName ...'"; exit 1; fi + $(Q)if (expr "$(AIRCRAFT)"); then : ; else echo "AIRCRAFT undefined: type '$(MAKE) AIRCRAFT=AircraftName ...'"; exit 1; fi @echo BUILD $(AIRCRAFT), TARGET $* +$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) TARGET=$* Q=$(Q) $(TOOLS)/gen_aircraft.out $(AIRCRAFT) @@ -187,5 +187,5 @@ check_fuses_fbw: fbw.check_fuses hard_ac ac: ac_h fbw ap clean_ac : - $(Q)if (expr "$(AIRCRAFT)"); then : ; else echo "AIRCRAFT undefined: type 'make AIRCRAFT=AircraftName ...'"; exit 1; fi + $(Q)if (expr "$(AIRCRAFT)"); then : ; else echo "AIRCRAFT undefined: type '$(MAKE) AIRCRAFT=AircraftName ...'"; exit 1; fi rm -fr $(PAPARAZZI_HOME)/var/$(AIRCRAFT) diff --git a/conf/autopilot/subsystems/fixedwing/autopilot.makefile b/conf/autopilot/subsystems/fixedwing/autopilot.makefile index cbd327bfb5..4d4b89a45c 100644 --- a/conf/autopilot/subsystems/fixedwing/autopilot.makefile +++ b/conf/autopilot/subsystems/fixedwing/autopilot.makefile @@ -173,7 +173,7 @@ ap_srcs += $(SRC_FIRMWARE)/ap_downlink.c UNAME = $(shell uname -s) ifeq ("$(UNAME)","Darwin") - sim.CFLAGS += -I/opt/paparazzi/include/ -I/opt/local/include/ + sim.CFLAGS += $(shell if test -d /opt/local/include; then echo "-I/opt/local/include"; elif test -d /opt/paparazzi/include; then echo "-I/opt/paparazzi/include"; fi) endif sim.CFLAGS += $(CPPFLAGS) diff --git a/sw/ground_segment/lpc21iap/Makefile b/sw/ground_segment/lpc21iap/Makefile index dc4a954a37..419a2717a3 100644 --- a/sw/ground_segment/lpc21iap/Makefile +++ b/sw/ground_segment/lpc21iap/Makefile @@ -27,12 +27,10 @@ endif UNAME = $(shell uname -s) ifeq ("$(UNAME)","Darwin") - LIBRARYS = -L /opt/paparazzi/lib -L /opt/local/lib - INCLUDES = -I /opt/paparazzi/include -I /opt/local/include/ + LIBRARYS = $(shell if test -d /opt/local/lib; then echo "-L /opt/local/lib"; elif test -d /opt/paparazzi/lib; then echo "-L /opt/paparazzi/lib"; fi) + INCLUDES = $(shell if test -d /opt/local/include; then echo "-I /opt/local/include"; elif test -d /opt/paparazzi/include; then echo "-I /opt/paparazzi/include"; fi) endif - - CFLAGS = -Wall -g $(FPIC) $(INCLUDES) $(LIBRARYS) SOURCES = lpc21iap.c elf.c lpcusb.c diff --git a/sw/ground_segment/misc/Makefile b/sw/ground_segment/misc/Makefile index 7870fe7e62..08572c95ae 100644 --- a/sw/ground_segment/misc/Makefile +++ b/sw/ground_segment/misc/Makefile @@ -1,8 +1,8 @@ UNAME = $(shell uname -s) ifeq ("$(UNAME)","Darwin") - LIBRARYS = -L /opt/paparazzi/lib -L /opt/local/lib - INCLUDES = -I /opt/paparazzi/include -I /opt/local/include/ + LIBRARYS = $(shell if test -d /opt/local/lib; then echo "-L /opt/local/lib"; elif test -d /opt/paparazzi/lib; then echo "-L /opt/paparazzi/lib"; fi) + INCLUDES = $(shell if test -d /opt/local/include; then echo "-I /opt/local/include"; elif test -d /opt/paparazzi/include; then echo "-I /opt/paparazzi/include"; fi) else LIBRARYS = -s endif diff --git a/sw/ground_segment/multimon/Makefile b/sw/ground_segment/multimon/Makefile index d7c9d2988b..45e235386e 100644 --- a/sw/ground_segment/multimon/Makefile +++ b/sw/ground_segment/multimon/Makefile @@ -32,7 +32,7 @@ LD =ld LDFLAGS =-lm HOSTCC =gcc CC =gcc -MAKE =make +MAKE :=$(MAKE) CPP =$(CC) -E AR =ar STRIP =strip diff --git a/sw/lib/ocaml/xml2h.ml b/sw/lib/ocaml/xml2h.ml index 0aca62a239..093e42af8a 100644 --- a/sw/lib/ocaml/xml2h.ml +++ b/sw/lib/ocaml/xml2h.ml @@ -77,6 +77,6 @@ let finish = fun h_name -> let warning s = Printf.fprintf stderr "##################################################\n"; - Printf.fprintf stderr "\n %s\n" s; - Printf.fprintf stderr "\n##################################################\n" + Printf.fprintf stderr " %s\n" s; + Printf.fprintf stderr "##################################################\n" diff --git a/sw/supervision/Makefile b/sw/supervision/Makefile index 462de61158..abfa686910 100644 --- a/sw/supervision/Makefile +++ b/sw/supervision/Makefile @@ -4,7 +4,7 @@ Q=@ OCAMLC = ocamlc OCAMLOPT = ocamlopt OCAMLLIB = ../lib/ocaml -INCLUDES= -I $(OCAMLLIB) -I ../multimon $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light) +INCLUDES= -I $(OCAMLLIB) $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light) LIBPPRZCMA=$(OCAMLLIB)/lib-pprz.cma PAPARAZZICENTERCMO = gtk_pc.cmo gtk_process.cmo pc_common.cmo pc_aircraft.cmo pc_control_panel.cmo paparazzicenter.cmo