Fix subdir builds etc.
authorAuke Kok <auke-jan.h.kok@intel.com>
Fri, 8 Oct 2010 21:03:19 +0000 (14:03 -0700)
committerAuke Kok <auke-jan.h.kok@intel.com>
Fri, 8 Oct 2010 21:03:19 +0000 (14:03 -0700)
Makefile
po/Makefile

index 5aaf9dc..e4826f8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,7 @@ LDF_A := -Wl,--as-needed `pkg-config --libs libnotify gtk+-2.0`
 LDF_D := -Wl,--as-needed `pkg-config --libs glib-2.0 dbus-glib-1` `curl-config --libs` -Wl,"-z relro" -Wl,"-z now"
 
 all:   corewatcher corewatcher-applet corewatcher.8.gz
+       @(cd po/ && $(MAKE) $@)
 
 noui:  corewatcher corewatcher.8.gz
 
@@ -71,6 +72,7 @@ install-applet: corewatcher-applet
        install -m 0644 icon.png $(DESTDIR)/usr/share/corewatcher/icon.png
 
 install: install-system install-corewatcher install-applet
+       @(cd po/ && $(MAKE) $@)
 
 install-noui: install-system install-corewatcher
 
index 384ce9c..de9d80e 100644 (file)
@@ -11,10 +11,12 @@ SRC=$(wildcard *.po)
 OBJ= $(SRC:.po=.mo)
 INST= $(SRC:.po=.inst)
 
+all: translations
+
 translations: $(OBJ)
        
 %.mo: %.po
-       -@msgfmt -o $@  $<
+       msgfmt -o $@  $<
 
 clean:
        rm -f *.mo *~
@@ -24,8 +26,8 @@ clean:
 install: $(OBJ) $(INST)
 
 %.inst: %.mo
-       mkdir -p $(DESTDIR)$(LOCALESDIR)/$*/LC_MESSAGES/
-       -cp -f $< $(DESTDIR)$(LOCALESDIR)/$*/LC_MESSAGES/corewatcher.mo
+       -mkdir -p $(DESTDIR)$(LOCALESDIR)/$*/LC_MESSAGES/
+       cp -f $< $(DESTDIR)$(LOCALESDIR)/$*/LC_MESSAGES/corewatcher.mo
 
 uptrans: $(LG).po