Skip to main content
deleted 10 characters in body
Source Link
guest_7
  • 5.8k
  • 1
  • 8
  • 13

You need to include their names in the pdfs list.

But the idiomatic way to do it is to start from source (in your case the .texi files) and from them, dynamically generate the output list (in your case .pdf files)

Also, you should mark the targets as .PHONY for which no corresponding file exists.

.PHONY: all new again clean ch6 igm rf 

ch6 := $(wildcard *amcoh.texi)
igm := $(wildcard *igm.texi)
rfc := $(wildcard *rfc.texi)

tfiles := $(ch6) $(igm) $(rfc)
pdfs := $(tfiles:.texi=.pdf)

define mkRule
$(eval $1: $$(filter $$($1:.texi=.pdf),$$(pdfs)))
endef
$(call mkRule,ch6)
$(call mkRule,igm)
$(call mkRule,rfc)

all: ${pdfs}

%.pdf: %.texi
    echo texi2pdf $< -o $@ > $@

clean:
    rm -f ${pdfs}

again:
    ${MAKE} clean
    ${MAKE} all

new:
    ${MAKE} again

Now invoke make as :

make igm    #to process *igm.texi 

You need to include their names in the pdfs list.

But the idiomatic way to do it is to start from source (in your case the .texi files) and from them, dynamically generate the output list (in your case .pdf files)

Also, you should mark the targets as .PHONY for which no corresponding file exists.

.PHONY: all new again clean ch6 igm rf 

ch6 := $(wildcard *amcoh.texi)
igm := $(wildcard *igm.texi)
rfc := $(wildcard *rfc.texi)

tfiles := $(ch6) $(igm) $(rfc)
pdfs := $(tfiles:.texi=.pdf)

define mkRule
$(eval $1: $$(filter $$($1:.texi=.pdf),$$(pdfs)))
endef
$(call mkRule,ch6)
$(call mkRule,igm)
$(call mkRule,rfc)

all: ${pdfs}

%.pdf: %.texi
    echo texi2pdf $< -o $@ > $@

clean:
    rm -f ${pdfs}

again:
    ${MAKE} clean
    ${MAKE} all

new:
    ${MAKE} again

Now invoke make as :

make igm    #to process *igm.texi 

You need to include their names in the pdfs list.

But the idiomatic way to do it is to start from source (in your case the .texi files) and from them, dynamically generate the output list (in your case .pdf files)

Also, you should mark the targets as .PHONY for which no corresponding file exists.

.PHONY: all new again clean ch6 igm rf 

ch6 := $(wildcard *amcoh.texi)
igm := $(wildcard *igm.texi)
rfc := $(wildcard *rfc.texi)

tfiles := $(ch6) $(igm) $(rfc)
pdfs := $(tfiles:.texi=.pdf)

define mkRule
$(eval $1: $$(filter $$($1:.texi=.pdf),$$(pdfs)))
endef
$(call mkRule,ch6)
$(call mkRule,igm)
$(call mkRule,rfc)

all: ${pdfs}

%.pdf: %.texi
    texi2pdf $< -o $@

clean:
    rm -f ${pdfs}

again:
    ${MAKE} clean
    ${MAKE} all

new:
    ${MAKE} again

Now invoke make as :

make igm    #to process *igm.texi 
added 223 characters in body
Source Link
guest_7
  • 5.8k
  • 1
  • 8
  • 13

You need to include their names in the pdfs list.

But the idiomatic way to do it is to start from source (in your case the .texi files) and from them, dynamically generate the output list (in your case .pdf files)

Also, you should mark the targets as .PHONY for which no corresponding file exists.

.PHONY: all new again clean ch6 igm rf 

ch6 := $(wildcard *amcoh.texi)
igm := $(wildcard *igm.texi)
texisrfc := $(wildcard **rfc.texi)

tfiles := $(ch6) $(igm) $(rfc)
pdfs := $(texistfiles:.texi=.pdf)

define mkRule
$(eval $1: $$(filter $$($1:.texi=.pdf),$$(pdfs)))
endef
$(call mkRule,ch6)
$(call mkRule,igm)
$(call mkRule,rfc)

all: ${pdfs}

%.pdf: %.texi
    echo texi2pdf $< -o $@ > $@

clean:
    rm -f ${pdfs}

again:
    ${MAKE} clean
    ${MAKE} all

new:
    ${MAKE} again

Now invoke make as :

