makefile: convert to use simple parenthesis

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2023-05-31 13:46:56 +02:00
parent 16f7fe8522
commit 05a31bffc9
5 changed files with 39 additions and 39 deletions

View file

@ -1,11 +1,11 @@
PVEDIR=${DESTDIR}/usr/share/perl5/PVE
PVEDIR=$(DESTDIR)/usr/share/perl5/PVE
SOURCES=ClusterConfig.pm
.PHONY: install
install: ${SOURCES}
install -d ${PVEDIR}/API2/
for f in ${SOURCES}; do install -m 0664 $$f ${PVEDIR}/API2/$$f; done
install: $(SOURCES)
install -d $(PVEDIR)/API2/
for f in $(SOURCES); do install -m 0664 $$f $(PVEDIR)/API2/$$f; done
.PHONY: clean
clean:

View file

@ -1,11 +1,11 @@
PVEDIR=${DESTDIR}/usr/share/perl5/PVE
PVEDIR=$(DESTDIR)/usr/share/perl5/PVE
SOURCES=pvecm.pm
.PHONY: install
install: ${SOURCES}
install -d -m 0755 ${PVEDIR}/CLI
for f in ${SOURCES}; do install -D -m 0644 $$f ${PVEDIR}/CLI/$$f; done
install: $(SOURCES)
install -d -m 0755 $(PVEDIR)/CLI
for f in $(SOURCES); do install -D -m 0644 $$f $(PVEDIR)/CLI/$$f; done
.PHONY: clean
clean:

View file

@ -1,11 +1,11 @@
PVEDIR=${DESTDIR}/usr/share/perl5/PVE
PVEDIR=$(DESTDIR)/usr/share/perl5/PVE
SOURCES=IPCConst.pm Setup.pm
.PHONY: install
install: ${SOURCES}
install -d ${PVEDIR}/Cluster
for f in ${SOURCES}; do install -m 0664 $$f ${PVEDIR}/Cluster/$$f; done
install: $(SOURCES)
install -d $(PVEDIR)/Cluster
for f in $(SOURCES); do install -m 0664 $$f $(PVEDIR)/Cluster/$$f; done
IPCConst.pm: ../../pmxcfs/cfs-ipc-ops.h
awk -f IPCConst.pm.awk $< > $@.tmp

View file

