[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] Makefile problemer




Martin Møller Pedersen wrote:
Hejsa,
Jeg har en række filer der ender på .abc, som jeg skal have
konverteret til postscript filer
filer. Her er min Makefile, som desværre ikke virker:


================================================

PS=jcabc2ps

PS_OBJECTS := $(patsubst %.abc,%.ps,$(wildcard *.abc))

all: $(PS_OBJECTS)

%.ps:
        $(PS) $<  >$@

=================================



Problem nummer 1:

Når jeg skriver make, får jeg flg.:

jcabc2ps >blaeksprutten_olsen.ps

Jeg skulle gerne have haft:
jcabc2ps blaeksprutten_olsen.abc > blaeksprutten_olsen.ps

Så $< bliver ikke ekspanderet.
Jeg så lidt på make dokumentationen. Der står, at $< kun giver mening for inference rules: http://www.opengroup.org/onlinepubs/007908799/xcu/make.html#tag_001_014_1377_005

Ved at ændre til
	$(PS) $*.abc >$@
fik jeg en opførsel, som kunne være den, du ønsker.



Problem nummer 2:

Jeg vil gerne have mine filer i to kataloger istedet for et enkelt
abc/ og ps/, så
jeg har prøvet med:

PS_OBJECTS := $(patsubst abc/%.ps,ps/%.ps,$(patsubst
%.abc,%.ps,$(wildcard abc/*.abc)))

Men det virker heller ikke.

Mvh
Martin




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *