summaryrefslogtreecommitdiffstats
path: root/src/Makefile.am
blob: d3911b17c09dedb4d7af381ec6bdf61e973dc8ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# $Id$

# This file is part of syrep.
#
# syrep is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# syrep is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with syrep; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

AM_CPPFLAGS=-I../lib -D_GNU_SOURCE

bin_PROGRAMS = syrep

noinst_PROGRAMS = rm-rf-test copy-fd-test

syrep_SOURCES = cache.c cache.h \
				update.c update.h \
				util.c util.h \
				syrep.c syrep.h \
				md5.c md5.h \
				md5util.c md5util.h \
				context.c context.h \
				package.c package.h \
				dbutil.c dbutil.h \
				info.c info.h \
				history.c history.h \
				dump.c dump.h \
				list.c list.h \
				diff.c diff.h \
				merge.c merge.h \
				extract.c extract.h \
				makepatch.c makepatch.h \
				cleanup.c cleanup.h \
				cmdline.c cmdline.h \
				svn-revision.h \
				dbstruct.h \
				forget.c forget.h 
syrep_LDADD=@LIBOBJS@

rm_rf_test_SOURCES = util.c rm-rf-test.c util.h cmdline.c cmdline.h
copy_fd_test_SOURCES = util.c copy-fd-test.c util.h cmdline.c cmdline.h

EXTRA_DIST = syrep.ggo getopt.c getopt1.c mkdtemp.c
MAINTAINERCLEANFILES =
BUILT_SOURCES = 
CLEANFILES = 

if USE_GENGETOPT 
CLEANFILES += cmdline.c cmdline.h
BUILT_SOURCES += cmdline.c cmdline.h
endif

if USE_SUBVERSION
MAINTAINERCLEANFILES += svn-revision.h
BUILT_SOURCES += svn-revision.h 
endif

syrep.$(OBJEXT): svn-revision.h cmdline.h
update.$(OBJEXT): cmdline.h

if USE_GENGETOPT

cmdline.c cmdline.h: syrep.ggo Makefile
	gengetopt --unamed-opts --no-handle-help --no-handle-version < $<

endif

if USE_SUBVERSION

svn-revision.h: Makefile
	if test -d "$(top_srcdir)/.svn" ; then \
		if REV=`svn info "$(top_srcdir)" | grep ^Revision | cut -f2 -d" "` 2> /dev/null ; then \
			echo -e "#ifndef foosvnrevisionhfoo\n#define foosvnrevisionhfoo\n#define SVN_REVISION \"$$REV\"\n#endif" > $@ ; \
	    fi \
	fi

svnkeywords:
	rm -f svn-revision.h cmdline.[ch]
	svn propset svn:keywords Id *.c *.h Makefile.am

.PHONY: svnkeywords

endif