-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
146 lines (106 loc) · 3.56 KB
/
Makefile.in
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# -*-makefile-*- (gpm/main)
#
# Copyright 1994,1997 [email protected]
# Copyright 1997 [email protected]
# Copyright (C) 1998 Ian Zimmerman <[email protected]>
# Copyright (C) 2001-2012 Nico Schottelius
#
SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = .
include Makefile.include
# allow CFLAGS to be overriden from make command line
# ideally one would never have to write this rule again, but the GNU
# makefile standards are at cross-purposes: CFLAGS is reserved for
# user-overridable flags, but it's also all the implicit rule looks at.
# missing ?
SUBDIRS = src doc contrib
### simple, but effective rules
all: do-all
src/$(DEPFILE):
touch $@ # to prevent unecessary warnings
dep: src/$(DEPFILE)
$(MAKE) -C src dep
check: all
uninstall: do-uninstall
clean: do-clean
rm -f config.status.lineno
aclocal.m4: acinclude.m4
$(MKDIR) config
aclocal -I config
configure: configure.ac aclocal.m4 $(versionfiles)
libtoolize --force --copy `libtoolize -n --install >/dev/null 2>&1 && echo --install`
autoheader
autoconf
config.status: configure
if [ -f config.status ]; then $(SHELL) ./config.status --recheck; \
else $(SHELL) ./configure; fi
Makefile: config.status $(srcdir)/Makefile.in Makefile.include
./config.status
Makefile.include: config.status $(srcdir)/Makefile.include.in
./config.status
### INSTALL
install: check installdirs do-install
install-strip:
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) $(STRIP)' install
installdirs:
$(MKDIR) $(libdir) $(bindir) $(sbindir) $(includedir) $(sysconfdir); \
if test "x$(ELISP)" != "x" ; then \
$(MKDIR) $(lispdir) ; \
fi
### GENERIC
# do-all goes to all subdirectories and does all
do-%: dep
@target=`echo $@ | $(SED) -e 's/^do-//'`; \
for i in $(SUBDIRS) ; do \
if test -f ./$$i/Makefile ; then \
$(MAKE) -C ./$$i $${target} || exit 1 ;\
else \
true; \
fi; \
done
# Configure & unconfigure
# Maintainer portion, use at your own risk
barf:
@echo 'This command is intended for maintainers to use; it'
@echo 'deletes files that may need special tools to rebuild.'
@echo 'If you want to continue, please press return.'
@echo -n "Hit Ctrl+C to abort."
@read somevar
# who / what does need tags
TAGS: $(SRCS) $(HDRS) src/prog/gpm-root.y do-TAGS
cd $(srcdir) && $(ETAGS) -o TAGS $(SRCS) $(HDRS) src/prog/gpm-root.y
### RELEASE STUFF
TARS =../gpm-$(release).tar.gz
TARS +=../gpm-$(release).tar.bz2 ../gpm-$(release).tar.lzma
M_HOST=arcana.linux.it
M_DIR=gpm/
tars: $(TARS)
# configure headers, produce new configure script
distconf: Makefile.in Makefile.include.in configure acinclude.m4 $(versionfiles)
../gpm-$(release).tar: $(srcdir) distclean distconf
# no exclude possible of .git with pax it seems, so the following is not possible:
git archive --prefix "gpm-$(release)/" -o $@ HEAD
../gpm-$(release).tar.gz: ../gpm-$(release).tar
gzip -9 -c $< > $@
../gpm-$(release).tar.bz2: ../gpm-$(release).tar
bzip2 -9 -c $< > $@
../gpm-$(release).tar.lzma: ../gpm-$(release).tar
lzma -9 -c $< > $@
# 3. Put package together into .tar.gz and .tar.bz2
dist: disttest distclean distconf $(TARS)
scp $(TARS) $(M_HOST):$(M_DIR)
mv $(TARS) ~/niconetz/software/gpm/archives
### TEST: on nicos machine: not to be used anywhere else currently
# create / update configure, delete other parts from earlier build
disttest: distconf clean
./configure
make all
### CLEANUP
distclean: clean do-clean do-distclean
rm -f config.log config.status* config.cache Makefile Makefile.include
rm -rf autom4te.cache
rm -f src/$(DEPFILE)
allclean: do-allclean distclean
rm -f configure aclocal.m4