Permalink
Browse files

fix paths, add docs

  • Loading branch information...
1 parent 21f87a9 commit 33464aa4a8162324161fec5855d1f20143dcf2b8 @shana committed Jan 31, 2013
Showing with 44 additions and 31 deletions.
  1. +1 −1 bindinate/Makefile.am
  2. +20 −16 bindinate/Makefile.am.template
  3. +23 −14 bindinate/bindinate.in
View
@@ -1,3 +1,3 @@
bin_SCRIPTS = bindinate
bindinatedir = $(libdir)/bindinator
-bindinate_DATA = gir2gapi.xslt preprocess.xslt configure.ac.template Makefile.am.template AssemblyInfo.cs.in autogen.sh metadata.template pc.template
+bindinate_DATA = gir2gapi.xslt preprocess.xslt configure.ac.template Makefile.am.template AssemblyInfo.cs.in autogen.sh metadata.template pc.template Makefile-docs.am.template
@@ -1,26 +1,30 @@
+SUBDIRS=doc
+
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(ASSEMBLY_PC).pc
-RAW_API=$(ASSEMBLY_NAME)-api.raw
-API=$(ASSEMBLY_NAME)-api.xml
-METADATA=$(ASSEMBLY_NAME).metadata
+RAW_API=sources/$(ASSEMBLY_NAME)-api.raw
+API=sources/$(ASSEMBLY_NAME)-api.xml
+METADATA=sources/$(ASSEMBLY_NAME).metadata
+DLL=out/$(ASSEMBLY_NAME).dll
+DLLMAP=out/$(ASSEMBLY_NAME).dll.config
sources =
-build_sources = AssemblyInfo.cs custom/*.cs $(sources)
+build_sources = sources/AssemblyInfo.cs $(sources)
-CLEANFILES = $(ASSEMBLY_NAME).dll generated-stamp generated/*.cs $(API)
+CLEANFILES = $(DLL) generated-stamp generated/*.cs $(API)
-DISTCLEANFILES= AssemblyInfo.cs $(ASSEMBLY_PC).pc $(ASSEMBLY_NAME).dll.config
+DISTCLEANFILES= sources/AssemblyInfo.cs $(ASSEMBLY_PC).pc $(DLLMAP)
-noinst_DATA = $(ASSEMBLY_NAME).dll
+noinst_DATA = $(DLL)
EXTRA_DIST = $(RAW_API) $(sources) $(METADATA) \
- AssemblyInfo.cs.in \
- $(ASSEMBLY_NAME).snk \
- $(ASSEMBLY_NAME).dll.config.in \
- $(ASSEMBLY_NAME).pc.in \
- $(ASSEMBLY_NAME)-sources.xml
+ sources/AssemblyInfo.cs.in \
+ sources/$(ASSEMBLY_NAME).dll.config.in \
+ sources/$(ASSEMBLY_NAME)-sources.xml \
+ sources/$(ASSEMBLY_NAME).snk \
+ $(ASSEMBLY_NAME).pc.in
all: generated-stamp $(ASSEMBLY)
@@ -34,13 +38,13 @@ generated-stamp: $(API)
--outdir=generated \
--assembly-name=$(ASSEMBLY_NAME) && touch generated-stamp
-$(ASSEMBLY_NAME).dll: $(build_sources) generated-stamp
+$(DLL): $(build_sources) generated-stamp
$(CSC) -nowarn:169 -unsafe -target:library $(GTK_SHARP_LIBS) \
- $(build_sources) #REFERENCES# generated/*.cs -out:$(ASSEMBLY_NAME).dll
+ $(build_sources) #REFERENCES# generated/*.cs -out:$(DLL)
install-data-local:
- echo "$(GACUTIL) /i $(ASSEMBLY_NAME).dll /f $(GACUTIL_FLAGS)"; \
- $(GACUTIL) /i $(ASSEMBLY_NAME).dll /f $(GACUTIL_FLAGS) || exit 1;
+ echo "$(GACUTIL) /i $(DLL) /f $(GACUTIL_FLAGS)"; \
+ $(GACUTIL) /i $(DLL) /f $(GACUTIL_FLAGS) || exit 1;
uninstall-local:
echo "$(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS)"; \
View
@@ -31,6 +31,15 @@ OUTDIR=$1/
if [ ! -d $OUTDIR ]; then
mkdir -p $OUTDIR
fi
+if [ ! -d $OUTDIR/sources ]; then
+ mkdir -p $OUTDIR/sources
+fi
+if [ ! -d $OUTDIR/out ]; then
+ mkdir -p $OUTDIR/out
+fi
+if [ ! -d $OUTDIR/doc ]; then
+ mkdir -p $OUTDIR/doc
+fi
PACKAGE=`@XSLTPROC@ --stringparam type package @prefix@/lib/bindinator/preprocess.xslt @GIRDIR@/$1.gir`
ORIGINAL=$PACKAGE
@@ -74,7 +83,7 @@ done
echo "LIB: $LIB"
echo "SOLIB: $SOLIB"
-cat >$OUTDIR/$DLLMAP <<EOF
+cat >$OUTDIR/out/$DLLMAP <<EOF
<configuration>
<dllmap dll="$PACKAGE" target="$SOLIB"/>
</configuration>
@@ -96,7 +105,7 @@ ASSEMBLY_NAME="$NAME-sharp"
ASSEMBLY_NAMESPACE="$NS"
ASSEMBLY_PC="$NAME-sharp-$VERSION"
ASSEMBLY_SHORTNAME="$NAME"
-ASSEMBLY_TITLE="$NS"
+ASSEMBLY_TITLE="$NS#"
ASSEMBLY_VERSION="$MODVERSION"
EOF
@@ -127,8 +136,9 @@ cat >>$OUTDIR/$CONFIGURE <<EOF
AC_CONFIG_FILES([
Makefile
- AssemblyInfo.cs
+ sources/AssemblyInfo.cs
$NAME-sharp-$VERSION.pc
+ doc/Makefile
])
AC_CONFIG_COMMANDS([default],[[ echo timestamp > stamp-h ]],[[]])
AC_OUTPUT
@@ -145,13 +155,13 @@ EOF
sed "s/#REFERENCES#/$REF/g" @prefix@/lib/bindinator/Makefile.am.template>$OUTDIR/Makefile.am
#cp @prefix@/lib/bindinator/Makefile.am.template $OUTDIR/Makefile.am
-cp @prefix@/lib/bindinator/AssemblyInfo.cs.in $OUTDIR/.
+cp @prefix@/lib/bindinator/AssemblyInfo.cs.in $OUTDIR/sources/.
cp @prefix@/lib/bindinator/autogen.sh $OUTDIR/.
chmod +x $OUTDIR/autogen.sh
mkdir -p $OUTDIR/m4
-if [ ! -e $OUTDIR/$NAME-sharp.metadata ]; then
- cp @prefix@/lib/bindinator/metadata.template $OUTDIR/$NAME-sharp.metadata
+if [ ! -e $OUTDIR/sources/$NAME-sharp.metadata ]; then
+ cp @prefix@/lib/bindinator/metadata.template $OUTDIR/sources/$NAME-sharp.metadata
fi
if [ ! -e "$OUTDIR/NEWS" ]; then touch $OUTDIR/NEWS; fi
@@ -160,20 +170,19 @@ if [ ! -e "$OUTDIR/AUTHORS" ]; then touch $OUTDIR/AUTHORS; fi
if [ ! -e "$OUTDIR/ChangeLog" ]; then touch $OUTDIR/ChangeLog; fi
if [ ! -e "$OUTDIR/COPYING" ]; then touch $OUTDIR/COPYING; fi
-if [ ! -e $OUTDIR/$NAME-sharp.snk ]; then
+if [ ! -e $OUTDIR/NAME-sharp.snk ]; then
sn -k $OUTDIR/$NAME-sharp.snk
fi
if [ ! -x $OUTDIR/$NAME-sharp-$VERSION.pc.in ]; then
cp @prefix@/lib/bindinator/pc.template $OUTDIR/$NAME-sharp-$VERSION.pc.in
fi
-#if test -e @GIRDIR@/$1.gir; then
-# echo "AAAAH"
-# @XSLTPROC@ @prefix@/lib/bindinator/gir2gapi.xslt -o "$1"/$1-api.raw @GIRDIR@/$1.gir
-#fi
+if [ ! -x $OUTDIR/doc/Makefile.am ]; then
+ cp @prefix@/lib/bindinator/Makefile-docs.am.template $OUTDIR/doc/Makefile.am
+fi
-if [ ! -e $OUTDIR/$NAME-sharp-api.raw ]; then
- echo "Processing @GIRDIR@/$1.gir and outputting $OUTDIR/$NAME-sharp-api.raw"
- @XSLTPROC@ -o $OUTDIR/$NAME-sharp-api.raw @prefix@/lib/bindinator/gir2gapi.xslt @GIRDIR@/$1.gir
+if [ ! -e $OUTDIR/sources/$NAME-sharp-api.raw ]; then
+ echo "Processing @GIRDIR@/$1.gir and outputting $OUTDIR/sources/$NAME-sharp-api.raw"
+ @XSLTPROC@ -o $OUTDIR/sources/$NAME-sharp-api.raw @prefix@/lib/bindinator/gir2gapi.xslt @GIRDIR@/$1.gir
fi

0 comments on commit 33464aa

Please sign in to comment.