Modularize the Makefiles.

* It's a good practice to put the main target on top, since it's the
  first one that is called when calling just "make". That's why
  "resources", "binaries" and "gettext" were moved up in their
  Makefile's.
* Added a "clean" target for each subdirectories so that they are a bit
  more autonomous.
* Using "&&" instead of ";" when changing directory because if a
  directory name is changed, we get into an infinite loop.
This commit is contained in:
Romain Failliot
2015-01-24 12:09:47 -05:00
parent c6b29785f5
commit dc6cc1e5f9
4 changed files with 23 additions and 14 deletions

View File

@@ -3,10 +3,14 @@ MSGLANGS=$(notdir $(wildcard *.po))
MSGOBJS=$(addprefix locale/,$(MSGLANGS:.po=/LC_MESSAGES/pamac.mo))
gettext: $(MSGOBJS)
itstool -j ../data/polkit/org.manjaro.pamac.policy.in -o ../data/polkit/org.manjaro.pamac.policy $(MSGLANGS:.po=.mo)
clean:
rm -rf locale
rm -f *.mo
locale/%/LC_MESSAGES/pamac.mo: %.po
msgfmt -c -o $*.mo $*.po
mkdir -p $(dir $@)
cp $*.mo $(dir $@)pamac.mo
gettext: $(MSGOBJS)
itstool -j ../data/polkit/org.manjaro.pamac.policy.in -o ../data/polkit/org.manjaro.pamac.policy $(MSGLANGS:.po=.mo)