Author: miguel
Date: 2008-01-02 22:25:55 -0500 (Wed, 02 Jan 2008)
New Revision: 92149

Added:
   trunk/mono-tools/gui-compare/Makefile.include
   trunk/mono-tools/gui-compare/config.make
   trunk/mono-tools/gui-compare/configure
   trunk/mono-tools/gui-compare/gui-compare.in
   trunk/mono-tools/gui-compare/gui-compare.make
   trunk/mono-tools/gui-compare/rules.make
Modified:
   trunk/mono-tools/gui-compare/Makefile
Log:
Makefiles until we switch this to Automake

Modified: trunk/mono-tools/gui-compare/Makefile
===================================================================
--- trunk/mono-tools/gui-compare/Makefile       2008-01-03 02:43:28 UTC (rev 
92148)
+++ trunk/mono-tools/gui-compare/Makefile       2008-01-03 03:25:55 UTC (rev 
92149)
@@ -1,26 +1,73 @@
-sources=driver.cs CompareWindow.cs CompareContext.cs Masterinfo.cs 
Comparison.cs Metadata.cs CecilMetadata.cs MasterMetadata.cs
-resources= \
-       -resource:cm/c.gif,c.gif        \
-       -resource:cm/d.gif,d.gif        \
-       -resource:cm/e.gif,e.gif        \
-       -resource:cm/en.gif,en.gif      \
-       -resource:cm/f.gif,f.gif        \
-       -resource:cm/i.gif,i.gif        \
-       -resource:cm/m.gif,m.gif        \
-       -resource:cm/n.gif,n.gif        \
-       -resource:cm/p.gif,p.gif        \
-       -resource:cm/r.gif,r.gif        \
-       -resource:cm/sc.gif,sc.gif      \
-       -resource:cm/se.gif,se.gif      \
-       -resource:cm/s.gif,s.gif        \
-       -resource:cm/sm.gif,sm.gif      \
-       -resource:cm/st.gif,st.gif      \
-       -resource:cm/sx.gif,sx.gif      \
-       -resource:cm/tb.gif,tb.gif      \
-       -resource:cm/tm.gif,tm.gif      \
-       -resource:cm/tp.gif,tp.gif      \
-       -resource:cm/w.gif,w.gif        \
-       -resource:cm/y.gif,y.gif
 
-guicompare.exe: $(sources)
-       gmcs -debug -pkg:gtk-sharp-2.0 -pkg:cecil -out:guicompare.exe 
$(sources) $(resources)
+EXTRA_DIST = gui-compare.make rules.make configure Makefile.include 
Mono.Cecil.dll
+
+all: all-recursive
+
+top_srcdir=.
+include $(top_srcdir)/config.make
+include $(top_srcdir)/rules.make
+
+#include $(top_srcdir)/custom-hooks.make
+
+#Warning: This is an automatically generated file, do not edit!
+ifeq ($(CONFIG),DEBUG)
+ SUBDIRS =  . 
+endif
+ifeq ($(CONFIG),RELEASE)
+ SUBDIRS =  . 
+endif
+
+# Include project specific makefile
+include gui-compare.make
+
+CONFIG_MAKE=$(top_srcdir)/config.make
+
+%-recursive: $(CONFIG_MAKE)
+       @set . $$MAKEFLAGS; final_exit=:; \
+       case $$2 in --unix) shift ;; esac; \
+       case $$2 in *=*) dk="exit 1" ;; *k*) dk=: ;; *) dk="exit 1" ;; esac; \
+       make pre-$*-hook prefix=$(prefix) ; \
+       for dir in $(SUBDIRS); do \
+               case $$dir in \
+               .) make $*-local || { final_exit="exit 1"; $$dk; };;\
+               *) (cd $$dir && make $*) || { final_exit="exit 1"; $$dk; };;\
+               esac \
+       done; \
+       make post-$*-hook prefix=$(prefix) ; \
+       $$final_exit
+
+$(CONFIG_MAKE):
+       echo "You must run configure first"
+       exit 1
+
+clean: clean-recursive
+install: install-recursive
+uninstall: uninstall-recursive
+
+dist: $(CONFIG_MAKE)
+       rm -rf $(PACKAGE)-$(VERSION)
+       mkdir $(PACKAGE)-$(VERSION)
+       make pre-dist-hook distdir=$$distdir
+       for dir in $(SUBDIRS); do \
+               pkgdir=`pwd`/$(PACKAGE)-$(VERSION); \
+               mkdir $$pkgdir/$$dir || true; \
+               case $$dir in \
+               .) make dist-local distdir=$$pkgdir || exit 1;; \
+               *) (cd $$dir; make dist-local distdir=$$pkgdir/$$dir) || exit 
1;; \
+               esac \
+       done
+       (make dist-local distdir=$(PACKAGE)-$(VERSION))
+       make
+       make post-dist-hook distsir=$$distdir
+       tar czvf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
+       rm -rf $(PACKAGE)-$(VERSION)
+       @echo "=========================================="
+       @echo "$(PACKAGE)-$(VERSION) has been packaged > 
$(PACKAGE)-$(VERSION).tar.gz"
+       @echo "=========================================="
+
+distcheck: dist
+       (mkdir test; cd test;  \
+       tar xzvf ../$(PACKAGE)-$(VERSION).tar.gz; cd $(PACKAGE)-$(VERSION); \
+       ./configure --prefix=$$(cd `pwd`/..; pwd); \
+       make && make install && make dist);
+       rm -rf test

