Skip to content

Commit

Permalink
Makefile: strip: use the correct filename for the .ko (when other fil…
Browse files Browse the repository at this point in the history
…es are linked in)
  • Loading branch information
kaiwan committed Nov 26, 2024
1 parent ca960e5 commit ea4b587
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 30 deletions.
6 changes: 3 additions & 3 deletions ch13/2_list_demo_rdwrlock/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ all:
@echo
make -C $(KDIR) M=$(PWD) modules
if [ "${DBG_STRIP}" = "y" ]; then \
${STRIP} --strip-debug ${FNAME_C}.ko ; \
${STRIP} --strip-debug ${FNAME_C}_lkm.ko ; \
fi
install:
@echo
Expand All @@ -144,9 +144,9 @@ install:
@echo " [Now for the 'sudo make install' ]"
sudo make -C $(KDIR) M=$(PWD) modules_install
sudo depmod
@echo " [If !debug and !(module signing), stripping debug info from ${KMODDIR}/extra/${FNAME_C}.ko]"
@echo " [If !debug and !(module signing), stripping debug info from ${KMODDIR}/extra/${FNAME_C}_lkm.ko]"
if [ "${DBG_STRIP}" = "y" ]; then \
sudo ${STRIP} --strip-debug ${KMODDIR}/extra/${FNAME_C}.ko ; \
sudo ${STRIP} --strip-debug ${KMODDIR}/extra/${FNAME_C}_lkm.ko ; \
fi
nsdeps:
@echo "--- nsdeps (namespace dependencies resolution; for possibly importing ns's) ---"
Expand Down
6 changes: 3 additions & 3 deletions ch13/3_lockfree/list_demo_rcu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ all:
@echo
make -C $(KDIR) M=$(PWD) modules
if [ "${DBG_STRIP}" = "y" ]; then \
${STRIP} --strip-debug ${FNAME_C}.ko ; \
${STRIP} --strip-debug ${FNAME_C}_lkm.ko ; \
fi
install:
@echo
Expand All @@ -143,9 +143,9 @@ install:
@echo " [Now for the 'sudo make install' ]"
sudo make -C $(KDIR) M=$(PWD) modules_install
sudo depmod
@echo " [If !debug and !(module signing), stripping debug info from ${KMODDIR}/extra/${FNAME_C}.ko]"
@echo " [If !debug and !(module signing), stripping debug info from ${KMODDIR}/extra/${FNAME_C}_lkm.ko]"
if [ "${DBG_STRIP}" = "y" ]; then \
sudo ${STRIP} --strip-debug ${KMODDIR}/extra/${FNAME_C}.ko ; \
sudo ${STRIP} --strip-debug ${KMODDIR}/extra/${FNAME_C}_lkm.ko ; \
fi
nsdeps:
@echo "--- nsdeps (namespace dependencies resolution; for possibly importing ns's) ---"
Expand Down
6 changes: 3 additions & 3 deletions ch13/3_lockfree/thrdshowall_rcu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ all:
@echo
make -C $(KDIR) M=$(PWD) modules
if [ "${DBG_STRIP}" = "y" ]; then \
${STRIP} --strip-debug ${FNAME_C}.ko ; \
${STRIP} --strip-debug lkm_${FNAME_C}.ko ; \
fi
install:
@echo
Expand All @@ -142,9 +142,9 @@ install:
@echo " [Now for the 'sudo make install' ]"
sudo make -C $(KDIR) M=$(PWD) modules_install
sudo depmod
@echo " [If !debug and !(module signing), stripping debug info from ${KMODDIR}/extra/${FNAME_C}.ko]"
@echo " [If !debug and !(module signing), stripping debug info from ${KMODDIR}/extra/lkm_${FNAME_C}.ko]"
if [ "${DBG_STRIP}" = "y" ]; then \
sudo ${STRIP} --strip-debug ${KMODDIR}/extra/${FNAME_C}.ko ; \
sudo ${STRIP} --strip-debug ${KMODDIR}/extra/lkm_${FNAME_C}.ko ; \
fi
nsdeps:
@echo "--- nsdeps (namespace dependencies resolution; for possibly importing ns's) ---"
Expand Down
6 changes: 3 additions & 3 deletions ch13/4_lockdep/buggy_thrdshow_eg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ all:
@echo
make -C $(KDIR) M=$(PWD) modules
if [ "${DBG_STRIP}" = "y" ]; then \
${STRIP} --strip-debug ${FNAME_C}.ko ; \
${STRIP} --strip-debug lkm_${FNAME_C}.ko ; \
fi
install:
@echo
Expand All @@ -142,9 +142,9 @@ install:
@echo " [Now for the 'sudo make install' ]"
sudo make -C $(KDIR) M=$(PWD) modules_install
sudo depmod
@echo " [If !debug and !(module signing), stripping debug info from ${KMODDIR}/extra/${FNAME_C}.ko]"
@echo " [If !debug and !(module signing), stripping debug info from ${KMODDIR}/extra/lkm_${FNAME_C}.ko]"
if [ "${DBG_STRIP}" = "y" ]; then \
sudo ${STRIP} --strip-debug ${KMODDIR}/extra/${FNAME_C}.ko ; \
sudo ${STRIP} --strip-debug ${KMODDIR}/extra/lkm_${FNAME_C}.ko ; \
fi
nsdeps:
@echo "--- nsdeps (namespace dependencies resolution; for possibly importing ns's) ---"
Expand Down
6 changes: 3 additions & 3 deletions ch6/foreach/prcs_showall/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ all:
@${CC} --version|head -n1
@echo
make -C $(KDIR) M=$(PWD) modules
$(shell [ "${MYDEBUG}" != "y" ] && ${STRIP} --strip-debug ./${FNAME_C}.ko)
$(shell [ "${MYDEBUG}" != "y" ] && ${STRIP} --strip-debug ./lkm_${FNAME_C}.ko)
install:
@echo
@echo "--- installing ---"
Expand All @@ -109,8 +109,8 @@ install:
sudo make -C $(KDIR) M=$(PWD) modules_install
@echo " sudo depmod"
sudo depmod
@echo " [If !debug, stripping debug info from ${KMODDIR}/extra/${FNAME_C}.ko]"
$(shell if [ "${MYDEBUG}" != "y" ]; then sudo ${STRIP} --strip-debug ${KMODDIR}/extra/${FNAME_C}.ko; fi)
@echo " [If !debug, stripping debug info from ${KMODDIR}/extra/lkm_${FNAME_C}.ko]"
$(shell if [ "${MYDEBUG}" != "y" ]; then sudo ${STRIP} --strip-debug ${KMODDIR}/extra/lkm_${FNAME_C}.ko; fi)
nsdeps:
@echo "--- nsdeps (namespace dependencies resolution; for possibly importing ns's) ---"
make -C $(KDIR) M=$(PWD) nsdeps
Expand Down
6 changes: 3 additions & 3 deletions ch6/foreach/thrd_showall/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ all:
@echo
make -C $(KDIR) M=$(PWD) modules
if [ "${DBG_STRIP}" = "y" ]; then \
${STRIP} --strip-debug ${FNAME_C}.ko ; \
${STRIP} --strip-debug lkm_${FNAME_C}.ko ; \
fi
install:
@echo
Expand All @@ -142,9 +142,9 @@ install:
@echo " [Now for the 'sudo make install' ]"
sudo make -C $(KDIR) M=$(PWD) modules_install
sudo depmod
@echo " [If !debug and !(module signing), stripping debug info from ${KMODDIR}/extra/${FNAME_C}.ko]"
@echo " [If !debug and !(module signing), stripping debug info from ${KMODDIR}/extra/lkm_${FNAME_C}.ko]"
if [ "${DBG_STRIP}" = "y" ]; then \
sudo ${STRIP} --strip-debug ${KMODDIR}/extra/${FNAME_C}.ko ; \
sudo ${STRIP} --strip-debug ${KMODDIR}/extra/lkm_${FNAME_C}.ko ; \
fi
nsdeps:
@echo "--- nsdeps (namespace dependencies resolution; for possibly importing ns's) ---"
Expand Down
6 changes: 3 additions & 3 deletions ch7/show_kernel_vas/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ all:
@echo
make -C $(KDIR) M=$(PWD) modules
if [ "${DBG_STRIP}" = "y" ]; then \
${STRIP} --strip-debug ${FNAME_C}.ko ; \
${STRIP} --strip-debug show_${FNAME_C}.ko ; \
fi
install:
@echo
Expand All @@ -142,9 +142,9 @@ install:
@echo " [Now for the 'sudo make install' ]"
sudo make -C $(KDIR) M=$(PWD) modules_install
sudo depmod
@echo " [If !debug and !(module signing), stripping debug info from ${KMODDIR}/extra/${FNAME_C}.ko]"
@echo " [If !debug and !(module signing), stripping debug info from ${KMODDIR}/extra/show_${FNAME_C}.ko]"
if [ "${DBG_STRIP}" = "y" ]; then \
sudo ${STRIP} --strip-debug ${KMODDIR}/extra/${FNAME_C}.ko ; \
sudo ${STRIP} --strip-debug ${KMODDIR}/extra/show_${FNAME_C}.ko ; \
fi
nsdeps:
@echo "--- nsdeps (namespace dependencies resolution; for possibly importing ns's) ---"
Expand Down
6 changes: 3 additions & 3 deletions ch8/lowlevel_mem/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ all:
@echo
make -C $(KDIR) M=$(PWD) modules
if [ "${DBG_STRIP}" = "y" ]; then \
${STRIP} --strip-debug ${FNAME_C}.ko ; \
${STRIP} --strip-debug ${FNAME_C}_lkm.ko ; \
fi
install:
@echo
Expand All @@ -142,9 +142,9 @@ install:
@echo " [Now for the 'sudo make install' ]"
sudo make -C $(KDIR) M=$(PWD) modules_install
sudo depmod
@echo " [If !debug and !(module signing), stripping debug info from ${KMODDIR}/extra/${FNAME_C}.ko]"
@echo " [If !debug and !(module signing), stripping debug info from ${KMODDIR}/extra/${FNAME_C}_lkm.ko]"
if [ "${DBG_STRIP}" = "y" ]; then \
sudo ${STRIP} --strip-debug ${KMODDIR}/extra/${FNAME_C}.ko ; \
sudo ${STRIP} --strip-debug ${KMODDIR}/extra/${FNAME_C}_lkm.ko ; \
fi
nsdeps:
@echo "--- nsdeps (namespace dependencies resolution; for possibly importing ns's) ---"
Expand Down
6 changes: 3 additions & 3 deletions ch9/slab_custom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ all:
@echo
make -C $(KDIR) M=$(PWD) modules
if [ "${DBG_STRIP}" = "y" ]; then \
${STRIP} --strip-debug ${FNAME_C}.ko ; \
${STRIP} --strip-debug lkm_${FNAME_C}.ko ; \
fi
install:
@echo
Expand All @@ -142,9 +142,9 @@ install:
@echo " [Now for the 'sudo make install' ]"
sudo make -C $(KDIR) M=$(PWD) modules_install
sudo depmod
@echo " [If !debug and !(module signing), stripping debug info from ${KMODDIR}/extra/${FNAME_C}.ko]"
@echo " [If !debug and !(module signing), stripping debug info from ${KMODDIR}/extra/lkm_${FNAME_C}.ko]"
if [ "${DBG_STRIP}" = "y" ]; then \
sudo ${STRIP} --strip-debug ${KMODDIR}/extra/${FNAME_C}.ko ; \
sudo ${STRIP} --strip-debug ${KMODDIR}/extra/lkm_${FNAME_C}.ko ; \
fi
nsdeps:
@echo "--- nsdeps (namespace dependencies resolution; for possibly importing ns's) ---"
Expand Down
6 changes: 3 additions & 3 deletions solutions_to_assgn/ch9/slab_custom_mult/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ all:
@echo
make -C $(KDIR) M=$(PWD) modules
if [ "${DBG_STRIP}" = "y" ]; then \
${STRIP} --strip-debug ${FNAME_C}.ko ; \
${STRIP} --strip-debug lkm_${FNAME_C}.ko ; \
fi
install:
@echo
Expand All @@ -142,9 +142,9 @@ install:
@echo " [Now for the 'sudo make install' ]"
sudo make -C $(KDIR) M=$(PWD) modules_install
sudo depmod
@echo " [If !debug and !(module signing), stripping debug info from ${KMODDIR}/extra/${FNAME_C}.ko]"
@echo " [If !debug and !(module signing), stripping debug info from ${KMODDIR}/extra/lkm_${FNAME_C}.ko]"
if [ "${DBG_STRIP}" = "y" ]; then \
sudo ${STRIP} --strip-debug ${KMODDIR}/extra/${FNAME_C}.ko ; \
sudo ${STRIP} --strip-debug ${KMODDIR}/extra/lkm_${FNAME_C}.ko ; \
fi
nsdeps:
@echo "--- nsdeps (namespace dependencies resolution; for possibly importing ns's) ---"
Expand Down

0 comments on commit ea4b587

Please sign in to comment.