cmd/mkinitfs: rename binary and move
This moves the main package to cmd/mkinitfs, and configures the compiled binary to be named 'mkinitfs'. calling the full name 'postmarketos-mkinitfs' was unlikely to be used by anyone... This move makes the project source layout more consistent with other Go projects, and allows for adding more cmd/* things with their own main packages later if we want
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1 +1 @@
|
|||||||
/postmarketos-mkinitfs
|
/mkinitfs
|
||||||
|
17
Makefile
17
Makefile
@@ -13,10 +13,10 @@ GOTEST=go test -count=1 -race
|
|||||||
GOSRC!=find * -name '*.go'
|
GOSRC!=find * -name '*.go'
|
||||||
GOSRC+=go.mod go.sum
|
GOSRC+=go.mod go.sum
|
||||||
|
|
||||||
all: postmarketos-mkinitfs
|
all: mkinitfs
|
||||||
|
|
||||||
postmarketos-mkinitfs: $(GOSRC)
|
mkinitfs: $(GOSRC)
|
||||||
$(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o postmarketos-mkinitfs
|
$(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o mkinitfs ./cmd/mkinitfs
|
||||||
|
|
||||||
.PHONY: fmt
|
.PHONY: fmt
|
||||||
fmt:
|
fmt:
|
||||||
@@ -33,21 +33,18 @@ test:
|
|||||||
@$(GOTEST) ./...
|
@$(GOTEST) ./...
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) postmarketos-mkinitfs
|
$(RM) mkinitfs
|
||||||
|
|
||||||
install: $(DOCS) postmarketos-mkinitfs
|
install: $(DOCS) mkinitfs
|
||||||
install -Dm755 postmarketos-mkinitfs -t $(DESTDIR)$(BINDIR)/
|
install -Dm755 mkinitfs -t $(DESTDIR)$(BINDIR)/
|
||||||
ln -sf postmarketos-mkinitfs $(DESTDIR)$(BINDIR)/mkinitfs
|
|
||||||
|
|
||||||
.PHONY: checkinstall
|
.PHONY: checkinstall
|
||||||
checkinstall:
|
checkinstall:
|
||||||
test -e $(DESTDIR)$(BINDIR)/postmarketos-mkinitfs
|
test -e $(DESTDIR)$(BINDIR)/mkinitfs
|
||||||
test -L $(DESTDIR)$(BINDIR)/mkinitfs
|
|
||||||
|
|
||||||
RMDIR_IF_EMPTY:=sh -c '! [ -d $$0 ] || ls -1qA $$0 | grep -q . || rmdir $$0'
|
RMDIR_IF_EMPTY:=sh -c '! [ -d $$0 ] || ls -1qA $$0 | grep -q . || rmdir $$0'
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
$(RM) $(DESTDIR)$(BINDIR)/postmarketos-mkinitfs
|
|
||||||
$(RM) $(DESTDIR)$(BINDIR)/mkinitfs
|
$(RM) $(DESTDIR)$(BINDIR)/mkinitfs
|
||||||
${RMDIR_IF_EMPTY} $(DESTDIR)$(BINDIR)
|
${RMDIR_IF_EMPTY} $(DESTDIR)$(BINDIR)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user