Makefile.am 1.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
include $(top_srcdir)/Makefile.common

EXTRA_DIST = ${filter-out $(srcdir)/ocarina-configuration.adb, $(ADA_SPECS) ${ADA_BODIES}}

STRIP = "@abs_top_srcdir@/support/strip_wrapper.sh"

install-exec-local:
	$(INSTALL) -d $(DESTDIR)$(bindir)
	$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) ocarina$(EXE_SUFFIX) \
	   $(DESTDIR)$(bindir)

uninstall-local:
	rm -f $(DESTDIR)$(bindir)/ocarina$(EXE_SUFFIX)

install-data-local: install-ada-libs
	$(INSTALL) -d $(DESTDIR)$(adadir)
	$(INSTALL) -d $(DESTDIR)$(alidir)
	for f in $(ADA_SPECS) $(ADA_BODIES); do \
	  $(INSTALL) -m 444 $$f $(DESTDIR)$(adadir); \
	done
21
	if [ "$(ls -A libs)" ]; then \
22 23
	for f in objects/*.ali; do \
	  $(INSTALL) -m 444 $$f $(DESTDIR)$(alidir); \
24 25
	done \
	fi
26
	$(INSTALL) -d $(DESTDIR)$(libdir)
27
	if [ "$(ls -A libs/lib*)" ]; then \
28 29
	for f in libs/lib*; do \
	  $(INSTALL) -m 444 $$f $(DESTDIR)$(libdir); \
30 31
	done \
	fi
32 33 34 35 36 37 38 39 40 41 42 43 44

# When packaging, we remove the "Working Copy from @SVN_REVISION@"
# from the SVN_Revision variable in ocarina-configuration.adb.in and
# we hard-code the latest SVN revision.

Sed_Pattern = 's/\(SVN_Revision *: *constant *String *:= *\)"Working *Copy *from.*";/\1"$(SVN_REVISION)";/'

dist-hook:
	@echo "Setting the SVN revision"
	cat $(distdir)/ocarina-configuration.adb.in | sed -e $(Sed_Pattern) \
	   > $(distdir)/ocarina-configuration.adb.in.new
	mv -f $(distdir)/ocarina-configuration.adb.in.new \
	   $(distdir)/ocarina-configuration.adb.in