bugmake - Bugs: bug #60165, Multiple pattern rules with single...

 
 

bug #60165: Multiple pattern rules with single rule

Submitted by:  None
Submitted on:  Wed 03 Mar 2021 09:24:53 PM UTC
 
Severity:  3 - Normal Item Group:  Enhancement
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  None Operating System:  None
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Wed 03 Mar 2021 09:24:53 PM UTC, original submission:  

To shorten the code, I would like to create multiple pattern rules with a single rule.

E.g. the code below is not working as desired.

$(BUILD)/$(FRONTEND)/%.html \
$(BUILD)/$(FRONTEND)/%.js   \
$(BUILD)/$(FRONTEND)/%.css  \
$(BUILD)/$(FRONTEND)/%.svg  \
$(BUILD)/$(FRONTEND)/%.ico:
@echo -n "$(FRONTEND) - building $@"
@$(MD) $(BUILD)/$(FRONTEND)
@cp $(FRONTEND)/$(@F) $@
@echo " ...done"

.PHONY:
login: $(BUILD)/$(FRONTEND)/login.html \
       $(BUILD)/$(FRONTEND)/login.js $(BUILD)/$(FRONTEND)/options.js $(BUILD)/$(FRONTEND)/node.js \
       $(BUILD)/$(FRONTEND)/login.css $(BUILD)/$(FRONTEND)/common.css \
       $(BUILD)/$(FRONTEND)/logo.svg \
       $(BUILD)/$(FRONTEND)/favicon.ico
@echo -n "$(FRONTEND) - building login"
@echo " ...done"

# result
# q@odysseus:~/ff$ make login
# frontend - building build/frontend/login.html ...done
# frontend - building build/frontend/options.js ...done
# frontend - building build/frontend/node.js ...done
# frontend - building build/frontend/common.css ...done
# frontend - building build/frontend/logo.svg ...done
# frontend - building build/frontend/favicon.ico ...done
# frontend - building login ...done
# q@odysseus:~/ff$ make login
# frontend - building build/frontend/login.js ...done
# frontend - building login ...done
# q@odysseus:~/ff$ make login
# frontend - building build/frontend/login.css ...done
# frontend - building login ...done

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

 

 

 

No changes have been made to this item

Back to the top


Powered by Savane 3.9