Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
sunaoka committed Jun 6, 2024
1 parent 6d8de42 commit 632266e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ MOUNT := -v ./rpmbuild/SOURCES:/root/rpmbuild/SOURCES \
-v ./rpmbuild/RPMS:/root/rpmbuild/RPMS \
-v ./rpmbuild/SRPMS:/root/rpmbuild/SRPMS

SOURCES := rpmbuild/SOURCES/php-$(PHP_VERSION).tar.xz \
rpmbuild/SOURCES/php-$(PHP_VERSION).tar.xz.asc

TARGET := build-arm64 \
build-amd64

all: build

build: rpmbuild/SOURCES/php-$(PHP_VERSION).tar.xz rpmbuild/SOURCES/php-$(PHP_VERSION).tar.xz.asc $(TARGET)
build: $(SOURCES) $(TARGET)

rpmbuild/SOURCES/php-$(PHP_VERSION).tar.xz:
curl -f -o $@ -LO https://www.php.net/distributions/$(@F)
Expand All @@ -21,7 +24,7 @@ rpmbuild/SOURCES/php-$(PHP_VERSION).tar.xz.asc:
curl -f -o $@ -LO https://www.php.net/distributions/$(@F)

build-%:
docker build --build-arg PLATFORM=linux/$* --build-arg PHP_VER=$(PHP_VERSION) -t $(IMAGE):$* .
docker build --build-arg PLATFORM=linux/$* -t $(IMAGE):$* .
docker run --rm $(MOUNT) $(IMAGE):$*

clean:
Expand Down

0 comments on commit 632266e

Please sign in to comment.