From 8b08402c608f2cfea69e357d7d4f41ed2e552f3d Mon Sep 17 00:00:00 2001 From: Grant Morphett <grant@gmorph.com> Date: Thu, 15 Jan 2015 14:01:00 +1100 Subject: [PATCH] mk: Added a "help" target to the make system. Now if developers type "make help" they get a useful message. --- mk/apm.mk | 8 ++++++++ mk/help.mk | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 mk/help.mk diff --git a/mk/apm.mk b/mk/apm.mk index 05ea20fea..f81635607 100644 --- a/mk/apm.mk +++ b/mk/apm.mk @@ -16,6 +16,12 @@ include $(MK_DIR)/configure.mk else +# short-circuit build for the help target +ifeq ($(MAKECMDGOALS),help) +include $(MK_DIR)/help.mk + +else + # common makefile components include $(MK_DIR)/targets.mk include $(MK_DIR)/sketch_sources.mk @@ -53,3 +59,5 @@ endif endif endif + +endif diff --git a/mk/help.mk b/mk/help.mk new file mode 100644 index 000000000..41a63d99a --- /dev/null +++ b/mk/help.mk @@ -0,0 +1,35 @@ +help: + @echo "" + @echo " ArduPilot Building" + @echo " ==================" + @echo "" + @echo " The following web page has detailed information on building the code" + @echo " http://dev.ardupilot.com/wiki/building-the-code/" + @echo "" + @echo " Before building a target you need to be in the target vehicle type directory" + @echo " e.g. ArduPlane, ArduCopter, APMrover2, AntennaTracker" + @echo " and run \"make configure\"" + @echo "" + @echo " Most targets support a \"-upload\" extension to upload the firmware" + @echo " to a connected board. e.g. \"make px4-v2-upload\"" + @echo "" + @echo " Note that the px4 builds are NOT parallel safe, NO -j flag" + @echo "" + @echo " Targets" + @echo " -------" + @echo "" + @echo " configure - Set up build for vehicle type" + @echo "" + @echo " all - Build all targets" + @echo "" + @echo " apm1 - the APM1 board" + @echo " apm2 - the APM2 board" + @echo " px4-v1 - the PX4v1 board" + @echo " px4-v2 - the Pixhawk" + @echo " pxf - the Beagle Bone Black (BBB) + PXF cape combination" + @echo " navio - the RaspberryPi + NavIO cape combination" + @echo " linux - a generic Linux build" + @echo " flymaple - the FlyMaple board" + @echo " vrbrain - the VRBrain boards" + @echo " stil - the SITL Software In The Loop simulation" + @echo " bbbmini - the Beagle Bone Black mini" -- GitLab