Additional Makefiles for distribution builds

Makefile-bin: only install target, for binary distribution
Makefile-distrib: two targets, binary-distrib (builds a binary distribution
based on the current configuration) and source-distrib (builds a source distribution)
master
Gwenaël Delaval 12 years ago
parent c39a0e058e
commit dcfcc0f59c

@ -0,0 +1,12 @@
include config
.PHONY: all install
all: install
install:
$(INSTALL) -d $(INSTALL_BINDIR)
$(INSTALL) bin/$(COMPILER).$(TARGET) $(INSTALL_BINDIR)/$(COMPILER)
$(INSTALL) bin/$(SIMULATOR).$(TARGET) $(INSTALL_BINDIR)/$(SIMULATOR)
(cd lib; $(MAKE) install)

@ -0,0 +1,56 @@
include config
version = $(shell date +"%d%m%y")
#version = 1.0
heptdir = heptagon-$(version)
binary-distrib:
# main directory
mkdir -p export/$(heptdir)
# binaries
mkdir -p export/$(heptdir)/bin
(cd compiler/; $(MAKE))
cp compiler/$(COMPILER).$(TARGET) export/$(heptdir)/bin/$(COMPILER)
cp compiler/$(SIMULATOR).$(TARGET) export/$(heptdir)/bin/$(SIMULATOR)
# libraries
(cd lib; $(MAKE))
cp -r lib export/$(heptdir)
# examples
cp -r examples export/$(heptdir)
# tests
mkdir -p export/$(heptdir)/test
cp -r test/bad test/good test/image_filters test/scripts test/CTestTestfile.cmake export/$(heptdir)/test
# manual
mkdir -p export/$(heptdir)/manual
cp manual/heptagon-manual.pdf export/$(heptdir)/manual
# Makefile, config, INSTALL
cp config export/$(heptdir)
cp Makefile-bin export/$(heptdir)/Makefile
cp manual/INSTALL export/$(heptdir)
cd export; tar czf $(heptdir).tar.gz $(heptdir)
source-distrib:
# main directory
mkdir -p export/$(heptdir)
# sources
cp -r compiler export/$(heptdir)
# libraries
cp -r lib export/$(heptdir)
# examples
cp -r examples export/$(heptdir)
# tests
mkdir -p export/$(heptdir)/test
cp -r test/bad test/good test/image_filters test/scripts test/CTestTestfile.cmake export/$(heptdir)/test
# manual
mkdir -p export/$(heptdir)/manual
cp manual/heptagon-manual.pdf export/$(heptdir)/manual
# Makefile, config.in, configure, INSTALL, COPYING
cp config.in export/$(heptdir)
cp configure export/$(heptdir)
cp Makefile export/$(heptdir)
cp COPYING export/$(heptdir)
cp manual/INSTALL export/$(heptdir)
cd export; tar czf $(heptdir).tar.gz --exclude _build $(heptdir)
Loading…
Cancel
Save