altosdroid: Cleanup Makefile.am
authorKeith Packard <keithp@keithp.com>
Sun, 12 Jul 2015 05:31:47 +0000 (22:31 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 12 Jul 2015 05:31:47 +0000 (22:31 -0700)
Avoid re-creating library symlinks.
Make builds depend on resource files too.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid/Makefile.am

index 52a2064..26e14ee 100644 (file)
@@ -20,6 +20,10 @@ ZIPALIGN_B=$(SDK)/build-tools/*/zipalign
 JAVA_SRC_DIR=src/org/altusmetrum/AltosDroid
 EXT_LIBDIR=libs
 DRAWABLE_DIR=res/drawable
+LAYOUT_DIR=res/layout
+MENU_DIR=res/menu
+VALUES_DIR=res/values
+XML_DIR=res/xml
 ALTOSLIB_SRCDIR=../altoslib
 ALTOSLIB_JAR=altoslib_$(ALTOSLIB_VERSION).jar
 
@@ -40,19 +44,25 @@ DRAWABLES=\
     $(DRAWABLE_DIR)/greenled.png \
     $(DRAWABLE_DIR)/grayled.png
 
-SRC=$(JAVA_SRC) $(DRAWABLES)
+LAYOUTS=$(LAYOUT_DIR)/*.xml
+MENUS=$(MENU_DIR)/*.xml
+VALUES=$(VALUES_DIR)/*.xml
+XMLS=$(XML_DIR)/*.xml
+
+RES=$(LAYOUTS) $(MENUS) $(VALUES) $(XMLS)
+
+SRC=$(JAVA_SRC) $(DRAWABLES) $(RES)
 
 all: $(all_target)
 
 .NOTPARALLEL:
 
-$(EXT_LIBDIR):
+$(ALTOSLIB): $(ALTOSLIB_SRCDIR)/$(ALTOSLIB_JAR)
        mkdir -p $(EXT_LIBDIR)
-
-$(ALTOSLIB): $(EXT_LIBDIR) $(ALTOSLIB_SRCDIR)/$(ALTOSLIB_JAR)
        cd $(EXT_LIBDIR) && ln -sf $(shell echo $(EXT_LIBDIR) | sed 's|[^/]\+|..|g')/$(ALTOSLIB_SRCDIR)/$(ALTOSLIB_JAR) .
 
-$(SUPPORT_V4): $(EXT_LIBDIR) $(SUPPORT_V4_SRCDIR)/$(SUPPORT_V4_JAR)
+$(SUPPORT_V4): $(SUPPORT_V4_SRCDIR)/$(SUPPORT_V4_JAR)
+       mkdir -p $(EXT_LIBDIR)
        cd $(EXT_LIBDIR) && ln -sf $(SUPPORT_V4_SRCDIR)/$(SUPPORT_V4_JAR) .
 
 $(GOOGLE_PLAY_SERVICES_LIB): $(GOOGLE_PLAY_SERVICES_LIB_SRCDIR)/$(GOOGLE_PLAY_SERVICES_LIB)