Thread: regarding .DEFAULT in makefile

  1. #1
    Registered User
    Join Date
    Jan 2012
    Posts
    1

    regarding .DEFAULT in makefile

    .PHONY: mkdirs
    mkdirs: work_mkdir www_mkdir
    @echo "santhosh..........i am in .PHONY: mkdirs"


    .PHONY: work_mkdir
    work_mkdir:
    @echo "santhosh.........i am in .PHONY: work_mkdir"
    @mkdir -p $(WORK_DIR)

    .PHONY: www_clean www_mkdir
    www_mkdir:
    @echo "santhosh...........i am in .PHONY: www_clean www_mkdir"
    @mkdir -p www$(C_TOOL)
    www_clean:
    @rm -f .www$(C_TOOL) www$(C_TOOL)/*.*

    .PHONY: www
    ifeq ($(filter USE_BUILT_IN_WEB_FILES,$(DEFINES)),)
    @echo "santhosh.........i am in .PHONY: wwww"
    www: www_mkdir $(ALL_WWW_FILES)
    endif


    .DEFAULT:
    @echo "santhosh .............i am in default"
    lftp -c "debug 10; open -u admin,PASS $<; rm -r -f /http; mkdir /http/config; mput -O /http/config www$(C_TOOL)/*;"


    hi,
    This is my common_linux.make file the issue is build the project using make command the .default part is execting as per my project the default condition should be not executed.please share ur thoughts regarding the default.

    regards
    santhosh bau

  2. #2
    Registered User
    Join Date
    Apr 2008
    Posts
    396
    .PHONY and .DEFAULT are not rules, they are built-in variables to specify rules.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. please help with the Makefile
    By alice06 in forum C Programming
    Replies: 2
    Last Post: 10-07-2010, 06:38 AM
  2. Makefile
    By daghenningsorbo in forum Linux Programming
    Replies: 11
    Last Post: 12-16-2009, 10:44 PM
  3. difference makefile makefile.am makefile.in
    By Bargi in forum Linux Programming
    Replies: 7
    Last Post: 10-28-2007, 02:08 PM
  4. help with makefile
    By ICool in forum C Programming
    Replies: 31
    Last Post: 10-22-2007, 10:03 AM
  5. Makefile
    By gaah in forum C++ Programming
    Replies: 2
    Last Post: 02-24-2005, 05:40 PM