/[pdpsoft]/trunk/nl.nikhef.pdp.lrmsutils/Makefile
ViewVC logotype

Annotation of /trunk/nl.nikhef.pdp.lrmsutils/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 78 - (hide annotations) (download)
Fri Feb 27 10:22:17 2009 UTC (13 years, 7 months ago) by templon
File size: 17965 byte(s)
changing repo structure

1 templon 78 #
2     # @(#)$Id: Makefile,v 1.1 2009/02/26 16:04:13 templon Exp $
3     #
4    
5     #######################################################
6     #
7     # General settings
8     #
9     #######################################################
10    
11     .PHONY: release minorversion majorversion tagversion
12     .PHONY: pack rpm pkg prep clean dist userdoc apidoc check
13     .PHONY: checkmndfiles checkcfgtags checkdprfiles
14     .PHONY: checksrctags header help tagstable markobsolete
15    
16     ####################################################################
17     # Linux specific settings
18     ####################################################################
19     #
20     #
21    
22     _rpmbuild := $(shell [ -x /usr/bin/rpmbuild ] && echo rpmbuild || echo rpm)
23     _builddir := $(shell rpm --eval %_builddir)
24     _specdir := $(shell rpm --eval %_specdir)
25     _sourcedir := $(shell rpm --eval %_sourcedir)
26     _srcrpmdir := $(shell rpm --eval %_srcrpmdir)
27     _rpmdir := $(shell rpm --eval %_rpmdir)
28    
29     CFG_MK = config-$(PACKAGE).mk
30     include $(CFG_MK)
31     _module = $(NAME)
32     _vpfx = $(NAME)_
33     _vtag = $(subst -,_,$(subst .,_,$(_vpfx)$(VERSION)$(BRANCH)))
34     _prodname = $(NAME)-$(VERSION)$(BRANCH)
35     _prodtar = $(_prodname).src.tgz
36    
37     # some SVN commands (ckeckout, update, commit) are by default quiet unless
38     # SVN_VERB is defined
39     _svn := svn --quiet
40     ifneq ($(SVN_VERB),)
41     _svn := svn
42     endif
43     # same for rpm
44     _rpm := $(_rpmbuild) --quiet
45     ifneq ($(RPM_VERB),)
46     _rpm := $(_rpmbuild)
47     endif
48    
49     _os := $(shell uname -s)
50     _date := $(shell date '+%d/%m/%y %H:%M')
51    
52     ###############################################################################
53     # Macros
54     ###############################################################################
55    
56     # _error, message
57     # _warn, message
58     # _fatal,err msg,exit code: print "err msg" and quit with "exit code" (the if
59     # clause is just used to group the commands)
60     _fatal = if true; then echo "[FATAL] $(1)">&2; exit $(2); fi
61     _error = echo "[ERROR] $(1)">&2
62     _warn = echo "[WARN] $(1)">&2
63    
64     ###############################################################################
65     # SVN
66     ###############################################################################
67     _SVN_BRNCH_SDIR := branches
68     _SVN_TAG_SDIR := tags
69     _SVN_TRNK_SDIR := trunk
70    
71     ###################################################################
72     # Create linux specific build directories
73     ###################################################################
74    
75     envdir:: $(_srcrpmdir) $(_rpmdir)
76     $(_srcrpmdir):
77     mkdir -p $(_srcrpmdir)
78     $(_rpmdir):
79     mkdir -p $(_rpmdir)
80    
81     ####################################################################
82     # Create new release/version/majorversion
83     ####################################################################
84     #
85     # These targets update the X.Y.Z components of the version in the
86     # config file and then commit the current version, tagging all
87     # files with the release number from the config file. Also
88     # wires the current date and time into the config file. Also
89     # adds an entry to the ChangeLog.
90    
91     # check that the requested operation is allowed:
92     # - refuse to run if SVN passwords/credentials caching is off
93     # - forbid committing in tags/ directory
94     _svn_cfg_file = $(HOME)/.subversion/config
95     _checkop:
96     @if [ ! -r $(_svn_cfg_file) ]; then\
97     $(call _fatal,$(_svn_cfg_file): svn config file not found/readable,1);\
98     fi
99     @if [ "`sed -nr '/^\s*store-passwords\s*=\s*no/ p' $(_svn_cfg_file)`" ]; then\
100     $(call _fatal, please set 'store-passwords = yes' in your svn config file $(_svn_cfg_file),1);\
101     fi
102     @if [ "`sed -nr '/^\s*store-auth-creds\s*=\s*no/ p' $(_svn_cfg_file)`" ]; then\
103     $(call _fatal, please set 'store-auth-creds = yes' in your svn config file $(_svn_cfg_file),1);\
104     fi
105     @if [ "`svn info | sed -nr '/\/$(_SVN_TAG_SDIR)\/*/ p'`" ]; then\
106     $(call _fatal,operation not allowed in "$(_SVN_TAG_SDIR)/",1);\
107     fi
108     @if [ "`svn info | sed -n '/\/$(_SVN_BRNCH_SDIR)\/*/ p'`" ]; then\
109     $(call _fatal,the build tools do not work in "$(_SVN_TAG_SDIR)/",1);\
110     fi
111    
112     release: _checkop config.tmp
113     @echo '[INFO] increasing release number x.x.<X> and timestamp..'
114     @perl <config.tmp >$(CFG_MK) -e 'while (<>) ' \
115     -e '{ s/^(VERSION=\d+\.\d+\.)(\d+)(.*)$$/$$1.($$2+1).$$3/e;' \
116     -e 's/^(RELEASE=)(\d+)(.*)$$/$$1."1".$$3/e; print; }'
117     @$(MAKE) tagversion
118    
119     minorversion: _checkop config.tmp
120     @echo '[INFO] increasing minorversion number x.<X>.x and timestamp..'
121     @perl <config.tmp >$(CFG_MK) -e 'while (<>) ' \
122     -e '{ s/^(VERSION=\d+\.)(\d+)(\..*)$$/$$1.($$2+1).".0"/e;' \
123     -e ' s/^(RELEASE=)(\d+)(.*)$$/$$1."1".$$3/e; print; }'
124     @$(MAKE) tagversion
125    
126     majorversion: _checkop config.tmp
127     @echo '[INFO] increasing majorversion number <X>.x.x and timestamp..'
128     @perl <config.tmp >$(CFG_MK) -e 'while (<>)' \
129     -e '{ s/^(VERSION=)(\d+)(\..*)$$/$$1.($$2+1).".0.0"/e;' \
130     -e ' s/^(RELEASE=)(\d+)(.*)$$/$$1."1".$$3/e; print; }'
131     @$(MAKE) tagversion
132    
133     config.tmp: $(CFG_MK)
134     @$(_svn) update .
135     @sed <$(CFG_MK) >config.tmp '/^DATE=/d'
136     @echo 'DATE=$(_date)' >>config.tmp
137     @cp $(CFG_MK) $(CFG_MK)~
138    
139     tagversion: _checkop
140     @echo "[INFO] svn committing new release: $(VERSION)"
141     @rm -f config.tmp
142     @perl -e '$$date=`date +%Y-%m-%d`;' \
143     -e 'chomp($$date);' \
144     -e '$$login=getlogin();' \
145     -e '$$logstr="<unknown>";' \
146     -e '$$logstr=(getpwnam($$login))[6] if defined $$login;' \
147     -e 'print $$date." $$logstr\n\n"; '\
148     -e 'print "\t* Release: $(NAME)-$(VERSION)\n";' >ChangeLog.tmp
149     @if [ "$(EDITOR)" -a -x "$(EDITOR)" ]; then \
150     perl -e 'print "\t- [your comment here]"' >>ChangeLog.tmp; \
151     $(EDITOR) ChangeLog.tmp; \
152     perl -e '$$/=undef; $$text=<>; $$text =~ s/\s*\n*$$//s;' \
153     -e 'print "$$text\n\n"' < ChangeLog.tmp > ChangeLog.tmp2; \
154     mv ChangeLog.tmp2 ChangeLog.tmp; \
155     else \
156     echo "[INFO] Enter ChangeLog comment (hit CTRL+D to stop):"; \
157     perl -e '$$text=""; while(<>) { $$text .= "\t$$_" };' \
158     -e '$$text =~ s/^\s*(.+?)\s*\n*$$/$$1/s;' \
159     -e 'chomp($$text); print "\t- $$text\n\n"' >>ChangeLog.tmp; \
160     fi
161     @if [ ! -r ChangeLog ] ; then touch ChangeLog ; $(_svn) add ChangeLog ; fi
162     @cp ChangeLog.tmp /tmp/ChangeLog.tmp.$$$
163     @cat ChangeLog >>ChangeLog.tmp
164     @mv ChangeLog.tmp ChangeLog
165     @$(_svn) commit -F /tmp/ChangeLog.tmp.$$$
166     @rm -f /tmp/ChangeLog.tmp.$$$
167     @$(MAKE) _tag_dir=$(_vtag) svntag
168     @$(MAKE) _tag_dir=latest _trg_tag=$(_vtag) svnextag
169     @$(MAKE) tagstable
170    
171     # auxiliary target to build an SVN tag. Input parameter is _tag_dir, which
172     # is the leaf subdirectory (intermediate subdirectories are built transparently);
173     # _co_root is the checkout root,
174     # _co_locl is the local path to the module in the checkout
175     # _co_subd is the sub-path to the module in the checkout
176     # that is:
177     # $pwd == $_co_root/$_co_locl == $_co_root/$_co_subd/$_module
178     #
179     _svn_root = $(shell svn info | sed -nr 's/^.+Root:\s+(\S+)$$/\1/ p')
180     _svn_url = $(shell svn info | sed -nr 's/^URL:\s+(\S+)$$/\1/ p')
181     _co_locl = $(shell echo $(_svn_url) | sed -nr 's%^\S+?/$(_SVN_TRNK_SDIR)/%% p')
182     _co_subd = $(shell echo $(_co_locl) | sed -nr 's%/$(_module)$$%% p')
183     # don't ask me why this doesn't work...
184     # _co_root = $(shell echo -n $(PWD) |\
185     # sed -r 's%^(.+?)/(\S*$(_SVN_TRNK_SDIR)/)?$(_co_locl)$$%\1%' | sed -r 's%/*$$%%')
186     _co_root = $(shell pwd | \
187     perl -e '$$a=<>; $$a=~s%^(\S+?)/([^/]*$(_SVN_TRNK_SDIR)/)?$(_co_locl)$$%$$1%; print $$a' |\
188     sed -r 's%/*$$%%')
189     ifneq ($(QTTR_CO_ROOT),)
190     _co_root = $(QTTR_CO_ROOT)
191     endif
192     svntag: _checkop
193     @if [ "$(DEBUG)" ]; then\
194     echo "[DEBUG] _svn_root=$(_svn_root)" >&2;\
195     echo "[DEBUG] _svn_url=$(_svn_url)" >&2;\
196     echo "[DEBUG] _co_locl=$(_co_locl)" >&2;\
197     echo "[DEBUG] _co_subd=$(_co_subd)" >&2;\
198     echo "[DEBUG] _co_root=$(_co_root)" >&2;\
199     fi
200     @[ "$(_tag_dir)" ] || $(call _fatal,no tag directory specified,1)
201     @[ "$(_co_root)" -a "$(_svn_root)" ]\
202     || $(call _fatal,checkout and/or SVN root not defined,2)
203     @echo "[INFO] svn tagging new release: $(_tag_dir)"
204     @src_path=$$PWD;\
205     dst_url=$(_svn_root)/$(_SVN_TAG_SDIR)/$(_co_subd)/$(_module);\
206     dst_path=$(_co_root)/$(_SVN_TAG_SDIR)/$(_co_subd)/$(_module);\
207     [ "$(DEBUG)" ] && echo "[DEBUG] dst_url=$$dst_url" >&2;\
208     [ "$(DEBUG)" ] && echo "[DEBUG] dst_path=$$dst_path" >&2;\
209     aux=$(_co_subd);\
210     [ "$(DEBUG)" ] && echo "[DEBUG] aux=$$aux" >&2;\
211     saux='';\
212     made_sdir=0;\
213     tag_mod_root='';\
214     while [ "$$aux" ]; do\
215     sdir=`echo -n $$aux | sed -nr 's%^([^/]+).*?$$%\1% p'`;\
216     [ $$made_sdir -eq 0 ] && tag_mod_root=$$sdir;\
217     [ "$(DEBUG)" ] && echo "[DEBUG] sdir=$$sdir" >&2;\
218     saux=$$saux/$$sdir;\
219     dst_surl=$(_svn_root)/$(_SVN_TAG_SDIR)/$$saux;\
220     [ "$(DEBUG)" ] && echo "[DEBUG] dst_surl=$$dst_surl" >&2;\
221     if (svn info $$dst_surl 2>&1 | egrep "\(Not a valid URL\)") >/dev/null; then\
222     $(_svn) mkdir $$dst_surl -m "Made directory $(_SVN_TAG_SDIR)$$saux" \
223     || $(call _fatal,$$dst_surl: cant make svn dir,3);\
224     fi;\
225     aux=`echo -n $$aux | sed -nr "s%^$$sdir/%% p"`;\
226     [ "$(DEBUG)" ] && echo "[DEBUG] aux=$$aux" >&2;\
227     made_sdir=1;\
228     done;\
229     if (svn info $$dst_url 2>&1 | egrep "\(Not a valid URL\)") >/dev/null; then\
230     [ "$(DEBUG)" ] && echo "[DEBUG] svn mkdir $$dst_url" >&2;\
231     $(_svn) mkdir $$dst_url -m "Made directory $(_SVN_TAG_SDIR)/$(_co_subd)/$(_module)"\
232     || $(call _fatal,$$dst_url: cant make svn dir,4);\
233     fi;\
234     [ "$(DEBUG)" ] && echo "[DEBUG] svn copy $$src_path $$dst_url/$(_tag_dir)" >&2;\
235     $(_svn) copy $$src_path $$dst_url/$(_tag_dir) -m "Added tag $(_module)/$(_tag_dir)" \
236     || $(call _fatal,$$src_path: cant svn copy to $$dst_url/$(_tag_dir),5);\
237     [ "$(DEBUG)" ] && echo "[DEBUG] svn co $$dst_url/$(_tag_dir) $$dst_path/$(_tag_dir)" >&2;\
238     $(_svn) checkout $$dst_url/$(_tag_dir) $$dst_path/$(_tag_dir) \
239     || $(call _fatal,$$dst_url/$(_tag_dir): cant svn check out,6)
240    
241    
242     svnextag: _checkop
243     @[ "$(_tag_dir)" ] || $(call _fatal,no tag directory specified,1)
244     @[ "$(_trg_tag)" ] || $(call _fatal,no target tag specified,2)
245     @echo "[INFO] svn tagging external reference: $(_tag_dir) -> $(_trg_tag)"
246     @[ "$(_co_root)" -a "$(_svn_root)" ]\
247     || $(call _fatal,checkout and/or SVN root not defined,3)
248     @src_sdir=$(_SVN_TAG_SDIR)/$(_co_subd)/$(_module)/$(_trg_tag);\
249     src_url=$(_svn_root)/$$src_sdir;\
250     src_path=$(_co_root)/$$src_sdir;\
251     dst_sdir=$(_SVN_TAG_SDIR)/$(_co_subd)/$(_module)/$(_tag_dir);\
252     dst_url=$(_svn_root)/$$dst_sdir;\
253     dst_path=$(_co_root)/$$dst_sdir;\
254     if (svn info $$dst_url 2>&1 | egrep "\(Not a valid URL\)") >/dev/null; then\
255     $(_svn) mkdir $$dst_url -m "Made directory $$dst_surl"\
256     || $(call _fatal,$$dst_surl: cant make svn dir,4);\
257     cd $(_co_root)/$(_SVN_TAG_SDIR);\
258     $(_svn) checkout $$dst_url $$dst_path \
259     || $(call _fatal,$$dst_url: cant svn check out,5);\
260     else\
261     $(_svn) checkout $$dst_url $$dst_path \
262     || $(call _fatal,$$dst_url: cant svn check out,6);\
263     $(_svn) propdel svn:externals $$dst_path \
264     || $(call _fatal,$$dst_path: cant delete svn:externals,7);\
265     rm -rf $$dst_path/*;\
266     fi;\
267     ext_rev=`svn info $$src_url | sed -nr 's%^Revision:\s+(\S+)$$%\1% p'`;\
268     [ "$$ext_rev" ] || $(call _fatal,cant determine external revision,8);\
269     $(_svn) propset svn:externals "$(_trg_tag) -r$$ext_rev $$src_url" $$dst_path \
270     || $(call _fatal,$$dst_path: cant set svn:externals,9);\
271     $(_svn) commit $$dst_path -m "Added tag $(_module)/$(_tag_dir) -> $(_trg_tag)" \
272     || $(call _fatal,$$dst_path: cant svn commit,10);\
273     $(_svn) update $$dst_path || $(call _fatal,$$dst_path: cant svn update,11)
274    
275    
276     tagstable: _checkop
277     @echo "[INFO] tagging 'stable' release"
278     @prompt='Do you want to tag this release as 'stable'? [no]: ';\
279     while read -p "$$prompt" ans || exit 1; do\
280     [ -z $$ans ] && ans='no';\
281     case $$ans in\
282     [Yy]|[Yy]es)\
283     _tag_dir=stable _trg_tag=$(_vtag) $(MAKE) svnextag;\
284     break;\
285     ;;\
286     [Nn]|[Nn]o)\
287     break;\
288     ;;\
289     *)\
290     prompt='Answer either "yes" or not at all: ';\
291     esac;\
292     done
293    
294    
295     # mark as OBSOLETE (no SVN tag is added). A message to be added to config.mk
296     # can be passed through the variable OBSOLETE_MSG
297     markobsolete: _checkop
298     @[ -w config.mk ]\
299     || $(call _fatal,config.mk: file missing or not writable,1)
300     @if [ "`sed -nr '/^\s*OBSOLETE/ p' config.mk`" ]; then\
301     $(call _fatal,already marked as OBSOLETE,2);\
302     fi
303     @echo "[INFO] marking as OBSOLETE"
304     @obs_msg='1';\
305     if [ ! -z "$$OBSOLETE_MSG" ]; then\
306     obs_msg="$$OBSOLETE_MSG";\
307     fi;\
308     echo OBSOLETE="$$obs_msg" >> config.mk
309     @$(_svn) commit -m 'Module marked as OBSOLETE'\
310     || $(call _fatal,cant svn commit,3)
311    
312    
313    
314     ####################################################################
315     # Build distributions in tar & RPM/PKG format
316     ####################################################################
317     #
318     # These targets make distribution tar files and PKGs/RPMs from the
319     # CVS repository, using the version declared in the config file.
320     # The checked-out files in the current directory are neither
321     # modified, nor read (apart from the config file).
322     #
323     # "pack" and "rpm" built from the sources in the current directory.
324     #
325     #
326     # The prep:: target allows the including makefile to specify actions
327     # required to process the files at distribution pack time.
328     #
329     # These targets make distribution tar files and PKGs/RPMs based on the
330     # checked-out sources in the current directory. No connection to
331     # the CVS repository is required, and the files do not need to be
332     # committed. The RPM version numbers are generated from the
333     # version number specified in the config file.
334     #
335    
336     pack: envdir
337     @echo packing distribution...
338     @rm -rf $(_builddir)/$(_prodname)
339     @rm -f $(_sourcedir)/$(_prodtar)
340     @mkdir -p $(_builddir)/$(_prodname)
341     @find . -path '*CVS*' -prune -o -type f -print >files.tmp
342     @tar cfT - files.tmp |(cd $(_builddir)/$(_prodname) ; tar xf -)
343     @rm -f files.tmp
344     @[ ! -f specfile.spec -a -f specfile.cin ] \
345     && cp specfile.cin \
346     $(_builddir)/$(_prodname)/specfile.spec \
347     || : ;
348     @cp cl2rpm \
349     $(_builddir)/$(_prodname)/ > /dev/null 2>&1 \
350     || : ;
351     @cd $(_builddir)/$(_prodname) ; \
352     sed <$(CFG_MK) >config.tmp \
353     -e 's%^RELEASE=\(.*\)%RELEASE=\1%' \
354     -e 's%^VERSION=.*%&$(BRANCH)%' ; \
355     mv config.tmp $(CFG_MK) ; \
356     echo 'TARFILE=$(_prodtar)' >>$(CFG_MK) ; \
357     echo 'PROD=\#' >>$(CFG_MK) ; \
358     $(MAKE) config.sh ;\
359     $(MAKE) prep ;\
360     test -n "$(_test_dep)" && rm -f $(_test_dep) ;\
361     rm -f config.sh
362     @cd $(_builddir) ; tar czf $(_sourcedir)/$(_prodtar) $(_prodname)
363    
364     filelist: install
365     #
366     # ---- DO NOT MODIFY BELOW THIS LINE --- NEEDED FOR SPECFILE
367     #
368     @find $(PREFIX) -type d | sed -e 's^$(PREFIX)g' -e 's/^/%dir /' >> $(PREFIX)/.filelist
369     @find $(PREFIX) ! -type d -a ! -name ".filelist" | sed -e 's^$(PREFIX)g' >> $(PREFIX)/.filelist
370     @echo File found in distribution
371     @cat $(PREFIX)/.filelist
372    
373     spec: pack
374     @echo generating specfile.spec ...
375     @cd $(_builddir)/$(_prodname) ; \
376     $(MAKE) config.sh ;\
377     ./config.sh <specfile.spec >$(_specdir)/$(_prodname).spec
378     @test -f ChangeLog && \
379     cl2rpm ChangeLog \
380     >>$(_specdir)/$(_prodname).spec || true
381    
382     rpm: spec
383     @echo building rpm ...
384     @cd $(_specdir) ; $(_rpmbuild) -ba $(_specdir)/$(_prodname).spec
385    
386     pkg: spec
387     @echo building pkg ...
388     @cd $(_specdir) ; $(_pkgbuild) -f $(_specdir)/$(_prodname).spec
389    
390     prep::
391    
392     #####################################################################
393     # Create substitution script
394     ####################################################################
395     #
396     # This target reads the config file and creates a shell script which
397     # can substitute variables of the form @VAR@ for all config
398     # variables VAR. The messing around with the temporary makefile is
399     # to ensure that any recursive or external references in the
400     # variable values are evaluated by "make" in the same context as
401     # when the config file is included in the makefile.
402    
403     config.sh: Makefile $(_test_dep)
404     @cp /dev/null makefile.tmp
405     @echo include $(CFG_MK) >>makefile.tmp
406     @echo dumpvars: >>makefile.tmp
407     @cat $(CFG_MK) paths.mk | \
408     perl >>makefile.tmp -e ' \
409     my $$fmt = "\t\@echo \"-e \\\"s\@%s\@\$$(%s)g\\\" \\\\\"" ; \
410     while (<>) { $$v{$$1}=1 if /^([A-Za-z0-9_]+)\s*:?=.*$$/; } \
411     map { printf "$$fmt >>config.sh\n", $$_, $$_; } sort(keys(%v)); \
412     print "\n"; \
413     '
414     @echo '#!/bin/sh' >config.sh
415     @echo 'sed \' >>config.sh
416     @$(MAKE) -f makefile.tmp dumpvars >/dev/null
417     @echo ' -e "s/\@MSG\@/ ** Generated file : do not edit **/"'>>config.sh
418     @chmod oug+x config.sh
419     @rm makefile.tmp
420    
421     ####################################################################
422     # Configure
423     ####################################################################
424    
425     %:: %.cin config.sh
426     @echo configuring $@ ...
427     @rm -f $@ ; cp $< $@
428     @./config.sh <$< >$@ ; chmod oug-w $@
429    
430     %.$(MANSECT):: %.$(MANSECT).man.cin
431     @echo creating $@ ...
432     @./config.sh <$< >$@ ; chmod oug-w $@
433    
434     configure: $(shell find . -name \*\.cin 2>/dev/null | sed -e 's/.cin//' || echo)
435    
436     ####################################################################
437     # Install
438     ####################################################################
439    
440     install: configure
441     @echo installing in $(PREFIX) ...
442     #
443     # MODIFY location of installed scripts/binaries here
444     #
445    
446     ifdef MYMODS
447     @mkdir -p $(PREFIX)$(MODDIR)
448     for i in $(MYMODS) ; do \
449     install -m 0444 $$i $(PREFIX)$(MODDIR) ; \
450     done || :
451     endif
452    
453     ifdef MYDOCS
454     @mkdir -p $(PREFIX)$(DOCDIR)
455     for i in $(MYDOCS) ; do \
456     install -m 0444 $$i $(PREFIX)$(DOCDIR) ; \
457     done || :
458     endif
459    
460     ifdef MYCONFIGS
461     @mkdir -p $(PREFIX)$(CONFIGDIR)
462     @for i in $(MYCONFIGS) ; do \
463     install -m 0444 $$i $(PREFIX)$(CONFIGDIR) ; \
464     done || :
465     endif
466    
467     ifdef MYSCRIPTS
468     @mkdir -p $(PREFIX)$(SCRIPTDIR)
469     @for i in $(MYSCRIPTS) ; do \
470     install -m 0555 $$i $(PREFIX)$(SCRIPTDIR) ; \
471     done || :
472     endif
473    
474     ifdef MYTESTFILES
475     @mkdir -p $(PREFIX)$(TESTDIR)
476     @for i in $(MYTESTFILES) ; do \
477     install -m 0555 $$i $(PREFIX)$(TESTDIR) ; \
478     done || :
479     endif
480    
481     ifdef MYPLUGINS
482     @mkdir -p $(PREFIX)$(PLUGINDIR)
483     @for i in $(MYPLUGINS) ; do \
484     install -m 0555 $$i $(PREFIX)$(PLUGINDIR) ; \
485     done || :
486     endif
487    
488     ####################################################################
489    
490     clean::
491     @echo cleaning common files ...
492     @rm -f config.sh config.tex
493     @rm -f `find . -name '*~'`
494     @rm -f `find . -name '*#'`
495     @rm -f `find . -name '*.tmp'`
496     @rm -f `find . -name \*\.cin 2>/dev/null | sed -e 's/.cin//'`
497     dist: pack
498    
499    
500    

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28