Comments (5)
I have planned to start working on this. Adding some notes:
- From GCC Coding Conventions:
touch
should never be used in GCC Makefiles. Instead oftouch foo
always use$(STAMP) foo
.
from avr32-toolchain.
This is how stamps would work:
############# SUPP: AUTOCONF ############
.PHONY: download-autoconf
downloads/$(AUTOCONF_ARCHIVE) download-autoconf:
[ -d downloads ] || mkdir downloads ;
cd downloads && curl -LO $(AUTOCONF_URL)
.PHONY: extract-autoconf
extract-autoconf: stamps/extract-autoconf
stamps/extract-autoconf: downloads/$(AUTOCONF_ARCHIVE)
@(t1=`openssl md5 $< | cut -f 2 -d " " -` && \
[ "$$t1" = "$(AUTOCONF_MD5)" ] || \
( echo "Bad Checksum! Please remove the following file and retry: $<" && false ))
tar -jxf $< ;
[ -d stamps ] || mkdir stamps
touch stamps/extract-autoconf;
.PHONY: build-autoconf
build-autoconf: stamps/build-autoconf
stamps/build-autoconf: stamps/extract-autoconf
mkdir -p build/autoconf && cd build/autoconf && \
../../autoconf-$(AUTOCONF_VERSION)/configure --prefix="$(SUPP_PREFIX)" && \
$(MAKE) -j$(PROCS)
[ -d stamps ] || mkdir stamps
touch stamps/build-autoconf;
.PHONY: install-autoconf
install-autoconf: stamps/install-autoconf
stamps/install-autoconf: stamps/build-autoconf
cd build/autoconf && \
$(MAKE) install
[ -d stamps ] || mkdir stamps
touch stamps/install-autoconf;
Refactored version:
- To reduce noise, I removed phony targets. Not really needed?
- Used
make -p
, instead of[-d dir] || mkdir dir
############# SUPP: AUTOCONF ############
stamps/install-autoconf: stamps/build-autoconf
$(MAKE) -C build/autoconf install
mkdir -p stamps && touch $@
stamps/build-autoconf: stamps/extract-autoconf
mkdir -p build/autoconf
cd build/autoconf && ../../autoconf-$(AUTOCONF_VERSION)/configure --prefix="$(SUPP_PREFIX)" \
&& $(MAKE) -j$(PROCS)
mkdir -p stamps && touch $@
stamps/extract-autoconf: downloads/$(AUTOCONF_ARCHIVE)
@(t1=`openssl md5 $< | cut -f 2 -d " " -` && \
[ "$$t1" = "$(AUTOCONF_MD5)" ] || \
( echo "Bad Checksum! Please remove the following file and retry: $<" && false ))
tar -jxf $<
mkdir -p stamps && touch $@
downloads/$(AUTOCONF_ARCHIVE):
mkdir -p downloads
cd downloads && curl -LO $(AUTOCONF_URL)
@jsnyder Do you like to keep all .phonies or could we just have stamp-targets?
from avr32-toolchain.
@jsnyder What's your preference about the change I proposed above? I'm asking before I'll fix all of these. So could be get rid off "unnecessary" phony-targets? Let's just keep install-cross etc.
from avr32-toolchain.
That looks good, you can remove the extra phony targets if you like.
So with this refactoring the stamps are actually working correctly?
(again sorry for delays in response)
from avr32-toolchain.
So with this refactoring the stamps are actually working correctly?
Yes. I'll open a pull request when I'm done with the refactoring.
from avr32-toolchain.
Related Issues (20)
- MD5 checksums are ignored
- Add libusb-dev into requirements
- Update header files to 3.2.3.791 HOT 2
- Update dfu-programmer to 0.5.5 HOT 2
- Update to latest toolchain version HOT 11
- Strip AVR32 libraries to fix Hudson problem HOT 2
- Incorrect strcmp generated for UC3C
- issues installing ubuntu 13.x
- Make fails on 10.9.4 due to no gcc (clang only)
- ANL mirror is no more
- Error building on Ubuntu Bionic Beaver
- unknown parsing error
- python: can't open file 'STAMP_test.py': [Errno 2] No such file or directory
- Suggestion: accommodate multiple simultaneous toolchain versions HOT 4
- Build fails if $(CURDIR) contains spaces HOT 8
- Build g++ configuration proposal HOT 3
- dfu-programmer build experience HOT 5
- binutils sometimes fails to build from clean start, other times not HOT 14
- AVR32PATCHES_URL is broken HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avr32-toolchain.