xwords/xwords4/android/scripts/Variant.mk
Eric House 73c26d8643 replace Crosswords in variants' xml files. Required passing in app
name from build.xml and a new clean-target script that removes the
generated variant files.
2012-08-30 07:00:26 -07:00

29 lines
733 B
Makefile

# -*- mode: Makefile; -*-
$(DEST_PATH)/%.java : $(SRC_PATH)/%.java
@sed \
-e "s,\(package org.eehouse.android.\)xw4\(.*\);,\1$(VARIANT)\2;," \
-e "s,\(import org.eehouse.android.\)xw4\(.*\);,\1$(VARIANT)\2;," \
< $< > $@
$(DEST_PATH)/%.png : $(SRC_PATH)/%.png
@cp $< $@
$(DEST_PATH)/%.xml : $(SRC_PATH)/%.xml
@sed \
-e "s,\(^.*org.eehouse.android.\)xw4\(.*$$\),\1$(VARIANT)\2," \
-e "s,Crosswords,$(APPNAME),g" \
< $< > $@
$(DEST_PATH)/%.h : $(SRC_PATH)/%.h
@sed \
-e "s,\(^.*org/eehouse/android/\)xw4\(.*$$\),\1$(VARIANT)\2," \
< $< > $@
$(DEST_PATH)/%.c : $(SRC_PATH)/%.c
@sed \
-e "s,\(^.*Java_org_eehouse_android_\)xw4\(.*$$\),\1$(VARIANT)\2," \
< $< > $@
$(DEST_PATH)/% : $(SRC_PATH)/%
@cp $< $@