]> git.draconx.ca Git - gob-dx.git/blobdiff - Makefile.am
Update NEWS to describe new features.
[gob-dx.git] / Makefile.am
index 4a796946a3904d944fcf1415756a8f06360ef46d..8ed1bdb97dad1f529d036b653c25ac2c123fba69 100644 (file)
@@ -1,7 +1,138 @@
-SUBDIRS = @SUBDIRS@
-DIST_SUBDIRS = src doc examples
+# Copyright © 2019-2020 Nick Bowler
+#
+# Based on original work Copyright © 1999-2013 Jiri (George) Lebl.
+#
+# License GPLv2+: GNU General Public License version 2 or any later version.
+# This is free software: you are free to change and redistribute it.
+# There is NO WARRANTY, to the extent permitted by law.
 
-EXTRA_DIST = gob.spec.in
+ACLOCAL_AMFLAGS = -I m4 -I common/m4
 
-dist-hook: gob.spec
-       cp gob.spec $(distdir)
+AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src \
+              -I$(builddir) -I$(srcdir) -DPKGDATADIR=\"$(pkgdatadir)\"
+AM_CFLAGS = $(LIBGLIB_CFLAGS)
+AM_YFLAGS = -d -t
+
+bin_PROGRAMS = gob2
+
+EXTRA_DIST = COPYING.GPL3 COPYING.generated-code \
+             examples/GNOME_Foo_SomeInterface.idl examples/README \
+             examples/foo-some-interface.gob examples/gtk-button-count.gob \
+             examples/my-glade-main.c examples/my-glade.glade \
+             examples/my-glade.gob gob2.spec src/generate_treefuncs.pl \
+             src/treefuncs.def src/treefuncs.stamp t/str.gob t/test.gob
+
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES = src/treefuncs.c src/treefuncs.h src/treefuncs.stamp
+
+EXTRA_PROGRAMS = parser-rdeps
+parser_rdeps_SOURCES = src/main.c src/lexer.l
+$(parser_rdeps_OBJECTS): src/parse.h
+
+noinst_HEADERS = src/main.h src/treefuncs.h src/out.h src/util.h src/checks.h
+
+gob2_SOURCES = src/main.c src/main.h src/treefuncs.c src/out.c src/util.c \
+               src/checks.c src/parse.y src/lexer.l
+gob2_LDADD = $(LIBGLIB_LIBS) @LEXLIB@
+$(gob2_OBJECTS): src/treefuncs.h
+
+man_MANS = doc/gob2.1
+EXTRA_DIST += doc/makehtml.pl
+
+PERL_ERROR = @:; { \
+         printf '%s: ERROR: perl was not available at configure time.\n' "$@"; \
+         printf '%s: If perl is installed but was not detected by configure,\n' "$@"; \
+         printf '%s: consider setting PERL and re-running configure.\n' "$@"; \
+       } 1>&2; false
+
+src/treefuncs.stamp: src/generate_treefuncs.pl src/treefuncs.def
+if !HAVE_PERL
+       $(PERL_ERROR)
+endif
+       $(AM_V_at) $(MKDIR_P) $(@D)
+       $(AM_V_GEN) (cd $(@D) && \
+         $(PERL) $(abs_srcdir)/src/generate_treefuncs.pl \
+                 $(abs_srcdir)/src/treefuncs.def; )
+       $(AM_V_at) touch $@
+
+.stamp.c:
+       @test -f $@ || { rm -f $<; $(MAKE) $(AM_MAKEFLAGS) $<; }
+.stamp.h:
+       @test -f $@ || { rm -f $<; $(MAKE) $(AM_MAKEFLAGS) $<; }
+
+html-local: doc/gob2.html
+doc/gob2.html: doc/gob2.1
+if !HAVE_PERL
+       $(PERL_ERROR)
+endif
+       $(AM_V_GEN) $(PERL) $(top_srcdir)/doc/makehtml.pl <doc/gob2.1 >$@.tmp
+       $(AM_V_at) mv -f $@.tmp $@
+CLEANFILES += doc/gob2.html
+
+install-html-local: install-gob2-html
+install-gob2-html: doc/gob2.html
+       $(MKDIR_P) "$(DESTDIR)$(docdir)"
+       $(INSTALL_DATA) doc/gob2.html "$(DESTDIR)$(docdir)/gob2.html"
+.PHONY: install-gob2-html
+
+uninstall-local: uninstall-gob2-html
+uninstall-gob2-html:
+       test ! -d "$(DESTDIR)$(docdir)" || \
+         cd "$(DESTDIR)$(docdir)" && rm -f gob2.html
+.PHONY: uninstall-gob2-html
+
+m4dir = $(datadir)/aclocal
+m4_DATA = gob2.m4
+
+gob2.m4: $(top_srcdir)/common/m4/gob2.m4
+       $(AM_V_GEN) $(SED) 's/DX_PROG_GOB2/GOB2_CHECK/g' \
+         $(top_srcdir)/common/m4/gob2.m4 >$@.tmp
+       $(AM_V_at) mv -f $@.tmp $@
+DISTCLEANFILES += gob2.m4
+EXTRA_DIST += common/m4/gob2.m4
+
+git_changelog_start = 2cd951c678998b2b0230c8eb25717ecf0f1dd2db
+dist-hook: generate-changelog
+generate-changelog:
+       -: "$${GIT_DIR=$(top_srcdir)/.git}"; \
+         test -d "$$GIT_DIR" || exit 0; { \
+           $(PERL) -x $(top_srcdir)/build-aux/gitlog-to-changelog -- \
+             $(git_changelog_start).. && \
+           echo && \
+           git show $(git_changelog_start):ChangeLog; \
+         } >$(distdir)/ChangeLog.gen && \
+         mv -f $(distdir)/ChangeLog.gen $(distdir)/ChangeLog
+       rm -f $(distdir)/ChangeLog.gen
+.PHONY: generate-changelog
+
+GENERIC_V   = $(GENERIC_V_@AM_V@)
+GENERIC_V_  = $(GENERIC_V_@AM_DEFAULT_V@)
+GENERIC_V_0 = @printf '%2.0s%$(DX_ALIGN_V)s %s\n'
+
+TEST_DISTRIBUTION = false
+TEST_DISTRIBUTION_OR_ERROR = if $(TEST_DISTRIBUTION); \
+  then echo 'Proceeding anyway...'; \
+  else echo 'Run $(MAKE) TEST_DISTRIBUTION=true to ignore this failure.'; \
+       false; \
+  fi
+
+distcheck-hook:
+       $(GENERIC_V) : 'CHECK   ' ChangeLog; \
+         $(AWK) '/^Stub/ { print FILENAME ":" NR ":", $$0; exit 1 }' \
+           $(distdir)/ChangeLog || { \
+             echo 'ERROR: *** Packaged ChangeLog was not properly generated from git log.'; \
+             echo '       *** The source version was used instead, but this appears to'; \
+             echo '       *** be the stub from a git checkout.  The "git" and "perl"'; \
+             echo '       *** programs are required for ChangeLog generation to work.'; \
+             $(TEST_DISTRIBUTION_OR_ERROR); } >&2
+       $(GENERIC_V) : 'CHECK   ' NEWS; \
+         $(AWK) -F: 'NR == 1 && $$1 != "$(PACKAGE_VERSION)" \
+           { print FILENAME ":" NR ":", $$0; exit 1}' \
+           $(distdir)/NEWS || { \
+             echo 'ERROR: *** First line of NEWS should match the package version'; \
+             echo '       *** $(PACKAGE_VERSION), but that does not appear to be the case.'; \
+             echo '       *** Remember to update NEWS before preparing a release.'; \
+             $(TEST_DISTRIBUTION_OR_ERROR); } >&2
+
+include $(top_srcdir)/common/snippet/autotest.mk