summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/Makefile.am46
-rw-r--r--src/ui/main.vala10
2 files changed, 7 insertions, 49 deletions
diff --git a/src/ui/Makefile.am b/src/ui/Makefile.am
index 7fd1984..685bebe 100644
--- a/src/ui/Makefile.am
+++ b/src/ui/Makefile.am
@@ -32,12 +32,11 @@ libexec_PROGRAMS += %reldir%/disfluid-gui
AM_VALAFLAGS += --pkg=gio-2.0
-%canon_reldir%_disfluid_gui_VALASOURCES = \
- %reldir%/main.vala \
- %reldir%/settings.vala
-
%canon_reldir%_disfluid_gui_SOURCES = \
- $(%canon_reldir%_disfluid_gui_VALASOURCES:.vala=.c)
+ %reldir%/main.vala \
+ %reldir%/settings.vala \
+ $(dist_vapi_DATA) \
+ config.vapi
%canon_reldir%_disfluid_gui_CFLAGS = \
$(AM_CFLAGS) \
@@ -52,39 +51,4 @@ AM_VALAFLAGS += --pkg=gio-2.0
$(GIO_LIBS) \
$(lib_LTLIBRARIES)
-EXTRA_DIST += \
- $(%canon_reldir%_disfluid_gui_VALASOURCES) \
- %reldir%/disfluid-gui-valasources.stamp
-
-$(srcdir)/%reldir%/disfluid-gui-valasources.stamp: $(%canon_reldir%_disfluid_gui_VALASOURCES) $(dist_vapi_DATA)
- $(AM_V_at)rm -f $@ && echo stamp > $@-t
- $(AM_V_VALAC)$(VALAC) $(AM_VALAFLAGS) $(VALAFLAGS) -C $^ -d $(srcdir)/%reldir%
- $(AM_V_at)for source in $^; do case $$source in *.vala) generated=$$(echo "$$source" | sed 's/\.vala$$/.c/'); (echo '#ifdef HAVE_CONFIG_H' ; echo '#include <config.h>'; echo '#endif' ; cat $$generated) > $$generated-t ; mv $$generated-t $$generated ;; esac done
- $(AM_V_at)mv -f $@-t $@
-
-## This rule is adapted from the Automake FAQ:
-$(%canon_reldir%_disfluid_gui_VALASOURCES:.vala=.c): %reldir%/disfluid-gui-valasources.stamp
-## Recover from the removal of $(srcdir)/$@
- @dry=; for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=*|--*);; \
- *n*) dry=:;; \
- esac; \
- done; \
- if test -f $(srcdir)/$@; then :; else \
- $$dry trap 'rm -rf $(srcdir)/%reldir%/disfluid-gui-valasources.lock $<' 1 2 13 15; \
- if $$dry mkdir $(srcdir)/%reldir%/disfluid-gui-valasources.lock 2>/dev/null; then \
-## This code is being executed by the first process.
- $$dry rm -f $<; \
- $(MAKE) $(AM_MAKEFLAGS) $<; \
- $$dry rmdir $(srcdir)/%reldir%/disfluid-gui-valasources.lock; \
- else \
-## This code is being executed by the follower processes.
-## Wait until the first process is done.
- while test -d $(srcdir)/%reldir%/disfluid-gui-valasources.lock && test -z "$$dry"; do \
- sleep 1; \
- done; \
-## Succeed if and only if the first process succeeded.
- $$dry test -f $<; exit $$?; \
- fi; \
- fi
+EXTRA_DIST +=
diff --git a/src/ui/main.vala b/src/ui/main.vala
index 82dc9d1..f0712e1 100644
--- a/src/ui/main.vala
+++ b/src/ui/main.vala
@@ -14,18 +14,12 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
-[CCode (cname="PACKAGE")]
-extern const string PACKAGE;
-
-[CCode (cname="LOCALEDIR")]
-extern const string LOCALEDIR;
-
namespace Disfluid {
class Main: GLib.Object {
public static int main (string[] args) {
GLib.Intl.setlocale (GLib.LocaleCategory.ALL, "");
- GLib.Intl.bindtextdomain (PACKAGE, LOCALEDIR);
- GLib.Intl.textdomain (PACKAGE);
+ GLib.Intl.bindtextdomain (Build.PACKAGE, Build.LOCALEDIR);
+ GLib.Intl.textdomain (Build.PACKAGE);
int return_code = 1;
Disfluid.Api.init ((api) => {
var settings = new Disfluid.Settings (api);