abandoning GNU make pattern rules in favor of generated makefile targets
This commit is contained in:
35
Makefile
35
Makefile
@@ -2,8 +2,6 @@
|
||||
# the Adobe Flex "Geting Started" tutorial at:
|
||||
# http://learn.adobe.com/wiki/display/Flex/Getting+Started
|
||||
|
||||
include rules.mk
|
||||
|
||||
# sets mxmlc and compc to their respective basenames
|
||||
# if not overridden in command line like so:
|
||||
# make MXMLC=/path/to/my/mxmlc
|
||||
@@ -11,20 +9,37 @@ MXMLC ?= mxmlc
|
||||
COMPC ?= compc
|
||||
|
||||
|
||||
# define all target swf paths (which don't yet exist if
|
||||
# they've never been built)
|
||||
SWFS = $(patsubst %.mxml,%.swf,$(wildcard [0-9]*-*/*.mxml))
|
||||
SWFS += $(patsubst %.mxml,%.swf,$(wildcard custom-*/*.mxml))
|
||||
# define all dependency mxml paths and their swf path targets
|
||||
# (which don't yet exist if they've never been built)
|
||||
MXML = $(wildcard [0-9]*-*/*.mxml) $(wildcard custom-*/*.mxml)
|
||||
SWFS = $(patsubst %.mxml,%.swf,$(MXML))
|
||||
|
||||
|
||||
# glob up all component files as well, since changes to them
|
||||
# should also prompt rebuild
|
||||
COMPONENTS = $(patsubst %.mxml,%.swf,$(wildcard [0-9]*-*/*.as))
|
||||
COMPONENTS += $(patsubst %.mxml,%.swf,$(wildcard custom-*/*.as))
|
||||
COMPONENTS = $(wildcard [0-9]*-*/*.as) $(wildcard custom-*/*.as)
|
||||
export COMPONENTS
|
||||
|
||||
|
||||
# build all expected swf and swc files
|
||||
all: $(SWFS) $(COMPONENTS)
|
||||
include rules.mk
|
||||
|
||||
|
||||
all: $(SWFS)
|
||||
|
||||
|
||||
include targets.mk
|
||||
|
||||
|
||||
components:
|
||||
@echo $(COMPONENTS)
|
||||
|
||||
|
||||
mxml:
|
||||
@echo $(MXML)
|
||||
|
||||
|
||||
swfs:
|
||||
@echo $(SWFS)
|
||||
|
||||
|
||||
# remove all swf files in the tree
|
||||
|
Reference in New Issue
Block a user