-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile.am
85 lines (78 loc) · 3.16 KB
/
Makefile.am
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
#
# Makefile gnucobol
# Process this file with automake to produce Makefile.in
#
# Copyright (C) 2003,2004,2005,2006,2007 Keisuke Nishida
# Copyright (C) 2008-2011 Roger While
#
# This file is part of GNU Cobol.
#
# The GNU Cobol compiler 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.
#
# GNU Cobol 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 GNU Cobol; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA
bin_SCRIPTS=cob-config
include_HEADERS = libcob.h
SUBDIRS = lib libcob cobc bin config copy po texi tests extras
ACLOCAL_AMFLAGS = -I m4
BUILT_SOURCES = defaults.h
DISTCLEANFILES = $(BUILT_SOURCES) cpucheck
EXTRA_DIST = cpucheck.c COPYING.DOC
dist-hook:
echo "#define COB_TAR_DATE \"`date -u +'%b %d %Y %T'` UTC\"" > $(distdir)/tarstamp.h
echo "#define COB_NUM_TAR_DATE `date -u +'%Y%m%d'`" >> $(distdir)/tarstamp.h
echo "#define COB_NUM_TAR_TIME `date -u +'%H%M%S'`" >> $(distdir)/tarstamp.h
find $(distdir) -type d -print | xargs chmod 777
chmod 644 $(distdir)/cpucheck.c
chmod 644 $(distdir)/bin/cob-config.in
chmod 644 $(distdir)/ABOUT-NLS
chmod 644 $(distdir)/AUTHORS
chmod 644 $(distdir)/COPYING
chmod 644 $(distdir)/COPYING.DOC
chmod 644 $(distdir)/COPYING.LIB
chmod 644 $(distdir)/INSTALL
chmod 644 $(distdir)/NEWS
chmod 644 $(distdir)/README
chmod 644 $(distdir)/THANKS
chmod 644 $(distdir)/TODO
chmod 755 $(distdir)/ltmain.sh
chmod 755 $(distdir)/missing
chmod 755 $(distdir)/install-sh
chmod 755 $(distdir)/config.guess
chmod 755 $(distdir)/config.sub
chmod 755 $(distdir)/config.rpath
chmod 755 $(distdir)/depcomp
chmod 755 $(distdir)/mkinstalldirs
touch $(distdir)/tests/run
touch $(distdir)/tests/syntax
touch $(distdir)/tests/data-rep
defaults.h: Makefile.am $(top_builddir)/config.status
@echo "Creating defaults.h..."
@{ \
echo "/* Automatically generated by Makefile */"; \
echo "#define COB_CC \"$(COB_CC)\""; \
echo "#define COB_CFLAGS \"$(COB_CFLAGS)\""; \
echo "#define COB_LDFLAGS \"$(COB_LDFLAGS)\""; \
echo "#define COB_LIBS \"$(COB_LIBS)\""; \
echo "#define COB_CONFIG_DIR \"$(COB_CONFIG_DIR)\""; \
echo "#define COB_COPY_DIR \"$(COB_COPY_DIR)\""; \
echo "#define COB_LIBRARY_PATH \"$(COB_LIBRARY_PATH)\""; \
echo "#define COB_MODULE_EXT \"$(COB_MODULE_EXT)\""; \
echo "#define COB_BLD_CC \"$(CC)\""; \
echo "#define COB_BLD_CPPFLAGS \"$(CPPFLAGS)\""; \
echo "#define COB_BLD_CFLAGS \"$(CFLAGS)\""; \
echo "#define COB_BLD_LD \"$(LD)\""; \
echo "#define COB_BLD_LDFLAGS \"$(LDFLAGS)\""; \
echo "#define COB_BLD_BUILD \"$(build)\""; \
echo "#define LOCALEDIR \"$(datadir)/locale\""; \
} > defaults.h