--- qsampler/trunk/Makefile.in 2008/02/04 23:24:19 1667 +++ qsampler/trunk/Makefile.in 2010/03/29 17:00:30 2074 @@ -1,9 +1,14 @@ prefix = @ac_prefix@ qmake = @ac_qmake@ +lupdate = @ac_lupdate@ +lrelease = @ac_lrelease@ name = qsampler -headers = config.h \ +target = src/$(name) + +headers = \ + src/config.h \ src/qsamplerAbout.h \ src/qsamplerOptions.h \ src/qsamplerChannel.h \ @@ -17,13 +22,15 @@ src/qsamplerInstrumentForm.h \ src/qsamplerInstrumentListForm.h \ src/qsamplerDeviceForm.h \ + src/qsamplerDeviceStatusForm.h \ src/qsamplerChannelStrip.h \ src/qsamplerChannelForm.h \ src/qsamplerChannelFxForm.h \ src/qsamplerOptionsForm.h \ src/qsamplerMainForm.h -sources = src/main.cpp \ +sources = \ + src/qsampler.cpp \ src/qsamplerOptions.cpp \ src/qsamplerChannel.cpp \ src/qsamplerMessages.cpp \ @@ -36,6 +43,7 @@ src/qsamplerInstrumentForm.cpp \ src/qsamplerInstrumentListForm.cpp \ src/qsamplerDeviceForm.cpp \ + src/qsamplerDeviceStatusForm.cpp \ src/qsamplerChannelStrip.cpp \ src/qsamplerChannelForm.cpp \ src/qsamplerChannelFxForm.cpp \ @@ -52,32 +60,47 @@ src/qsamplerOptionsForm.ui \ src/qsamplerMainForm.ui -all: $(name) +resources = \ + src/qsampler.qrc + +translations_sources = \ + src/translations/qsampler_cs.ts \ + src/translations/qsampler_ru.ts + +translations_targets = \ + src/translations/qsampler_cs.qm \ + src/translations/qsampler_ru.qm + +all: $(target) $(translations_targets) + + +$(target): $(name).mak $(resources) ${forms} $(sources) $(headers) + @make -f $(name).mak $(name).mak: $(name).pro @$(qmake) -o $(name).mak $(name).pro -$(name): $(name).mak $(sources) $(headers) $(forms) - @make -f $(name).mak +%.ts: $(name).pro $(resources) ${forms} $(sources) $(headers) + @$(lupdate) -verbose $(name).pro -# NOTE: DO NOT DELETE $(DESTDIR) in install and uninstall rules !!! -# It is mandatory for Debian packaging. +%.qm: %.ts + @$(lrelease) -verbose $< -qm $@ -install: $(name) icons/$(name).png - @install -d -v -m 0755 $(DESTDIR)$(prefix)/bin - @install -d -v -m 0755 $(DESTDIR)$(prefix)/share/pixmaps - @install -d -v -m 0755 $(DESTDIR)$(prefix)/share/applications - @install -v -m 0755 $(name) $(DESTDIR)$(prefix)/bin/$(name) - @install -v -m 0644 icons/$(name).png $(DESTDIR)$(prefix)/share/pixmaps/$(name).png - @install -v -m 0644 $(name).desktop $(DESTDIR)$(prefix)/share/applications/$(name).desktop + +install: $(target) $(translations_targets) + @make -f $(name).mak install + @install -d -v -m 0755 $(DESTDIR)$(prefix)/share/locale + @install -v -m 0644 $(translations_targets) $(DESTDIR)$(prefix)/share/locale uninstall: $(DESTDIR)$(prefix)/bin/$(name) - @rm -vf $(DESTDIR)$(prefix)/bin/$(name) - @rm -vf $(DESTDIR)$(prefix)/share/pixmaps/$(name).png - @rm -vf $(DESTDIR)$(prefix)/share/applications/$(name).desktop + @make -f $(name).mak uninstall + @rm -vf $(DESTDIR)$(prefix)/share/locale/$(translations_targets) + @for x in $(translations_targets); do \ + rm -vf $(DESTDIR)$(prefix)/share/locale/`basename $$x`; done + clean: $(name).mak @make -f $(name).mak clean - @rm -f $(name) $(name).mak - @rm -rf *.cache *.log *.status + @rm -f $(target) $(target).mak $(name).mak + @rm -rf *.cache *.log *.status $(translations_targets)