aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSadaf Ebrahimi <sadafebrahimi@google.com>2023-08-24 00:21:11 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-08-24 00:21:11 +0000
commit9577b17009379649c9220edca7d0077311445b95 (patch)
tree14cfbb9d58780e8b97fa7ed642ea8b7dc1233c6c /Makefile
parentcfb70302bcd5fdbd6e797d950521102e9f14532c (diff)
parentbed57b7ffcdb36c91224d9fe341411aaf20e7bf4 (diff)
downloadlibcap-9577b17009379649c9220edca7d0077311445b95.tar.gz
Upgrade libcap to libcap-2.69 am: 3620cbbd3a am: 73ad227596 am: 8a1cf2a372 am: bed57b7ffc
Original change: https://android-review.googlesource.com/c/platform/external/libcap/+/2724494 Change-Id: I740e4b63aae0fc16a6276b784b83f8e93d92df63 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile38
1 files changed, 12 insertions, 26 deletions
diff --git a/Makefile b/Makefile
index d26af01..fca2b58 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ include Make.Rules
# flags
#
-all install clean: %: %-here
+all test sudotest install clean: %: %-here
$(MAKE) -C libcap $@
ifneq ($(PAM_CAP),no)
$(MAKE) -C pam_cap $@
@@ -20,10 +20,13 @@ endif
$(MAKE) -C tests $@
$(MAKE) -C progs $@
$(MAKE) -C doc $@
- $(MAKE) -C kdebug $@
all-here:
+test-here:
+
+sudotest-here:
+
install-here:
clean-here:
@@ -32,8 +35,11 @@ clean-here:
distclean: clean
$(DISTCLEAN)
@echo "CONFIRM Go package cap has right version dependency on cap/psx:"
- for x in $$(find . -name go.mod); do grep -F -v "module" $$x | fgrep "kernel.org/pub/linux/libs/security/libcap" > /dev/null || continue ; grep -F "v$(GOMAJOR).$(VERSION).$(MINOR)" $$x > /dev/null && continue ; echo "$$x is not updated. Try running: ./gomods.sh v$(GOMAJOR).$(VERSION).$(MINOR)" ; exit 1 ; done
+ for x in $$(find . -name go.mod); do $(BUILD_FGREP) -v "module" $$x | $(BUILD_FGREP) "kernel.org/pub/linux/libs/security/libcap" > /dev/null || continue ; $(BUILD_FGREP) "v$(GOMAJOR).$(VERSION).$(MINOR)" $$x > /dev/null && continue ; echo "$$x is not updated. Try running: ./gomods.sh v$(GOMAJOR).$(VERSION).$(MINOR)" ; exit 1 ; done
@echo "ALL go.mod files updated"
+ @echo "Confirm headers export current version"
+ $(BUILD_FGREP) "#define LIBCAP_MAJOR $(VERSION)" libcap/include/sys/capability.h
+ $(BUILD_FGREP) "#define LIBCAP_MINOR $(MINOR)" libcap/include/sys/capability.h
@echo "Now validate that everything is checked in to a clean tree.."
test -z "$$(git status --ignored -s)"
@echo "All good!"
@@ -41,35 +47,15 @@ distclean: clean
release: distclean
cd .. && ln -s libcap libcap-$(VERSION).$(MINOR) && tar cvf libcap-$(VERSION).$(MINOR).tar --exclude patches libcap-$(VERSION).$(MINOR)/* && rm libcap-$(VERSION).$(MINOR)
-test: all
- $(MAKE) -C libcap $@
- $(MAKE) -C tests $@
-ifneq ($(PAM_CAP),no)
- $(MAKE) -C pam_cap $@
-endif
-ifeq ($(GOLANG),yes)
- $(MAKE) -C go $@
-endif
- $(MAKE) -C progs $@
-
ktest: all
$(MAKE) -C kdebug test
-sudotest: all
- $(MAKE) -C tests $@
-ifneq ($(PAM_CAP),no)
- $(MAKE) -C pam_cap $@
-endif
-ifeq ($(GOLANG),yes)
- $(MAKE) -C go $@
-endif
- $(MAKE) -C progs $@
-
-distcheck:
+distcheck: distclean
./distcheck.sh
+ $(MAKE) DYNAMIC=no COPTS="-D_FORTIFY_SOURCE=2 -O1 -g" clean test
$(MAKE) DYNAMIC=yes clean all test sudotest
$(MAKE) DYNAMIC=no COPTS="-O2 -std=c89" clean all test sudotest
- $(MAKE) PAM_CAP=no CC=/usr/local/musl/bin/musl-gcc clean all test sudotest
+ $(MAKE) PAM_CAP=no CC=musl-gcc clean all test sudotest
$(MAKE) CC=clang clean all test sudotest
$(MAKE) clean all test sudotest
$(MAKE) distclean