Added: trunk/mono-tools/gui-compare/Makefile.include
===================================================================
--- trunk/mono-tools/gui-compare/Makefile.include       2008-01-03 02:43:28 UTC 
(rev 92148)
+++ trunk/mono-tools/gui-compare/Makefile.include       2008-01-03 03:25:55 UTC 
(rev 92149)
@@ -0,0 +1,33 @@
+build_sources = $(FILES) $(GENERATED_FILES)
+build_sources_embed = $(build_sources:%='$(srcdir)/%')
+
+comma__=,
+build_resx_list = $(foreach res, $(RESOURCES), $(if $(filter %.resx, 
$(firstword $(subst $(comma__), ,$(res)))),$(res),))
+build_others_list = $(foreach res, $(RESOURCES), $(if $(filter %.resx, 
$(firstword $(subst $(comma__), ,$(res)))), ,$(res)))
+build_xamlg_list = $(filter %.xaml.g.cs, $(FILES))
+
+build_resx_files = $(foreach res, $(build_resx_list), $(firstword $(subst 
$(comma__), ,$(res))))
+build_resx_resources = $(build_resx_files:.resx=.resources)
+build_resx_resources_hack = $(subst .resx,.resources, $(build_resx_list))
+build_resx_resources_embed = $(build_resx_resources_hack:%='-resource:%')
+
+build_others_files = $(foreach res, $(build_others_list), $(firstword $(subst 
$(comma__), ,$(res))))
+build_others_resources = $(build_others_files)
+build_others_resources_embed = $(build_others_list:%='-resource:$(srcdir)/%')
+
+build_resources = $(build_resx_resources) $(build_others_resources)
+build_resources_embed = $(build_resx_resources_embed) 
$(build_others_resources_embed)
+
+build_references_ref = $(foreach ref, $(REFERENCES), $(if $(filter -pkg:%, 
$(ref)), $(ref), $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref))))
+build_references_ref += $(foreach ref, $(DLL_REFERENCES), -r:$(ref))
+build_references_ref += $(foreach ref, $(PROJECT_REFERENCES), -r:$(ref))
+
+EXTRA_DIST += $(build_sources) $(build_resx_files) $(build_others_files) 
$(ASSEMBLY_WRAPPER_IN) $(EXTRAS) $(DATA_FILES)
+CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb $(BINARIES) $(build_resx_resources)
+DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/*
+
+pkglib_SCRIPTS = $(ASSEMBLY)
+bin_SCRIPTS = $(BINARIES)
+
+programfilesdir = @prefix@/lib/@PACKAGE@
+programfiles_DATA = $(PROGRAMFILES)

Added: trunk/mono-tools/gui-compare/config.make
===================================================================
--- trunk/mono-tools/gui-compare/config.make    2008-01-03 02:43:28 UTC (rev 
92148)
+++ trunk/mono-tools/gui-compare/config.make    2008-01-03 03:25:55 UTC (rev 
92149)
@@ -0,0 +1,6 @@
+prefix=/usr/local
+RUNTIME=mono
+ASSEMBLY_VERSION=0.1.0.0
+VERSION=0.1
+PACKAGE=gui_compare
+CONFIG=DEBUG

Added: trunk/mono-tools/gui-compare/configure
===================================================================
--- trunk/mono-tools/gui-compare/configure      2008-01-03 02:43:28 UTC (rev 
92148)
+++ trunk/mono-tools/gui-compare/configure      2008-01-03 03:25:55 UTC (rev 
92149)
@@ -0,0 +1,109 @@
+#!/bin/bash
+VERSION=0.1
+PACKAGE=gui_compare
+prefix=/usr/local
+config=DEBUG
+configurations=" RELEASE DEBUG"
+common_packages=" glib-sharp-2.0;2.10.2 gtk-sharp-2.0;2.10.2 
glade-sharp-2.0;2.10.2"
+
+
+usage ()
+{
+       echo "Usage : configure [--prefix=PREFIX] [--config=CONFIG]"
+       echo
+       echo "Configurations available :"
+       for c in $configurations; do
+               if [ "$c" = "$config" ]; then
+                       echo "        $c (Default)"
+               else
+                       echo "        $c"
+               fi
+       done
+}
+
+validate_config ()
+{
+       test -z "$1" && return 0
+       for c in $configurations; do
+               if [ "$c" = "$1" ]; then
+                       return 1
+               fi
+       done
+       return 0
+}
+
+check_package ()
+{
+       name=`echo $1 | cut -d\; -f1`
+       version=`echo $1 | cut -d\; -f2`
+
+       echo -n "Checking for package '$name'.." | tee -a config.log
+       pkg-config --atleast-version=$version $name
+       if [ $? -ne 0 ]; then
+               echo " ERROR: Package named '$name' >= $version not found." | 
tee -a config.log
+               echo "Try adjusting your PKG_CONFIG_PATH environment variable." 
| tee -a config.log
+               return 1
+       fi
+       echo " found." | tee -a config.log
+}
+
+check_required_packages ()
+{
+       echo "Looking for required packages" | tee config.log
+       var=required_packages_$config
+       for pkg in $common_packages ${!var}; do
+               check_package $pkg
+               retval=$?
+               [ $retval -ne 0 ] && return $retval
+       done
+       return 0
+}
+
+while test x$1 != x; do
+               case $1 in
+               --prefix=*)
+                               prefix=`echo $1 | sed 's/--prefix=//'`
+                               ;;
+               --prefix)
+                               shift
+                               prefix=$1
+                               ;;
+               --config=*)
+                               conf=`echo $1 | sed 's/--config=//'`
+                               validate_config "$conf"
+                               if [ $? -eq 1 ]; then
+                                       config=$conf
+                               else
+                                       echo "Invalid config name - $conf"
+                                       usage
+                                       exit 1
+                               fi
+                ;;
+               --help)
+                       usage
+                       exit
+                       ;;
+               *)
+                       echo Unknown argument $1 >&2
+                       usage
+                       exit 1
+                       ;;
+               esac
+               shift
+done
+
+check_required_packages
+[ $? -eq 1 ] && exit 1
+
+echo "prefix=$prefix" > config.make
+echo "RUNTIME=mono" >> config.make
+echo "ASSEMBLY_VERSION=$VERSION.0.0" >> config.make
+echo "VERSION=$VERSION" >> config.make
+echo "PACKAGE=$PACKAGE" >> config.make
+echo "CONFIG=$config" >> config.make
+
+echo
+echo "$PACKAGE has been configured with "
+echo "        prefix = $prefix"
+echo "        config = $config"
+echo


Property changes on: trunk/mono-tools/gui-compare/configure
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/mono-tools/gui-compare/gui-compare.in
===================================================================
--- trunk/mono-tools/gui-compare/gui-compare.in 2008-01-03 02:43:28 UTC (rev 
92148)
+++ trunk/mono-tools/gui-compare/gui-compare.in 2008-01-03 03:25:55 UTC (rev 
92149)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec mono "@prefix@/lib/@PACKAGE@/gui-compare.exe" "$@"

Added: trunk/mono-tools/gui-compare/gui-compare.make
===================================================================
--- trunk/mono-tools/gui-compare/gui-compare.make       2008-01-03 02:43:28 UTC 
(rev 92148)
+++ trunk/mono-tools/gui-compare/gui-compare.make       2008-01-03 03:25:55 UTC 
(rev 92149)
@@ -0,0 +1,161 @@
+
+
+# Warning: This is an automatically generated file, do not edit!
+
+srcdir=.
+top_srcdir=.
+
+include $(top_srcdir)/Makefile.include
+include $(top_srcdir)/config.make
+
+ifeq ($(CONFIG),DEBUG)
+ASSEMBLY_COMPILER_COMMAND = gmcs
+ASSEMBLY_COMPILER_FLAGS =  -noconfig -codepage:utf8 -warn:4 -optimize+ -debug 
-define:DEBUG
+ASSEMBLY = bin/Debug/gui-compare.exe
+ASSEMBLY_MDB = $(ASSEMBLY).mdb
+COMPILE_TARGET = exe
+PROJECT_REFERENCES = 
+BUILD_DIR = bin/Debug
+
+MONO_CECIL_DLL_SOURCE=Mono.Cecil.dll
+
+endif
+
+ifeq ($(CONFIG),RELEASE)
+ASSEMBLY_COMPILER_COMMAND = gmcs
+ASSEMBLY_COMPILER_FLAGS =  -noconfig -codepage:utf8 -warn:4 -optimize+
+ASSEMBLY = bin/Release/gui-compare.exe
+ASSEMBLY_MDB = 
+COMPILE_TARGET = exe
+PROJECT_REFERENCES = 
+BUILD_DIR = bin/Release
+
+MONO_CECIL_DLL_SOURCE=Mono.Cecil.dll
+
+endif
+
+
+PROGRAMFILES = \
+       $(MONO_CECIL_DLL)  
+
+BINARIES = \
+       $(GUI_COMPARE)  
+
+
+
+GUI_COMPARE = $(BUILD_DIR)/gui-compare
+MONO_CECIL_DLL = $(BUILD_DIR)/Mono.Cecil.dll
+
+
+FILES = \
+       gtk-gui/generated.cs \
+       MainWindow.cs \
+       gtk-gui/MainWindow.cs \
+       Main.cs \
+       AssemblyInfo.cs \
+       InfoManager.cs \
+       CompareContext.cs \
+       Comparison.cs \
+       Metadata.cs \
+       MasterMetadata.cs \
+       Masterinfo.cs \
+       CecilMetadata.cs \
+       ProviderSelector.cs \
+       gtk-gui/guicompare.ProviderSelector.cs \
+       AssemblyResolver.cs \
+       Config.cs 
+
+DATA_FILES = 
+
+RESOURCES = \
+       gtk-gui/gui.stetic \
+       cm/c.gif \
+       cm/d.gif \
+       cm/e.gif \
+       cm/en.gif \
+       cm/f.gif \
+       cm/i.gif \
+       cm/m.gif \
+       cm/n.gif \
+       cm/p.gif \
+       cm/r.gif \
+       cm/s.gif \
+       cm/sc.gif \
+       cm/se.gif \
+       cm/sm.gif \
+       cm/st.gif \
+       cm/sx.gif \
+       cm/tb.gif \
+       cm/tm.gif \
+       cm/tp.gif \
+       cm/w.gif \
+       cm/y.gif \
+       gtk-gui/objects.xml 
+
+EXTRAS = \
+       gui-compare.in 
+
+REFERENCES =  \
+       -pkg:gtk-sharp-2.0 \
+       -pkg:glib-sharp-2.0 \
+       -pkg:glade-sharp-2.0 \
+       System \
+       Mono.Posix \
+       System.Xml
+
+DLL_REFERENCES =  \
+       Mono.Cecil.dll
+
+CLEANFILES += $(PROGRAMFILES) $(BINARIES) 
+
+#Targets
+all-local: $(ASSEMBLY) $(PROGRAMFILES) $(BINARIES)  $(top_srcdir)/config.make
+
+$(GUI_COMPARE): gui-compare
+       mkdir -p $(BUILD_DIR)
+       cp '$<' '$@'
+       chmod u+x '$@'
+
+$(MONO_CECIL_DLL): $(MONO_CECIL_DLL_SOURCE)
+       mkdir -p $(BUILD_DIR)
+       cp '$<' '$@'
+
+
+
+gui-compare: gui-compare.in $(top_srcdir)/config.make
+       sed -e "s,@prefix@,$(prefix)," -e "s,@PACKAGE@,$(PACKAGE)," < 
gui-compare.in > gui-compare
+
+
+$(build_xamlg_list): %.xaml.g.cs: %.xaml
+       xamlg '$<'
+
+$(build_resx_resources) : %.resources: %.resx
+       resgen2 '$<' '$@'
+
+
+
+$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) 
$(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list)
+       make pre-all-local-hook prefix=$(prefix)
+       mkdir -p $(dir $(ASSEMBLY))
+       make $(CONFIG)_BeforeBuild
+       $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) 
-out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) 
$(build_resources_embed) $(build_references_ref)
+       make $(CONFIG)_AfterBuild
+       make post-all-local-hook prefix=$(prefix)
+
+
+install-local: $(ASSEMBLY) $(ASSEMBLY_MDB) $(GUI_COMPARE) $(MONO_CECIL_DLL)
+       make pre-install-local-hook prefix=$(prefix)
+       mkdir -p $(DESTDIR)$(prefix)/lib/$(PACKAGE)
+       cp $(ASSEMBLY) $(ASSEMBLY_MDB) $(DESTDIR)$(prefix)/lib/$(PACKAGE)
+       mkdir -p $(DESTDIR)$(prefix)/bin
+       test -z '$(GUI_COMPARE)' || cp $(GUI_COMPARE) $(DESTDIR)$(prefix)/bin
+       test -z '$(MONO_CECIL_DLL)' || cp $(MONO_CECIL_DLL) 
$(DESTDIR)$(prefix)/lib/$(PACKAGE)
+       make post-install-local-hook prefix=$(prefix)
+
+uninstall-local: $(ASSEMBLY) $(ASSEMBLY_MDB) $(GUI_COMPARE) $(MONO_CECIL_DLL)
+       make pre-uninstall-local-hook prefix=$(prefix)
+       rm -f $(DESTDIR)$(prefix)/lib/$(PACKAGE)/$(notdir $(ASSEMBLY))
+       test -z '$(ASSEMBLY_MDB)' || rm -f 
$(DESTDIR)$(prefix)/lib/$(PACKAGE)/$(notdir $(ASSEMBLY_MDB))
+       test -z '$(GUI_COMPARE)' || rm -f $(DESTDIR)$(prefix)/bin/$(notdir 
$(GUI_COMPARE))
+       test -z '$(MONO_CECIL_DLL)' || rm -f 
$(DESTDIR)$(prefix)/lib/$(PACKAGE)/$(notdir $(MONO_CECIL_DLL))
+       make post-uninstall-local-hook prefix=$(prefix)

Added: trunk/mono-tools/gui-compare/rules.make
===================================================================
--- trunk/mono-tools/gui-compare/rules.make     2008-01-03 02:43:28 UTC (rev 
92148)
+++ trunk/mono-tools/gui-compare/rules.make     2008-01-03 03:25:55 UTC (rev 
92149)
@@ -0,0 +1,40 @@
+clean-local:
+       make pre-clean-local-hook
+       make $(CONFIG)_BeforeClean
+       -rm -f $(CLEANFILES)
+       make $(CONFIG)_AfterClean
+       make post-clean-local-hook
+
+install-local:
+uninstall-local:
+
+dist-local:
+       make pre-dist-local-hook distdir=$$distdir
+       list='$(EXTRA_DIST)'; \
+       for f in Makefile $$list; do \
+               d=`dirname "$$f"`; \
+               test -d "$(distdir)/$$d" || \
+                       mkdir -p "$(distdir)/$$d"; \
+               cp -p "$$f" "$(distdir)/$$d" || exit 1; \
+       done
+       make post-dist-local-hook distdir=$$distdir
+
+dist-local-recursive:
+       for dir in $(SUBDIRS); do \
+               mkdir -p $(distdir)/$$dir || true; \
+               case $$dir in \
+               .) make dist-local distdir=$(distdir) || exit 1;; \
+               *) (cd $$dir; make dist-local distdir=$(distdir)/$$dir) || exit 
1; \
+               esac \
+       done
+
+#hooks: Available hooks - all, clean, install, uninstall and dist
+#      and their *-local variants
+pre-%-hook: ; @:
+post-%-hook: ; @:
+
+#targets for custom commands
+%_BeforeBuild: ; @:
+%_AfterBuild: ; @:
+%_BeforeClean: ; @:
+%_AfterClean: ; @:

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to