You've already forked gnatstudio
mirror of
https://github.com/AdaCore/gnatstudio.git
synced 2026-02-12 12:42:33 -08:00
Some sources are generated during the call to "make". Make this a separate target, so we can generate the sources without building them. This is needed for the gnatcoverage instrumentation phase, which requires complete sources. For #457
148 lines
4.9 KiB
Makefile
148 lines
4.9 KiB
Makefile
CP = cp -p
|
|
MV = mv
|
|
MKDIR = mkdir -p
|
|
RMDIR = rm -rf
|
|
STRIP = strip
|
|
AWK = @AWK@
|
|
PERL = perl
|
|
PYTHON = python
|
|
INSTALL = @INSTALL@
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
GNATCOLL_INSTALL = @GNATCOLL_INSTALL@
|
|
prefix = @prefix@
|
|
bindir = $(prefix)/bin
|
|
sharedir = $(prefix)/share
|
|
examplesdir = $(prefix)/share/examples/gnatstudio
|
|
|
|
BUILD?=Debug
|
|
|
|
SYS := $(shell gcc -dumpmachine)
|
|
|
|
all default:
|
|
$(MAKE) -C gnatstudio BUILD=$(BUILD) $@
|
|
$(MAKE) -C cli BUILD=$(BUILD) $@
|
|
$(MAKE) -C testsuite BUILD=$(BUILD) $@
|
|
|
|
generate:
|
|
$(MAKE) -C gnatstudio BUILD=$(BUILD) generate
|
|
|
|
codepeer:
|
|
$(MAKE) -C gnatstudio scil
|
|
codepeer -all -lib gps.library -quiet -baseline -level 1 \
|
|
-jobs 0 $(CODEPEER_FLAGS)
|
|
|
|
clean:
|
|
$(MAKE) -C gnatstudio $@
|
|
$(MAKE) -C cli $@
|
|
$(MAKE) -C testsuite $@
|
|
|
|
test-clean:
|
|
(cd scripts; ./testsuites clean)
|
|
|
|
install-common:
|
|
$(MKDIR) $(bindir)
|
|
$(MKDIR) $(sharedir)
|
|
$(MKDIR) $(examplesdir)
|
|
$(MKDIR) $(sharedir)/gnatstudio
|
|
$(MKDIR) $(sharedir)/gnatstudio/gnatdoc
|
|
$(RM) -rf $(sharedir)/gnatstudio/color_themes/
|
|
$(RM) -rf $(sharedir)/gnatstudio/library/
|
|
$(RM) -rf $(sharedir)/gnatstudio/plug-ins/
|
|
$(RM) -rf $(sharedir)/gnatstudio/support/core/
|
|
$(RM) -rf $(sharedir)/gnatstudio/support/ui/
|
|
${RM} ${sharedir}/gnatstudio/perspectives.xml
|
|
$(RMDIR) $(sharedir)/gnatstudio/templates
|
|
|
|
(cd share; tar cf - plug-ins/*) | (cd $(sharedir)/gnatstudio; tar xf -)
|
|
|
|
# Regenerate predefined_ada.xml before we install it
|
|
-${PYTHON} testsuite/internal/scripts/update_predefined_ada.py
|
|
|
|
(cd share; tar cf - library/*.py) | (cd $(sharedir)/gnatstudio; tar xf -)
|
|
(cd share; tar cf - support/) | (cd $(sharedir)/gnatstudio; tar xf -)
|
|
-${PYTHON} distrib/gnat_switches.py > $(sharedir)/gnatstudio/support/core/gnat_switches.py
|
|
$(RM) $(sharedir)/gnatstudio/plug-ins/emacs.xml
|
|
$(RM) $(sharedir)/gnatstudio/plug-ins/python_doc.py
|
|
$(RM) $(sharedir)/gnatstudio/plug-ins/python_doc.pyc
|
|
$(RM) $(sharedir)/gnatstudio/shell_commands.xml
|
|
(cd share; tar cf - icons/) | (cd $(sharedir)/gnatstudio; tar xf -)
|
|
$(RM) $(sharedir)/gnatstudio/icons/hicolor/scalable/*sketch
|
|
(cd share; tar cf - fonts/) | (cd $(sharedir)/gnatstudio; tar xf -)
|
|
(cd share; tar cf - color_themes/) | (cd $(sharedir)/gnatstudio; tar xf -)
|
|
(cd share; tar cf - templates/) | (cd $(sharedir)/gnatstudio; tar xf -)
|
|
(cd share; tar cf - key_themes/) | (cd $(sharedir)/gnatstudio; tar xf -)
|
|
(cd share; tar cf - *.*) | (cd $(sharedir)/gnatstudio; tar xf -)
|
|
(cd gnatdoc/resources; tar cf - * ) \
|
|
| (cd $(sharedir)/gnatstudio/gnatdoc; tar xf -)
|
|
$(MAKE) -C docs install
|
|
(cd examples; tar cf - --exclude .svn . ) | (cd $(examplesdir); tar xf -)
|
|
# Install the gnatcoll plugin(s)
|
|
ifneq ($(GNATCOLL_INSTALL),)
|
|
(cd $(GNATCOLL_INSTALL)/share/gnatstudio/plug-ins; tar cf - --exclude .svn gnatcoll/) \
|
|
| (cd $(sharedir)/gnatstudio/support/core/; tar xf -)
|
|
endif
|
|
|
|
install: install-common
|
|
ifeq ($(OS),Windows_NT)
|
|
$(INSTALL_PROGRAM) gnatstudio/obj/gnatstudio.exe $(bindir)
|
|
$(INSTALL_PROGRAM) cli/obj/gnatdoc3.exe $(bindir)
|
|
$(INSTALL_PROGRAM) cli/obj/gnatstudio_cli.exe $(bindir)
|
|
ifneq ($(GNATCOLL_INSTALL),)
|
|
ifneq ($(GNATCOLL_INSTALL)/bin, $(bindir))
|
|
$(INSTALL_PROGRAM) $(GNATCOLL_INSTALL)/bin/gnatinspect.exe $(bindir)
|
|
endif
|
|
endif
|
|
else
|
|
$(INSTALL_PROGRAM) gnatstudio/obj/gnatstudio $(bindir)
|
|
$(INSTALL_PROGRAM) cli/obj/gnatdoc3 $(bindir)
|
|
$(INSTALL_PROGRAM) cli/obj/gnatstudio_cli $(bindir)
|
|
ifneq ($(GNATCOLL_INSTALL),)
|
|
ifneq ($(GNATCOLL_INSTALL)/bin, $(bindir))
|
|
$(INSTALL_PROGRAM) $(GNATCOLL_INSTALL)/bin/gnatinspect $(bindir)
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
install-strip: install-common
|
|
ifeq ($(OS),Windows_NT)
|
|
$(INSTALL_PROGRAM) -s gnatstudio/obj/gnatstudio.exe $(bindir)
|
|
$(INSTALL_PROGRAM) -s cli/obj/gnatdoc3.exe $(bindir)
|
|
$(INSTALL_PROGRAM) -s cli/obj/gnatstudio_cli.exe $(bindir)
|
|
ifneq ($(GNATCOLL_INSTALL),)
|
|
ifneq ($(GNATCOLL_INSTALL)/bin, $(bindir))
|
|
$(INSTALL_PROGRAM) -s $(GNATCOLL_INSTALL)/bin/gnatinspect.exe $(bindir)
|
|
endif
|
|
endif
|
|
$(INSTALL_PROGRAM) distrib/gps_run.cmd $(bindir)
|
|
else
|
|
ifneq (, $(findstring darwin, $(SYS)))
|
|
$(INSTALL_PROGRAM) gnatstudio/obj/gnatstudio $(bindir)/gnatstudio_exe
|
|
$(INSTALL_PROGRAM) cli/obj/gnatdoc3 $(bindir)
|
|
$(INSTALL_PROGRAM) cli/obj/gnatstudio_cli $(bindir)
|
|
ifneq ($(GNATCOLL_INSTALL),)
|
|
ifneq ($(GNATCOLL_INSTALL)/bin, $(bindir))
|
|
$(INSTALL_PROGRAM) $(GNATCOLL_INSTALL)/bin/gnatinspect $(bindir)
|
|
endif
|
|
endif
|
|
$(INSTALL_PROGRAM) distrib/gps_wrapper $(bindir)/gnatstudio
|
|
else
|
|
$(INSTALL_PROGRAM) -s gnatstudio/obj/gnatstudio $(bindir)/gnatstudio_exe
|
|
$(INSTALL_PROGRAM) -s cli/obj/gnatdoc3 $(bindir)
|
|
$(INSTALL_PROGRAM) -s cli/obj/gnatstudio_cli $(bindir)
|
|
ifneq ($(GNATCOLL_INSTALL),)
|
|
ifneq ($(GNATCOLL_INSTALL)/bin, $(bindir))
|
|
$(INSTALL_PROGRAM) -s $(GNATCOLL_INSTALL)/bin/gnatinspect $(bindir)
|
|
endif
|
|
endif
|
|
$(INSTALL_PROGRAM) distrib/gps_wrapper $(bindir)/gnatstudio
|
|
endif
|
|
endif
|
|
|
|
test: force
|
|
@cd scripts; ./testsuites
|
|
|
|
.PHONY: install install-common install-strip test force
|
|
|
|
force:
|