diff options
author | David Teigland <teigland@redhat.com> | 2022-09-27 09:06:06 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2022-09-27 09:06:06 -0500 |
commit | c1ab9fb37faee56cee278ccd94cb958d30d61b94 (patch) | |
tree | 335cb13f34d7b943726af7f7dc15d1e9e06595bf /include | |
parent | fd05b79aad6ccf89f85bd85f5a4b32e1275ce785 (diff) | |
download | lvm2-c1ab9fb37faee56cee278ccd94cb958d30d61b94.tar.gz |
make: move cmds.h
generate the header in the include dir so it
can be easily used from both lib and tools dirs.
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile.in | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/Makefile.in b/include/Makefile.in index d6c30d15b..88a06a934 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -18,6 +18,21 @@ top_builddir = @top_builddir@ include $(top_builddir)/make.tmpl +cmds.h: + @echo " [GEN] $@" + $(Q) set -o pipefail && \ + ( cat $(top_srcdir)/tools/license.inc && \ + echo "/* Do not edit. This file is generated by the Makefile. */" && \ + echo "cmd(CMD_NONE, none)" && \ + $(GREP) '^ID:' $(top_srcdir)/tools/command-lines.in | LC_ALL=C $(SORT) -u | $(AWK) '{print "cmd(" $$2 "_CMD, " $$2 ")"}' && \ + echo "cmd(CMD_COUNT, count)" \ + ) > $@ + +all: cmds.h + +clean: + rm -f cmds.h + DISTCLEAN_TARGETS += configure.h lvm-version.h CLEAN_TARGETS += \ .symlinks \ @@ -99,4 +114,5 @@ CLEAN_TARGETS += \ util.h \ uuid.h \ vg.h \ - xlate.h + xlate.h \ + cmds.h |