mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-11-24 12:54:28 +03:00
Make BSD 'sed' happy
This commit is contained in:
parent
edc3e2a4cd
commit
0e01c2aa0b
20
Makefile
20
Makefile
@ -8,6 +8,20 @@ export CC=clang # clang compiles the output much faster than gcc!
|
|||||||
|
|
||||||
##################################################################
|
##################################################################
|
||||||
|
|
||||||
|
MACHINE := $(shell $(CC) -dumpmachine)
|
||||||
|
|
||||||
|
ifneq (, $(findstring darwin, $(MACHINE)))
|
||||||
|
OS := darwin
|
||||||
|
else ifneq (, $(findstring cygwin, $(MACHINE)))
|
||||||
|
OS := windows
|
||||||
|
else ifneq (, $(findstring mingw, $(MACHINE)))
|
||||||
|
OS := windows
|
||||||
|
else ifneq (, $(findstring windows, $(MACHINE)))
|
||||||
|
OS := windows
|
||||||
|
else
|
||||||
|
OS := unix
|
||||||
|
endif
|
||||||
|
|
||||||
# current Idris2 version components
|
# current Idris2 version components
|
||||||
MAJOR=0
|
MAJOR=0
|
||||||
MINOR=0
|
MINOR=0
|
||||||
@ -53,7 +67,11 @@ idris2: dist/idris2.c idris2-fromc
|
|||||||
# (Also replaces the first line of the generated C with the proper prefix)
|
# (Also replaces the first line of the generated C with the proper prefix)
|
||||||
#
|
#
|
||||||
idris2-fromc:
|
idris2-fromc:
|
||||||
sed -i '1 s|^.*$$|char* idris2_prefix = "${PREFIX}";|' dist/idris2.c
|
ifeq ($(OS), darwin)
|
||||||
|
@sed -i '' '1 s|^.*$$|char* idris2_prefix = "${PREFIX}";|' dist/idris2.c
|
||||||
|
else
|
||||||
|
@sed -i '1 s|^.*$$|char* idris2_prefix = "${PREFIX}";|' dist/idris2.c
|
||||||
|
endif
|
||||||
make -C dist
|
make -C dist
|
||||||
@cp dist/idris2 ./idris2
|
@cp dist/idris2 ./idris2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user