Skip to content

Commit 9f2484f

Browse files
authored
Fix make rule for initvm and add it to .gitignore (#1143)
* Add initvm binaries to .gitignore That way the working dir is unchanged after make initvm. * Use a proper Makefile rule for initvm.$(INITVM_ARCH) Use the actual filename of the executable as target. That way make knows when it needs to be built.
1 parent 8872e4a commit 9f2484f

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
*.sw?
22
*~
3+
!initvm.c
4+
initvm.*

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ DESTDIR=
2121

2222
all:
2323

24-
.PHONY: test test-debtransform doc
24+
.PHONY: test test-debtransform doc initvm
2525

2626
test:
2727
[ "$(SCM)" != "git" ] || git --no-pager diff --check origin/master..HEAD -- || [ -f /.buildenv ]
@@ -121,8 +121,10 @@ install:
121121
# is useful because it is distributed as a static binary package (e.g.
122122
# build-initvm-static) whereas the build scripts package is noarch.
123123

124-
initvm: initvm.c
125-
$(CC) -o $@.$(INITVM_ARCH) -static $(CFLAGS) initvm.c
124+
initvm: initvm.$(INITVM_ARCH) ;
125+
126+
initvm.$(INITVM_ARCH): initvm.c
127+
$(CC) -o $@ -static $(CFLAGS) initvm.c
126128

127129
initvm-all: initvm
128130

0 commit comments

Comments
 (0)