Fix build when PROGRAM_DIRS is empty.
Fix build when PROGRAM_DIRS is empty.

SUBDIRS just takes PROGRAM_DIRS value.  If PROGRAM_DIRS gets set
to the empty string (as can happen when building only OSMesa), a
'for' loop will lack anything to iterate over, causing a parse
error.

This fixes the issue by making sure SUBDIRS is the null string
when PROGRAM_DIRS is, and wrapping the for loops in if's, causing
them only to execute if there are directories to iterate over.

bkaradzic/glsl-optimizer,djreep81/glsl-optimizer,benaadams/glsl-optimizer,jbarczak/glsl-optimizer,dellis1972/glsl-optimizer,dellis1972/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,metora/MesaGLSLCompiler,zz85/glsl-optimizer,mapbox/glsl-optimizer,djreep81/glsl-optimizer,mapbox/glsl-optimizer,mapbox/glsl-optimizer,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,metora/MesaGLSLCompiler,KTXSoftware/glsl2agal,dellis1972/glsl-optimizer,KTXSoftware/glsl2agal,KTXSoftware/glsl2agal,adobe/glsl2agal,KTXSoftware/glsl2agal,mcanthony/glsl-optimizer,zeux/glsl-optimizer,dellis1972/glsl-optimizer,benaadams/glsl-optimizer,mcanthony/glsl-optimizer,mapbox/glsl-optimizer,zz85/glsl-optimizer,KTXSoftware/glsl2agal,jbarczak/glsl-optimizer,zeux/glsl-optimizer,jbarczak/glsl-optimizer,adobe/glsl2agal,mcanthony/glsl-optimizer,tokyovigilante/glsl-optimizer,zz85/glsl-optimizer,mcanthony/glsl-optimizer,tokyovigilante/glsl-optimizer,mcanthony/glsl-optimizer,benaadams/glsl-optimizer,adobe/glsl2agal,wolf96/glsl-optimizer,wolf96/glsl-optimizer,adobe/glsl2agal,benaadams/glsl-optimizer,adobe/glsl2agal,metora/MesaGLSLCompiler,benaadams/glsl-optimizer,djreep81/glsl-optimizer,tokyovigilante/glsl-optimizer,mapbox/glsl-optimizer,djreep81/glsl-optimizer,wolf96/glsl-optimizer,jbarczak/glsl-optimizer,dellis1972/glsl-optimizer,zeux/glsl-optimizer,zeux/glsl-optimizer,zeux/glsl-optimizer,wolf96/glsl-optimizer,bkaradzic/glsl-optimizer,tokyovigilante/glsl-optimizer,jbarczak/glsl-optimizer,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,benaadams/glsl-optimizer,djreep81/glsl-optimizer,wolf96/glsl-optimizer,tokyovigilante/glsl-optimizer