summaryrefslogtreecommitdiff
path: root/proto/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'proto/Makefile')
-rw-r--r--proto/Makefile32
1 files changed, 6 insertions, 26 deletions
diff --git a/proto/Makefile b/proto/Makefile
index 98f0f4a..2716cbc 100644
--- a/proto/Makefile
+++ b/proto/Makefile
@@ -15,32 +15,12 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA
-ifeq ($(origin topsrcdir),undefined)
-srcdir := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
-.DEFAULT_GOAL = all
-else
-include $(topsrcdir)/build-aux/Makefile.head.mk
-endif
+files.src.gen += requests.txt
-std.gen_files += server/interface_backend.go
-std.gen_files += server/func_handlerequest.go
-std.gen_files += server/type_nilbackend.go
-std.secondary_gen_files += requests.txt
+files.generate: $(files.src.gen)
+maintainer-clean:
+ rm -f -- $(files.src.gen)
+.PHONY: files.generate maintainer-clean
-$(srcdir)/requests.txt: $(srcdir)/nslcd_h.go $(srcdir)/Makefile
+requests.txt: nslcd_h.go Makefile
< $< grep -Eo '\btype Request_([^_ ]+)(_\S+)?' | sed 's/^type Request_//' > $@
-
-_nslcd.srcdir := $(srcdir)
-_nslcd.rel=$(patsubst $(abspath $(_nslcd.srcdir))/%,./%,$(abspath $1))
-$(srcdir)/%.go: $(srcdir)/%.go.sh
- cd $(_nslcd.srcdir) && $(call _nslcd.rel,$^) > $(call _nslcd.rel,$@)
-
-$(srcdir)/server/interface_backend.go: $(srcdir)/requests.txt
-$(srcdir)/server/func_handlerequest.go: $(srcdir)/requests.txt
-$(srcdir)/server/type_nilbackend.go: $(srcdir)/server/interface_backend.go
-
-ifeq ($(origin topsrcdir),undefined)
-include $(srcdir)/common.mk
-else
-include $(topsrcdir)/build-aux/Makefile.tail.mk
-endif