summaryrefslogtreecommitdiff
path: root/pkg/btrfs/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/btrfs/Makefile')
-rw-r--r--pkg/btrfs/Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/pkg/btrfs/Makefile b/pkg/btrfs/Makefile
index b29e033..33d3793 100644
--- a/pkg/btrfs/Makefile
+++ b/pkg/btrfs/Makefile
@@ -8,6 +8,8 @@ files += btrfsitem/items.txt
btrfsitem/items_gen.go: btrfsitem/items.txt $(MAKEFILE_LIST)
{ \
+ echo '// Code generated by Make. DO NOT EDIT.'; \
+ echo; \
echo 'package $(@D)'; \
echo 'import ('; \
echo '"reflect"'; \
@@ -26,6 +28,8 @@ files += btrfsitem/items_gen.go
internal/itemtype.go: btrfsitem/items.txt $(MAKEFILE_LIST)
{ \
+ echo '// Code generated by Make. DO NOT EDIT.'; \
+ echo; \
echo 'package $(@D)'; \
echo 'import "fmt"'; \
echo 'type ItemType uint8'; \
@@ -44,6 +48,20 @@ internal/itemtype.go: btrfsitem/items.txt $(MAKEFILE_LIST)
} | gofmt >$@
files += internal/itemtype.go
+internal_objid.go: internal/objid.go $(MAKEFILE_LIST)
+ { \
+ echo '// Code generated by Make. DO NOT EDIT.'; \
+ echo; \
+ echo 'package btrfs'; \
+ echo 'import ('; \
+ echo '"lukeshu.com/btrfs-tools/pkg/btrfs/internal"'; \
+ echo ')'; \
+ echo 'const('; \
+ sed -En 's/^\s*(\S*_OBJECTID)\s*=.*/\1 = internal.\1/p' <$<; \
+ echo ')'; \
+ } | gofmt >$@
+files += internal_objid.go
+
all: $(files)
.PHONY: all