Ouss4 commented on a change in pull request #362: URL: https://github.com/apache/incubator-nuttx-apps/pull/362#discussion_r470063821
########## File path: system/libuv/Makefile ########## @@ -0,0 +1,52 @@ +############################################################################ +# system/libuv/Makefile +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +############################################################################ + +include $(APPDIR)/Make.defs + +LIBUV_PATCHS ?= $(sort $(wildcard 000*.patch)) +WGET ?= wget +UNPACK ?= unzip -q + +$(CONFIG_LIBUV_TARBALL): + @echo "Downloading: $(CONFIG_LIBUV_TARBALL)" + $(Q) $(WGET) $(CONFIG_LIBUV_URL)/$(CONFIG_LIBUV_TARBALL) \ + -O $(CONFIG_LIBUV_TARBALL) + +$(LIBUV_UNPACKDIR): $(CONFIG_LIBUV_TARBALL) + @echo "Unpacking: $(CONFIG_LIBUV_TARBALL) -> $(LIBUV_UNPACKDIR)" + $(call DELDIR, $(LIBUV_UNPACKDIR)) + $(Q) $(UNPACK) "$(CONFIG_LIBUV_TARBALL)" + $(Q) cat $(LIBUV_PATCHS) | patch -s -N -d $(LIBUV_UNPACKDIR) -p1 + $(Q) touch $(LIBUV_UNPACKDIR) + +context: $(LIBUV_UNPACKDIR) + +# FIXME make clean does not work without this target +.depend: + $(Q) touch $@ + +depend: .depend + +distclean: + $(call DELFILE, .depend) + $(call DELDIR, $(LIBUV_UNPACKDIR)) + $(call DELFILE, $(CONFIG_LIBUV_TARBALL)) + +include $(APPDIR)/Directory.mk Review comment: You can do that with an Application.mk makefile as well. The reason I'm saying this is because you are not using any of the prepared targets from Directory.mk and you are recreating targets that already exist in Application.mk. For instance Application.mk's file already creates the .depend file in its depend target and it cleans it during its distclean. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
