Author: bonefish Date: 2010-05-20 21:01:18 +0200 (Thu, 20 May 2010) New Revision: 36878 Changeset: http://dev.haiku-os.org/changeset/36878/haiku Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/Jamfile Log: USBWebcamHeaderGen rule: Add grist to both header and sources. Simplifies the invocation and fixes the dependency problem (missing grist on the sources) that caused the headers not to be regenerated when the sources changed. Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/Jamfile =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/Jamfile 2010-05-20 17:39:12 UTC (rev 36877) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/Jamfile 2010-05-20 19:01:18 UTC (rev 36878) @@ -53,11 +53,13 @@ tas5130d1b.cpp ; -## how to build header files from sources to include the list of built-in addons. -# but it doesn't seem to work for some reason... +## how to build header files from sources to include the list of built-in addons rule USBWebcamHeaderGen header : macro : sources { + header = [ FGristFiles $(header) ] ; + sources = [ FGristFiles $(sources) ] ; + SEARCH on $(sources) = $(SEARCH_SOURCE) ; Depends $(header) : $(sources) ; @@ -72,11 +74,10 @@ grep -h $(GREP_DEFINE) $(2) > $(1) ; } -USBWebcamHeaderGen [ FGristFiles CamInternalAddons.h ] - : B_WEBCAM_MKINTFUNC : $(addonSources) ; -USBWebcamHeaderGen [ FGristFiles CamInternalSensors.h ] - : B_WEBCAM_DECLARE_SENSOR : $(sensorsSources) ; -USBWebcamHeaderGen [ FGristFiles CamInternalColorSpaceTransforms.h ] +USBWebcamHeaderGen CamInternalAddons.h : B_WEBCAM_MKINTFUNC : $(addonSources) ; +USBWebcamHeaderGen CamInternalSensors.h : B_WEBCAM_DECLARE_SENSOR + : $(sensorsSources) ; +USBWebcamHeaderGen CamInternalColorSpaceTransforms.h : B_WEBCAM_DECLARE_CSTRANSFORM : $(csTransformsSources) ; Addon usb_webcam.media_addon :