Re: Uppercasing files

2001-01-31 Thread Emiliano

Tom Tromey wrote:
 
  "Emile" == Emiliano  [EMAIL PROTECTED] writes:
 
 Emile I'm trying to create an automake file that has rules to
 Emile uppercase files.  For example I have something.ext and I want
 Emile it to create a copy SOMETHING.EXT. I tried with this:
 
 Emile pkgdata_DATA = SOMETHING.EXT OTHER.EXT
 Emile CLEANFILES = $(pkgdata_DATA)
 Emile %.EXT : %.ext
 Emile  cp -f $ `echo $ | tr a-z A-Z`
 
 Emile but that doesn't work since no file SOMETHING.ext exists. How
 Emile so I go about this?
 
 Write explicit rules.
 
 SOMETHING.EXT: something.ext

Yes, but I'd rather not if it can be avoided. There are quite a number
of them
and it impacts readability, plus there's more to keep consistent
manually (after
the uppercasing other ops are done on the files.

At the moment I've used a default rule, which works, but doesn't handle
dependancy:

.DEFAULT:
   cp -f `echo $(basename $@) | tr [:upper:] [:lower:]`.m $(basename
$@).m
   ../mumps/mumps $(basename $@).m 21

Emile




Re: Uppercasing files

2001-01-31 Thread Alexandre Oliva

On Jan 31, 2001, Emiliano [EMAIL PROTECTED] wrote:

 Tom Tromey wrote:
 Write explicit rules.

 SOMETHING.EXT: something.ext

 Yes, but I'd rather not if it can be avoided.

I'm afraid it can't.  Unix is case-sensitive, why shouldn't `make' be?

Well...  I suppose you could do something about it if you were willing
to get your Makefiles non-portable and use GNU make only, by using
$(shell ) magic.  Or you could write a script to generate the rules
and get them included in the Makefile with AC_SUBST_FILE or automake's
include feature.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicampoliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist*Please* write to mailing lists, not to me




Re: Uppercasing files

2001-01-31 Thread Emiliano

Alexandre Oliva wrote:
 
 On Jan 31, 2001, Emiliano [EMAIL PROTECTED] wrote:
 
  Tom Tromey wrote:
  Write explicit rules.
 
  SOMETHING.EXT: something.ext
 
  Yes, but I'd rather not if it can be avoided.
 
 I'm afraid it can't.  Unix is case-sensitive, why shouldn't `make' be?

But that's the whole issue. If unix weren't case sensitive we wouldn't
be having this discussion.

 Well...  I suppose you could do something about it if you were willing
 to get your Makefiles non-portable and use GNU make only, by using

Totally acceptable.

 $(shell ) magic.  Or you could write a script to generate the rules
 and get them included in the Makefile with AC_SUBST_FILE or automake's
 include feature.

I'd appreciate pointers on how to accomplish this. I've not been using
automake very long and learning to abuse it would take some time :)

Emile




Re: Uppercasing files

2001-01-30 Thread Tom Tromey

 "Emile" == Emiliano  [EMAIL PROTECTED] writes:

Emile I'm trying to create an automake file that has rules to
Emile uppercase files.  For example I have something.ext and I want
Emile it to create a copy SOMETHING.EXT. I tried with this:

Emile pkgdata_DATA = SOMETHING.EXT OTHER.EXT
Emile CLEANFILES = $(pkgdata_DATA)
Emile %.EXT : %.ext
Emile  cp -f $ `echo $ | tr a-z A-Z`

Emile but that doesn't work since no file SOMETHING.ext exists. How
Emile so I go about this?

Write explicit rules.

SOMETHING.EXT: something.ext
...

Tom