[blam] build: get distcheck to pass



commit d42bca857f7daadaa858fd08dd9100cd2edcd8d8
Author: Carlos Martín Nieto <cmn dwim me>
Date:   Sat Jun 15 12:45:04 2013 +0200

    build: get distcheck to pass
    
    Add the source dir prefix to the sources, make blam out of blam.in
    with autotools instead of sed and remove blam.exe{,.mdb} when
    uninstalling.

 Makefile.am     |    3 ---
 configure.ac    |    1 +
 src/Makefile.am |   12 +++++++++---
 3 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index a7d59f1..7de65e6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -34,9 +34,6 @@ bindir=$(prefix)/bin
 
 man_MANS = blam.1
 
-blam: blam.in config.log
-       sed -e "s|\ prefix\@|$(prefix)|" -e "s|\ MONO\@|$(MONO)|" < blam.in > blam
-
 configdir = $(prefix)/lib/blam
 config_DATA = blam.exe.config
 
diff --git a/configure.ac b/configure.ac
index 96c13dd..fcf90f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -99,6 +99,7 @@ AM_GLIB_GNU_GETTEXT
 
 AC_OUTPUT([
 Makefile
+blam
 icons/Makefile
 icons/16x16/Makefile
 icons/22x22/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index bdcf558..a60047d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,8 +2,9 @@ CSC = $(MCS)
 
 FLAGS = /debug -sdk:4.5
 
+GLADE_BUILD = $(srcdir)/blam.glade
 RESOURCES = \
-           -resource:blam.glade,blam.glade                                  \
+           -resource:$(GLADE_BUILD),blam.glade                                  \
            -resource:$(top_srcdir)/icons/blam-add-news.png,blam-add-news.png      \
            -resource:$(top_srcdir)/icons/blam-edit-news.png,blam-edit-news.png
 
@@ -57,8 +58,9 @@ endif
 
 
 blamlibdir = $(prefix)/lib/blam
-blam.exe: $(BLAM_CSFILES) $(GENERATED_CSFILES) blam.glade 
-       $(CSC) -unsafe $(FLAGS) -lib:$(top_srcdir)/lib $(RESOURCES) $(BLAM_LIBS) $(ASSEMBLIES) 
$(BLAM_CSFILES) $(GENERATED_CSFILES) -out:$@
+SOURCES_BUILD = $(addprefix $(srcdir)/, $(BLAM_CSFILES))
+blam.exe: $(SOURCES_BUILD) $(GENERATED_CSFILES) $(GLADE_BUILD)
+       $(CSC) -unsafe $(FLAGS) $(SOURCES_BUILD) $(GENERATED_CSFILES) $(RESOURCES) $(BLAM_LIBS) $(ASSEMBLIES) 
-out:$@
 
 all: blam.exe
 
@@ -67,6 +69,10 @@ install-data-local: blam.exe
        $(INSTALL_DATA) blam.exe $(DESTDIR)$(blamlibdir)/blam.exe
        $(INSTALL_DATA) blam.exe.mdb $(DESTDIR)$(blamlibdir)/blam.exe.mdb
 
+uninstall-local:
+       rm $(DESTDIR)$(blamlibdir)/blam.exe
+       rm $(DESTDIR)$(blamlibdir)/blam.exe.mdb
+
 EXTRA_DIST = \
             $(BLAM_CSFILES)   \
             ../gtk-gui/gui.stetic \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]