Makefile.in 2.63 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
##########################################################################
#                                                                        #
#                 ACG development toolkit                                #
#                                                                        #
#                  Copyright 2008 INRIA                                  #
#                                                                        #
#  More information on "http://acg.gforge.loria.fr/"                     #
#  License: CeCILL, see the LICENSE file or "http://www.cecill.info"     #
#  Authors: see the AUTHORS file                                         #
#                                                                        #
#                                                                        #
#                                                                        #
#                                                                        #
#  $Rev::                              $:  Revision of last commit       #
#  $Author::                           $:  Author of last commit         #
#  $Date::                             $:  Date of last commit           #
#                                                                        #
##########################################################################

20
PHONY: config byte opt clean superclean install tar
POGODALLA Sylvain's avatar
POGODALLA Sylvain committed
21

22
BINARIES=acgc acgc.opt acg acg.opt
POGODALLA Sylvain's avatar
POGODALLA Sylvain committed
23

24 25 26
RELEASE = $(shell date "+acg-%y-%m-%d")

AR_EXCLUDE = 
27

POGODALLA Sylvain's avatar
POGODALLA Sylvain committed
28

29 30 31
prefix = @prefix@
exec_prefix = @exec_prefix@

POGODALLA Sylvain's avatar
POGODALLA Sylvain committed
32 33 34
essai:
	echo $(DATE)

35
byte opt: 
36 37
	$(MAKE) -C src $@
	for file in $(BINARIES); do find . -name "$$file" -exec cp {} . \; ; done
POGODALLA Sylvain's avatar
POGODALLA Sylvain committed
38

39
all: byte opt
POGODALLA Sylvain's avatar
POGODALLA Sylvain committed
40

POGODALLA Sylvain's avatar
POGODALLA Sylvain committed
41
clean:
POGODALLA Sylvain's avatar
POGODALLA Sylvain committed
42 43 44
	if test "$@" = clean ; then $(MAKE) -C config $@ ; fi
	$(MAKE) -C src $@
	rm -rf *.log  *~ autom4te.cache
POGODALLA Sylvain's avatar
POGODALLA Sylvain committed
45
	find . -name "*~" -exec rm -f {} \;
46
	-for file in $(BINARIES); do rm $$file ; done
POGODALLA Sylvain's avatar
POGODALLA Sylvain committed
47

POGODALLA Sylvain's avatar
POGODALLA Sylvain committed
48 49 50
superclean: clean
	-find . -name "*.in" -print | sed -e 's/\(.*\)\.in/\1/' | xargs -n 1 rm

51 52 53 54 55
install:
	for file in $(BINARIES); do if test -x $$file ; then cp $$file @bindir@/. ; fi ; done

uninstall:
	for file in $(BINARIES); do if test -x @bindir@/$$file ; then rm @bindir@/$$file ; fi ; done
POGODALLA Sylvain's avatar
POGODALLA Sylvain committed
56 57 58 59 60 61 62 63 64


# Part for the auto configuration

config: configure

configure: config/configure.ac
	cd $(<D) && autoconf && mv configure .. & cd ..

65 66 67 68 69 70
tar: superclean
	if test -a ../$(RELEASE) ; then rm ../$(RELEASE) ; fi
	cd .. && ln -s trunk $(RELEASE) && cd trunk
	tar cvfz $(RELEASE).tar.gz -C .. -h $(RELEASE) --exclude="*\.svn*" --exclude "$(RELEASE)/data" --exclude "$(RELEASE)/src/data" --exclude "$(RELEASE)/src/*.old" --exclude "$(RELEASE)/*.tar*"
	if test -a ../$(RELEASE) ; then rm ../$(RELEASE) ; fi
	./configure