nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1PREFIX = $(out)
2BINDIR = $(PREFIX)/bin
3LIBEXECDIR = $(PREFIX)/libexec
4LIBDIR = $(PREFIX)/lib
5TYPELIBDIR = $(LIBDIR)/girepository-1.0
6
7all:
8 echo "Compiling…"
9install:
10 echo "Installing…"
11
12bin:
13 mkdir -p $(BINDIR)
14# Adds `bin-${foo}` targets, that install `${foo}` executable to `$(BINDIR)`.
15bin-%: bin
16 touch $(BINDIR)/$(@:bin-%=%)
17 chmod +x $(BINDIR)/$(@:bin-%=%)
18
19libexec:
20 mkdir -p $(LIBEXECDIR)
21# Adds `libexec-${foo}` targets, that install `${foo}` executable to `$(LIBEXECDIR)`.
22libexec-%: libexec
23 touch $(LIBEXECDIR)/$(@:libexec-%=%)
24 chmod +x $(LIBEXECDIR)/$(@:libexec-%=%)
25
26typelib:
27 mkdir -p $(TYPELIBDIR)
28# Adds `typelib-${foo}` targets, that install `${foo}-1.0.typelib` file to `$(TYPELIBDIR)`.
29typelib-%: typelib
30 touch $(TYPELIBDIR)/$(@:typelib-%=%)-1.0.typelib