@ -1,12 +1,12 @@
DESTDIR=
PERL5DIR=${DESTDIR}/usr/share/perl5
PVEDIR=${PERL5DIR}/PVE
MAN=${DESTDIR}/usr/share/man
BASHCOMPLETION=${DESTDIR}/usr/share/bash-completion/completions
ZSHCOMPLETION=${DESTDIR}/usr/share/zsh/vendor-completions
PERL5DIR=$(DESTDIR)/usr/share/perl5
PVEDIR=$(PERL5DIR)/PVE
MAN=$(DESTDIR)/usr/share/man
BASHCOMPLETION=$(DESTDIR)/usr/share/bash-completion/completions
ZSHCOMPLETION=$(DESTDIR)/usr/share/zsh/vendor-completions
PERL_VENDORARCH=$(shell perl -MConfig -e 'print $$Config{vendorarch};')
PVE_VENDORARCH=${DESTDIR}/${PERL_VENDORARCH}/auto/PVE/IPCC
PERL_VENDORARCH=$(shell perl -MConfig -e 'print $$Config(vendorarch);')
PVE_VENDORARCH=$(DESTDIR)/$(PERL_VENDORARCH)/auto/PVE/IPCC
PERL_DOC_INC_DIRS:=..
@ -16,30 +16,30 @@ SOURCES=IPCC.pm Cluster.pm Corosync.pm RRD.pm DataCenterConfig.pm SSHInfo.pm
all:
.PHONY: install
install: pvecm ${SOURCES} IPCC.so pvecm.1 pvecm.bash-completion pvecm.zsh-completion datacenter.cfg.5
install -D -m 0755 pvecm ${DESTDIR}/usr/bin/pvecm
install -d ${PVEDIR}
for f in ${SOURCES}; do install -m 0664 $$f ${PVEDIR}/$$f; done
install -D IPCC.so ${PVE_VENDORARCH}/IPCC.so
install -D pvecm.1 ${MAN}/man1/pvecm.1
install -D datacenter.cfg.5 ${MAN}/man5/datacenter.cfg.5
install -m 0644 -D pvecm.bash-completion ${BASHCOMPLETION}/pvecm
install -m 0644 -D pvecm.zsh-completion ${ZSHCOMPLETION}/_pvecm
for d in ${SUBDIRS}; do $(MAKE) -C $$d install; done
install: pvecm $(SOURCES) IPCC.so pvecm.1 pvecm.bash-completion pvecm.zsh-completion datacenter.cfg.5
install -D -m 0755 pvecm $(DESTDIR)/usr/bin/pvecm
install -d $(PVEDIR)
for f in $(SOURCES); do install -m 0664 $$f $(PVEDIR)/$$f; done
install -D IPCC.so $(PVE_VENDORARCH)/IPCC.so
install -D pvecm.1 $(MAN)/man1/pvecm.1
install -D datacenter.cfg.5 $(MAN)/man5/datacenter.cfg.5
install -m 0644 -D pvecm.bash-completion $(BASHCOMPLETION)/pvecm
install -m 0644 -D pvecm.zsh-completion $(ZSHCOMPLETION)/_pvecm
for d in $(SUBDIRS); do $(MAKE) -C $$d install; done
%.bash-completion:
perl ${PERL_DOC_INC} -T -e "use PVE::CLI::$*; PVE::CLI::$*->generate_bash_completions();" >$@.tmp
perl $(PERL_DOC_INC) -T -e "use PVE::CLI::$*; PVE::CLI::$*->generate_bash_completions();" >$@.tmp
mv $@.tmp $@
%.zsh-completion:
perl ${PERL_DOC_INC} -T -e "use PVE::CLI::$*; PVE::CLI::$*->generate_zsh_completions();" >$@.tmp
perl $(PERL_DOC_INC) -T -e "use PVE::CLI::$*; PVE::CLI::$*->generate_zsh_completions();" >$@.tmp
mv $@.tmp $@
Cluster/IPCConst.pm:
$(MAKE) -C Cluster IPCConst.pm
check: IPCC.so Cluster/IPCConst.pm
perl ${PERL_DOC_INC} -T -e "use PVE::CLI::pvecm; PVE::CLI::pvecm->verify_api();"
perl $(PERL_DOC_INC) -T -e "use PVE::CLI::pvecm; PVE::CLI::pvecm->verify_api();"
CC=gcc
CFLAGS += -fPIC -Wl,-z,relro -Wall -Werror -Wno-strict-aliasing -g -O2 -shared
@ -55,7 +55,7 @@ IPCC.c: IPCC.xs ppport.h
mv IPCC.xsc IPCC.c
IPCC.so: IPCC.o
$(CC) ${CFLAGS} -shared -o $@ $< ${LDFLAGS}
$(CC) $(CFLAGS) -shared -o $@ $< $(LDFLAGS)
-include /usr/share/pve-doc-generator/pve-doc-generator.mk
@ -63,4 +63,4 @@ IPCC.so: IPCC.o
clean:
$(MAKE) cleanup-docgen
rm -f IPCC.so IPCC.o IPCC.c pvecm.bash-completion pvecm.zsh-completion
for d in ${SUBDIRS}; do $(MAKE) -C $$d clean; done
for d in $(SUBDIRS); do $(MAKE) -C $$d clean; done

View file

@ -7,9 +7,9 @@ CFLAGS += -Wall -Werror -Wno-unknown-pragmas -Wno-strict-aliasing
CFLAGS += -Wpedantic
CFLAGS += -g -O2
CFLAGS += -I.
CFLAGS += $(shell pkg-config --cflags ${DEPENDENCIES})
CFLAGS += $(shell pkg-config --cflags $(DEPENDENCIES))
LDFLAGS += -Wl,-z,relro $(shell pkg-config --libs ${DEPENDENCIES})
LDFLAGS += -Wl,-z,relro $(shell pkg-config --libs $(DEPENDENCIES))
AR = ar
ARFLAGS = crs
@ -47,9 +47,9 @@ pmxcfs.8:
.PHONY: install
install: pmxcfs create_pmxcfs_db pmxcfs.8
install -D -m 0755 pmxcfs ${DESTDIR}/usr/bin/pmxcfs
install -D -m 0755 create_pmxcfs_db ${DESTDIR}/usr/bin/create_pmxcfs_db
install -D pmxcfs.8 ${DESTDIR}/usr/share/man/man8/pmxcfs.8
install -D -m 0755 pmxcfs $(DESTDIR)/usr/bin/pmxcfs
install -D -m 0755 create_pmxcfs_db $(DESTDIR)/usr/bin/create_pmxcfs_db
install -D pmxcfs.8 $(DESTDIR)/usr/share/man/man8/pmxcfs.8
.PHONY: check
check: check_memdb