make texis="06a-amcoh.texi 06a-amcoh-igm.texi 06a-amcoh-rfc   #to process *igm.texi"texi 

You need to include their names in the pdfs list.

But the idiomatic way to do it is to start from source (in your case the .texi files) and from them, dynamically generate the output list (in your case .pdf files)

Also, you should mark the targets as .PHONY for which no corresponding file exists.

.PHONY: all new again clean


texis := $(wildcard *.texi)

pdfs := $(texis:.texi=.pdf)

all: ${pdfs}

%.pdf: %.texi
    texi2pdf $< -o $@

clean:
    rm -f ${pdfs}

again:
    ${MAKE} clean
    ${MAKE}

new:
    ${MAKE} again

Now invoke make as :

make texis="06a-amcoh.texi 06a-amcoh-igm.texi 06a-amcoh-rfc.texi" 

You need to include their names in the pdfs list.

But the idiomatic way to do it is to start from source (in your case the .texi files) and from them, dynamically generate the output list (in your case .pdf files)

Also, you should mark the targets as .PHONY for which no corresponding file exists.

.PHONY: all new again clean ch6 igm rf 

ch6 := $(wildcard *amcoh.texi)
igm := $(wildcard *igm.texi)
rfc := $(wildcard *rfc.texi)

tfiles := $(ch6) $(igm) $(rfc)
pdfs := $(tfiles:.texi=.pdf)

define mkRule
$(eval $1: $$(filter $$($1:.texi=.pdf),$$(pdfs)))
endef
$(call mkRule,ch6)
$(call mkRule,igm)
$(call mkRule,rfc)

all: ${pdfs}

%.pdf: %.texi
    echo texi2pdf $< -o $@ > $@

clean:
    rm -f ${pdfs}

again:
    ${MAKE} clean
    ${MAKE} all

new:
    ${MAKE} again

Now invoke make as :

make igm    #to process *igm.texi 
added 97 characters in body
Source Link
guest_7
  • 5.8k
  • 1
  • 8
  • 13

You need to include their names in the pdfs list.

But the idiomatic way to do it is to start from source (in your case the .texi files) and from them, dynamically generate the output list (in your case .pdf files)

Also, you should mark the targets as .PHONY for which no corresponding file exists.

.PHONY: all new again clean


 # texis := $(wildcard *.texi)

texis := \
      06a-amcoh.texi     \
      06a-amcoh-igm.texi \
      06a-amcoh-rfc.texi

pdfs := $(texis:.texi=.pdf)

all: ${pdfs}

%.pdf: %.texi
    texi2pdf $< -o $@

clean:
    rm -f ${pdfs}

again:
    ${MAKE} clean
    ${MAKE}

new:
    ${MAKE} again

Now invoke make as :

make texis="06a-amcoh.texi 06a-amcoh-igm.texi 06a-amcoh-rfc.texi" 

You need to include their names in the pdfs list.

But the idiomatic way to do it is to start from source (in your case the .texi files) and from them, dynamically generate the output list (in your case .pdf files)

Also, you should mark the targets as .PHONY for which no corresponding file exists.

.PHONY: all new again clean


 # texis := $(wildcard *.texi)

texis := \
      06a-amcoh.texi     \
      06a-amcoh-igm.texi \
      06a-amcoh-rfc.texi

pdfs := $(texis:.texi=.pdf)

all: ${pdfs}

%.pdf: %.texi
    texi2pdf $< -o $@

clean:
    rm -f ${pdfs}

again:
    ${MAKE} clean
    ${MAKE}

new:
    ${MAKE} again

You need to include their names in the pdfs list.

But the idiomatic way to do it is to start from source (in your case the .texi files) and from them, dynamically generate the output list (in your case .pdf files)

Also, you should mark the targets as .PHONY for which no corresponding file exists.

.PHONY: all new again clean


texis := $(wildcard *.texi)

pdfs := $(texis:.texi=.pdf)

all: ${pdfs}

%.pdf: %.texi
    texi2pdf $< -o $@

clean:
    rm -f ${pdfs}

again:
    ${MAKE} clean
    ${MAKE}

new:
    ${MAKE} again

Now invoke make as :

make texis="06a-amcoh.texi 06a-amcoh-igm.texi 06a-amcoh-rfc.texi" 
added 105 characters in body
Source Link
guest_7
  • 5.8k
  • 1
  • 8
  • 13
Loading
Source Link
guest_7
  • 5.8k
  • 1
  • 8
  • 13
Loading