- # - on a partial rebuild without a new file inside TARGET_1, just touch TARGET
- if [ -s "$(TARGET)_1" ]; then \
- ROOTFILE=$(DIR_SRC)/src/ROOTFILES.$(MACHINE); \
- for line in `cat $(TARGET)_1`; do \
- if grep -qE "^#$$line$$" $$ROOTFILE ; then echo "#$$line" >> $(TARGET); \
- elif grep -qE "^$$line$$" $$ROOTFILE ; then echo "$$line" >> $(TARGET); \
+ # - if the corresponding rootfile is not found, touch $(TARGET)_missing_rootfile
+ # - on a partial rebuild without a new file inside TARGET_diff, just touch TARGET
+ # $(TARGET)_diff : result of the diff
+ # ROOTFILE : reference of include/exclude files
+ # $(TARGET)_rootfile : ROOTFILE with KVER replacement
+ # $(TARGET) : log result with {commented|include|added} files
+ if [ -s "$(TARGET)_diff" ]; then \
+ if [ "$(PASS)" = "SMP" ]; then LFS_SCRIPT=$(firstword $(MAKEFILE_LIST))-smp; \
+ else LFS_SCRIPT=$(firstword $(MAKEFILE_LIST)); \
+ fi; \
+ echo $(LFS_SCRIPT); \
+ ROOTFILE=`find $(DIR_SRC)/config/rootfiles/common -maxdepth 1 -type f -name $$LFS_SCRIPT`; \
+ if [ "$$ROOTFILE" = "" ]; then \
+ ROOTFILE=`find $(DIR_SRC)/config/rootfiles/ver_$(IPFVER) -type f -name $$LFS_SCRIPT`; \
+ fi; \
+ if [ "$$ROOTFILE" = "" ]; then \
+ touch $(TARGET)_missing_rootfile; \
+ ROOTFILE=$(TARGET)_missing_rootfile ; \
+ echo "error $$LFS_SCRIPT not found in config/rootfiles"; \
+ fi; \
+ sed "s/KVER/$(KVER)/g" $$ROOTFILE > $(TARGET)_rootfile; \
+ for line in `cat $(TARGET)_diff`; do \
+ if grep -qE "^#$$line$$" $(TARGET)_rootfile; then echo "#$$line" >> $(TARGET); \
+ elif grep -qE "^$$line$$" $(TARGET)_rootfile ; then echo "$$line" >> $(TARGET); \