2009-08-17 00:07:48 +02:00
|
|
|
ACLOCAL_AMFLAGS = -I m4 --install
|
2020-06-20 04:56:22 +02:00
|
|
|
SUBDIRS = gbc gbx . lib share man
|
2015-01-12 00:41:41 +01:00
|
|
|
EXTRA_DIST = TODO reconf tools spec README mime gb.*.h
|
2013-05-25 15:23:39 +02:00
|
|
|
BUILT_SOURCES = trunk_version.h
|
|
|
|
CLEANFILES = trunk_version.h
|
|
|
|
|
2013-05-25 15:30:06 +02:00
|
|
|
.PHONY: trunk_version.h
|
2013-05-25 15:23:39 +02:00
|
|
|
trunk_version.h:
|
|
|
|
@if test -d ../.svn ; then \
|
2017-01-25 23:30:19 +01:00
|
|
|
if test ../.svn/wc.db -nt trunk_version.h || test ../.svn/entries -nt trunk_version.h; then \
|
2013-05-25 15:23:39 +02:00
|
|
|
echo '#define TRUNK_VERSION "'`LC_ALL=C svn info 2>/dev/null | grep Revision | egrep -wo [0-9]+`'"' > trunk_version.h; \
|
|
|
|
fi \
|
2017-08-15 11:35:11 +02:00
|
|
|
elif test -d ../.git ; then \
|
|
|
|
GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`; \
|
2018-05-05 17:47:26 +02:00
|
|
|
if test \! -e ../.git/refs/heads/$$GIT_BRANCH -o ../.git/refs/heads/$$GIT_BRANCH -nt trunk_version.h; then \
|
2018-05-05 18:07:50 +02:00
|
|
|
if GIT_TAG=$$(git describe --exact-match $$GIT_BRANCH 2>/dev/null) ; then \
|
2018-05-05 17:55:28 +02:00
|
|
|
GIT_BRANCH="$$GIT_TAG"; \
|
|
|
|
fi; \
|
2017-08-15 11:35:11 +02:00
|
|
|
GIT_HASH=`git rev-parse --short HEAD`; \
|
|
|
|
echo '#define TRUNK_VERSION "'$$GIT_HASH' ('$$GIT_BRANCH')"' > trunk_version.h; \
|
|
|
|
echo '#define TRUNK_VERSION_GIT 1' >> trunk_version.h; \
|
|
|
|
fi; \
|
2013-05-25 15:23:39 +02:00
|
|
|
else \
|
|
|
|
touch trunk_version.h; \
|
|
|
|
fi
|
2007-12-30 17:41:49 +01:00
|
|
|
|
|
|
|
install-exec-local:
|
2010-09-24 14:48:08 +02:00
|
|
|
@rm -f $(srcdir)/../warnings.log
|
2011-03-21 13:46:52 +01:00
|
|
|
|
|
|
|
@if test "x$(ROOT)" != "x"; then \
|
|
|
|
echo "[Installing with ROOT=$(ROOT)]"; \
|
|
|
|
fi
|
|
|
|
@if test "x$(DESTDIR)" != "x"; then \
|
|
|
|
echo "[Installing with DESTDIR=$(DESTDIR)]"; \
|
|
|
|
ROOT=$DESTDIR; \
|
2007-12-30 17:41:49 +01:00
|
|
|
fi
|
2011-03-21 13:46:52 +01:00
|
|
|
|
2007-12-30 17:41:49 +01:00
|
|
|
@echo "Making runtime symbolic link"
|
|
|
|
@$(LN_S) -f gbx$(GAMBAS_VERSION) $(DESTDIR)$(bindir)/gbr$(GAMBAS_VERSION) || true
|
|
|
|
|
|
|
|
@if test x"$(XDG_UTILS)" != x; then \
|
|
|
|
echo "Registering Gambas executable mimetype"; \
|
|
|
|
$(INSTALL) -d $(DESTDIR)$(gbdatadir)/icons; \
|
2011-08-20 02:33:36 +02:00
|
|
|
cp -f $(srcdir)/mime/application-x-gambas3.png $(DESTDIR)$(gbdatadir)/icons; \
|
2015-09-25 20:35:44 +02:00
|
|
|
xdg-icon-resource install --context mimetypes --size 256 $(DESTDIR)$(gbdatadir)/icons/application-x-gambas3.png application-x-gambas3; \
|
2011-08-20 02:33:36 +02:00
|
|
|
xdg-mime install $(srcdir)/mime/application-x-gambas3.xml; \
|
2007-12-30 17:41:49 +01:00
|
|
|
fi
|
|
|
|
|
2015-01-12 00:41:41 +01:00
|
|
|
@echo "Creating the information files for gb component..."
|
|
|
|
@$(INSTALL) -d $(DESTDIR)$(gbdatadir)/info
|
|
|
|
@$(DESTDIR)$(bindir)/gbi$(GAMBAS_VERSION) -r $(DESTDIR)$(prefix) gb
|
|
|
|
@rm -f $(DESTDIR)$(gblibdir)/lib.gb.la
|
|
|
|
@rm -f $(DESTDIR)$(gblibdir)/lib.gb.so*
|
|
|
|
@$(INSTALL) lib/gb.component $(DESTDIR)$(gblibdir)
|
|
|
|
|
|
|
|
@echo "Installing the compiler tools..."
|
|
|
|
@(cd $(srcdir)/tools; d=`pwd`; \
|
|
|
|
for p in gb*; do \
|
|
|
|
echo "Compiling $$p..."; cd $$d/$$p; \
|
|
|
|
$(DESTDIR)$(bindir)/gbc$(GAMBAS_VERSION) -ag -r $(DESTDIR)$(prefix); \
|
|
|
|
if test $$? -eq 0; then \
|
|
|
|
$(DESTDIR)$(bindir)/gba$(GAMBAS_VERSION); \
|
|
|
|
rm -rf .gambas; \
|
|
|
|
echo "Installing $$p..."; \
|
|
|
|
$(INSTALL) $$p.gambas $(DESTDIR)$(bindir); \
|
2016-08-18 20:59:19 +02:00
|
|
|
$(LN_S) -f $$p.gambas $(DESTDIR)$(bindir)/$$p || true; \
|
2015-01-12 00:41:41 +01:00
|
|
|
else \
|
|
|
|
echo "|| Unable to compile $$p" >> ../../../warnings.log; \
|
|
|
|
fi \
|
|
|
|
done)
|
|
|
|
|
2007-12-30 17:41:49 +01:00
|
|
|
uninstall-local:
|
|
|
|
@rm -f $(DESTDIR)$(bindir)/gbr$(GAMBAS_VERSION)
|
|
|
|
@rm -rf $(DESTDIR)$(gblibdir)/info
|
2013-02-21 16:37:19 +01:00
|
|
|
@if test x"$(XDG_UTILS)" != x; then \
|
2013-02-21 16:53:06 +01:00
|
|
|
xdg-mime uninstall $(srcdir)/mime/application-x-gambas3.xml; \
|
|
|
|
xdg-icon-resource uninstall --context mimetypes --size 64 application-x-gambas3; \
|
2013-02-21 16:37:19 +01:00
|
|
|
fi
|
2015-01-12 00:41:41 +01:00
|
|
|
@(cd $(srcdir)/tools; for p in gb*; do rm -f $(DESTDIR)$(bindir)/$$p.gambas $(DESTDIR)$(bindir)/$$p; done)
|
|
|
|
@rm -f $(DESTDIR)$(gblibdir)gb.component
|
|
|
|
@rm -rf $(DESTDIR)$(gbdatadir)/info/gb.info
|
|
|
|
@rm -rf $(DESTDIR)$(gbdatadir)/info/gb.list
|
2013-02-21 16:37:19 +01:00
|
|
|
|
2013-05-25 15:23:39 +02:00
|
|
|
dist-hook:
|
|
|
|
@rm -f $(distdir)/trunk_version.h
|
2015-01-12 00:41:41 +01:00
|
|
|
@(cd $(distdir)/tools; \
|
|
|
|
rm -rf `find . -name ".gambas" -o -name ".action" -o -name ".lock" -o -name ".xvpics" -o -name "*~" -o -name "*.out" -o -name "*.pot" -o -name "*.gambas" -o -name "core*" -o -name ".kdbg*" -o -name ".svn"`;)
|
|
|
|
|
|
|
|
|