Skip to content

Commit 27d53c1

Browse files
committed
Make Makefile.ukvm safe to use with BSD make, sort of
This is a temporary solution to avoid having to teach MirageOS about "which make to use". It is not expected to work for including Makefile.ukvm from other makefiles.
1 parent fc4f953 commit 27d53c1

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

ukvm/ukvm-configure

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ cat <<EOF> Makefile.ukvm
114114
# Generated by 'ukvm-configure $@'
115115
# Using compiler '${UKVM_CC}', target '${TARGET}'
116116
117+
.BEGIN: ; @echo -e Warning: \$(MAKEFILE) requires GNU make.\\\\nWarning: Attempting to build with \"gmake -f \$(MAKEFILE) \$(.TARGETS)\" for you now. && gmake -f \$(MAKEFILE) \$(.TARGETS)
118+
119+
.PHONY: all
120+
all: ukvm-bin
121+
117122
UKVM_CC=${UKVM_CC}
118123
UKVM_CFLAGS=-Wall -Werror -std=c99 -O2 -g ${UKVM_CFLAGS}
119124
UKVM_LDFLAGS=${UKVM_LDFLAGS}
@@ -135,6 +140,6 @@ ukvm-bin: \$(UKVM_OBJS) \$(MAKEFILE_LIST)
135140
136141
.PHONY: ukvm-clean
137142
ukvm-clean:
138-
\$(RM) -r _build-ukvm
139-
\$(RM) ukvm-bin
143+
rm -rf _build-ukvm
144+
rm -f ukvm-bin
140145
EOF

0 commit comments

Comments
 (0)