Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

01.Version-cache - restructuring of Makefile.work #12000

Merged
merged 1 commit into from
Oct 4, 2022

Conversation

Kalimuthu-Velappan
Copy link
Contributor

  • The Makefile.work becomes complex and it is very difficult to manage the changes across branches.
  • Restructured the Makefile.work and it becomes more readable.
  • Added $(QUIET) option to turn on command echo mode through command line option.
  • Exported the SONIC_BUILD_VARS variable, through which make options can be set dynamically.
    Eg: make SONIC_BUILD_VARS='INCLUDE_NAT=y'

Why I did it

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

- The Makefile.work becomes complex and it is very difficult to manage
the changes across branches.
- Restructured the Makefile.work and it becomes more readable.
- Added $(QUIET) option to turn on command echo mode through command line option.
- Exported the SONIC_BUILD_VARS variable, through which make
options can be set dynamically.
	Eg: make SONIC_BUILD_VARS='INCLUDE_NAT=y'
@Kalimuthu-Velappan
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 12000 in repo sonic-net/sonic-buildimage

@Kalimuthu-Velappan
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Kalimuthu-Velappan
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Kalimuthu-Velappan
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 12000 in repo sonic-net/sonic-buildimage

@Kalimuthu-Velappan
Copy link
Contributor Author

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 12000 in repo sonic-net/sonic-buildimage

@Kalimuthu-Velappan
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adyeung
Copy link
Collaborator

adyeung commented Sep 14, 2022

@xumia @liushilongbuaa submitter has taken the time to split the original code PR to smaller submissions for review, pls help review and merge

.DEFAULT_GOAL := all

%::
%:: | sonic-build-hooks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no dependency check for the sonic-build-hooks target, so we are checking this target always.

@Kalimuthu-Velappan
Copy link
Contributor Author

I tried the below commands, but it doesn't generate the expected out file in the host.

#cat Dockerfile
FROM debian:buster AS build-stage
RUN mkdir -p /test
RUN echo "MY CNT" > /test/myfile.txt

FROM scratch AS export-stage
COPY --from=build-stage /test /

#docker build --no-cache -o out .
#ls
Dockerfile

lguohan pushed a commit that referenced this pull request Dec 17, 2022
Why I did it

make clean is broken after #12000:

bash: -c: line 1: syntax error near unexpected token `;'
bash: -c: line 1: `make -f slave.mk PLATFORM= PLATFORM_ARCH=amd64 MULTIARCH_QEMU_ENVIRON=n 
...
MIRROR_URLS= MIRROR_SECURITY_URLS=  Q=@ clean; ; '
make[1]: *** [Makefile.work:531: clean] Error 2

How I did it

Remove a conditional for clean command.

Signed-off-by: Konstantin Vasin <[email protected]>
@mssonicbld
Copy link
Collaborator

@Kalimuthu-Velappan PR conflicts with 202211 branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants