[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Pattern rules with % matching empty string?
From: |
Glen Huang |
Subject: |
Pattern rules with % matching empty string? |
Date: |
Fri, 24 Apr 2020 12:15:25 +0800 |
Hi,
I’m trying to do something like this:
remote-bin-host%: bin
scp $< host$*:$<
touch $@
to update files in remote hosts.
It works for remote-bin-host1, remote-bin-host2, etc, but not remote-bin-host.
It seems % won’t match empty string.
I tried mixing static and pattern rule like this to make it work:
remote-bin-host remote-bin-host%: bin
scp $< host$*:$<
touch $@
And make complains such mixture is deprecated.
Is there a clean way to write it without splitting the rule and duplicating
most of the receipt?
Thanks in advance, and hope everyone is staying strong in this crisis.
BTW, is updating remote files like this a bad idea? My use case is that bin is
a web service, and once built, should be run on a remote dev machine to be
tested.
- Pattern rules with % matching empty string?,
Glen Huang <=