-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
193 lines (167 loc) · 7.72 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
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
###########################################################################
##
## File: ./Makefile.am
## Versions: $Id$
## Created: 2002/06/14
##
###########################################################################
##
## run automake to generate a Makefile.in
## Makefile.am \
## configure.ac > Makefile.in
## aclocal.m4 /
##
ACLOCAL_AMFLAGS= -I config
man_MANS = doc/module.1 doc/modulefile.4
SUBDIRS = . init modulefiles @EXTDIR@ doc po
DIST_SUBDIRS = . init modulefiles etc ext doc po
SOURCES_H = modules_def.h getopt.h config.h
EXTRA_DIST = config/config.rpath config/mkinstalldirs \
modules_def.h getopt.h uvec.h ovec.h testsuite INSTALL.RH7x \
init/bash.in init/sh.in init/zsh.in \
init/csh.in init/ksh.in init/perl.pm.in init/python.py.in \
init/ruby.rb.in init/cmake.in init/bash_completion.in \
modulefiles/lang/.mklang \
LICENSE.GPL ChangeLog ABOUT-NLS
bin_PROGRAMS = modulecmd
# bin_SCRIPTS = etc/mkroot etc/add.modules ext/add.ext
modulecmd_CFLAGS= \
-DSYSCONFDIR=\"$(sysconfdir)\" \
-DBASEPREFIX=\"$(BASEPREFIX)\" \
-DPREFIX=\"$(PREFIX)\" \
-DMODULEPATH=\"$(MODULEPATH)\" \
-DVERSIONPATH=\"$(VERSIONPATH)\" \
-DINITPATH=\"$(INITPATH)\" \
@TCLX_INCLUDE_SPEC@ @TCL_INCLUDE_SPEC@ @X_CFLAGS@
modulecmd_LDADD= @TCLX_LIB_SPEC@ @TCL_LIB_SPEC@ @X_LIBS@ @X_EXTRA_LIBS@ @LIBS@
modulecmd_SOURCES = \
ModuleCmd_Avail.c ModuleCmd_Clear.c ModuleCmd_Display.c \
ModuleCmd_Help.c ModuleCmd_Init.c ModuleCmd_List.c \
ModuleCmd_Load.c ModuleCmd_Purge.c ModuleCmd_Switch.c \
ModuleCmd_Update.c ModuleCmd_Use.c ModuleCmd_Whatis.c \
ModuleCmd_Refresh.c cmdAlias.c cmdConflict.c \
cmdIsLoaded.c cmdInfo.c cmdMisc.c cmdModule.c cmdPath.c \
cmdSetenv.c cmdUname.c cmdXResource.c cmdUlvl.c cmdLog.c \
cmdChdir.c cmdVersion.c cmdVerbose.c cmdWhatis.c init.c \
locate_module.c utility.c utilobj.c utilmem.c main.c error.c \
getopt.c version.c uvec.c ovec.c
localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
test: check-local
check-local: modulecmd
MODULEVERSION=@VERSION@; export MODULEVERSION; \
TESTSUITEDIR=$(srcdir)/testsuite; export TESTSUITEDIR; \
$(RUNTEST) --srcdir $$TESTSUITEDIR \
$(AM_RUNTESTFLAGS) $(RUNTESTFLAGS) --tool=modules
ctags: CTAGS
CTAGS: $(modulecmd_SOURCES)
ctags $(modulecmd_SOURCES) $(SOURCES_H)
cxref:
$(MAKE) clean
# may need to edit the cxref-cc script setting
# EGREP=/bin/egrep
$(MAKE) CC=cxref-cc CXREFCC=$(CC)
# cxref-cc $(modulecmd_SOURCES) $(SOURCES_H)
@echo "==============================="
@echo "You may need to run this twice!"
@echo "==============================="
SED=sed
CVS=cvs
GZIP=gzip
BZIP2=bzip2
patch: $(srcdir)/configure
@echo "Creating patch file -- do this after CVS tagging"
${CVS} rdiff -c \
-r `${SED} -n -e 's/^.*OLD TAG.*"\(.*\)".*$$/\1/p' ${srcdir}/version.c` \
-r `${SED} -n -e 's/^.*NEW TAG.*"\(.*\)".*$$/\1/p' ${srcdir}/version.c` \
modules | ${GZIP} -c \
> modules-`${SED} -n -e 's/^.*OLD TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`-`${SED} -n -e 's/^.*NEW TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`.diff.gz
${CVS} rdiff -c \
-r `${SED} -n -e 's/^.*OLD TAG.*"\(.*\)".*$$/\1/p' ${srcdir}/version.c` \
-r `${SED} -n -e 's/^.*NEW TAG.*"\(.*\)".*$$/\1/p' ${srcdir}/version.c` \
modules | ${BZIP2} -c \
> modules-`${SED} -n -e 's/^.*OLD TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`-`${SED} -n -e 's/^.*NEW TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`.diff.bz2
tag:
@echo "CVS tagging - TAG = "\
`${SED} -n -e 's/^.*NEW TAG.*"\(.*\)".*$$/\1/p' ${srcdir}/version.c`
${CVS} rtag -b -F \
`${SED} -n -e 's/^.*NEW TAG.*"\(.*\)".*$$/\1/p' ${srcdir}/version.c` \
modules
ChangeLog: CL
CL: rmChangeLog
@echo "Updating ChangeLog"
-@./gitlog2changelog.py
rmChangeLog:
-@rm -f ChangeLog
lsm:
# sends off the modules.lsm file to update the Linux Software Map
# this should be done by the maintainer (R.K.Owen) only!
mail -s add [email protected],[email protected] < modules.lsm
DISTNAME=$(distdir)
ftp-local: dist
# this should be done by the maintainer (R.K.Owen) only!
@echo "placing $(DISTNAME).tar.{gz|bz2}"
-@if [ -e $(DISTNAME).tar.gz ]; then \
cp $(DISTNAME).tar.gz /u/ftp/pub/rkowen/modules; \
else echo "Can't find $(DISTNAME).tar.gz"; fi
-@if [ -e $(DISTNAME).tar.bz2 ]; then \
cp $(DISTNAME).tar.bz2 /u/ftp/pub/rkowen/modules; \
else echo "Can't find $(DISTNAME).tar.bz2"; fi
-@XXX=modules-`${SED} -n -e 's/^.*OLD TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`-`${SED} -n -e 's/^.*NEW TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`.diff.gz ; \
echo "placing $$XXX"; \
if [ -e $$XXX ]; then \
cp $$XXX /u/ftp/pub/rkowen/modules; \
else echo "Can't find $$XXX"; fi
-@XXX=modules-`${SED} -n -e 's/^.*OLD TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`-`${SED} -n -e 's/^.*NEW TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`.diff.bz2 ; \
echo "placing $$XXX"; \
if [ -e $$XXX ]; then \
cp $$XXX /u/ftp/pub/rkowen/modules; \
else echo "Can't find $$XXX"; fi
-@echo "placing modules.lsm"
-@if [ -e modules.lsm ]; then \
cp modules.lsm /u/ftp/pub/rkowen/modules; \
else echo "Can't find modules.lsm"; fi
dist-hook: CL
-rm -rf `find $(distdir) -name CVS`
ftp: ftp-ibiblio ftp-sourceforge
ftp-ibiblio: dist
# do local files first ... mostly to verify their existence
# this should be done by the maintainer (R.K.Owen) only!
@echo "placing ftp.ibiblio.org files";
-@XXX=modules-`${SED} -n -e 's/^.*OLD TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`-`${SED} -n -e 's/^.*NEW TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`.diff."*" ; \
echo "placing modules.lsm $$XXX $(DISTNAME).tar.*"; \
./.ftp ftp.ibiblio.org /incoming/linux \
modules.lsm $$XXX $(DISTNAME).tar.*;
ftp-sourceforge: dist
@echo "placing modules.sourceforge.net files";
-@XXX=modules-`${SED} -n -e 's/^.*OLD TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`-`${SED} -n -e 's/^.*NEW TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`.diff."*" ; \
echo "placing modules.lsm $$XXX $(DISTNAME).tar."*""; \
scp modules.lsm $$XXX $(DISTNAME).tar.* [email protected]:ftp
./.ftp upload.sourceforge.net /incoming \
modules.lsm $$XXX $(DISTNAME).tar.*;
help:
@echo ""
@echo "make - compiles sources to executable"
@echo "make all - same as above"
@echo "make check - runs test suite - needs dejagnu runtest"
@echo "make install - copy program & man pages to destination"
@echo "make clean - cleans out most useless files"
@echo "make disthelp - extra help for developers"
@echo ""
disthelp:
@echo "make ctags - creates the vi ctags file"
@echo "make cxref - makes the xref HTML files - needs cxref"
@echo "make dist - creates a distribution tarballs"
@echo "make distclean - cleans & removes most made files"
@echo "make maintainer-clean - cleans even more"
@echo "================ requires git access ======================="
# @echo "make tag - does a git rtag"
@echo "make CL - remakes the ChangeLog from the git commits"
# @echo "make patch - creates a patch file after tagging"
@echo "================ maintainers only =========================="
@echo "make lsm - send off to the Linux Software Map"
@echo "make ftp-local - upload tarball (good test)"
@echo "make ftp-ibiblio - upload to ibiblio"
@echo "make ftp-sourceforge - upload to sourceforge"
@echo "make ftp - upload to both ibiblio & sourceforge"
@echo ""